Skip to content

Initial Visiontr frontend: Vite + React + Cesium globe with OpenSky integration#2

Open
TarunT27 wants to merge 1 commit into
mainfrom
codex/update-vite-config-and-create-opensky-service-elvxew
Open

Initial Visiontr frontend: Vite + React + Cesium globe with OpenSky integration#2
TarunT27 wants to merge 1 commit into
mainfrom
codex/update-vite-config-and-create-opensky-service-elvxew

Conversation

@TarunT27

Copy link
Copy Markdown
Owner

Motivation

  • Provide an initial frontend scaffold for the Visiontr project to visualize live aircraft on a 3D globe using Cesium and React and to fetch flight states from the OpenSky API.
  • Enable a fast development experience via Vite and include necessary dependencies and build configuration.

Description

  • Add project configuration and dependencies: package.json, package-lock.json, .gitignore, and vite.config.ts with @vitejs/plugin-react-swc and vite-plugin-cesium configured.
  • Create minimal app entry (index.html, src/main.tsx, src/App.tsx) and a Globe component (src/components/Globe.tsx) that instantiates a Cesium Viewer, renders aircraft Entity models with sampled positions and paths, supports tracking, a night-vision post-process stage, and UI controls for toggling night vision and releasing the camera.
  • Implement flight data handling in src/hooks/useFlightData.ts which polls OpenSky states/all and maps API states to typed FlightState objects for rendering.
  • Implement src/services/OpenSkyService.ts that requests and caches an OpenSky client-credentials token, handles token lifetime and concurrent requests, and surfaces getAccessToken() for the hook; API credentials are read from environment variables (VITE_OPENSKY_CLIENT_ID, VITE_OPENSKY_CLIENT_SECRET) and Cesium Ion token from VITE_CESIUM_ION_ACCESS_TOKEN.

Testing

  • No automated tests were added or run for this change.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant