Frontend (on-device web UI)
Frontend source code lives in frontend/.
It is a Single Page App that is built into the firmware image:
- Build output goes to
main/frontend/ - Firmware serves it under
/ - The UI calls the REST API under
/api/*(same origin on-device)
Start here
frontend_readme.md(dev/proxy/build workflow)- API contract:
assets/api/openapi.json
Important constraints
- Output is tuned for SPIFFS: stable filenames and gzip-only assets (see
frontend_readme.md). - UI should tolerate mode differences (
aircraftvswinch) and endpoints that are not registered / return 404 depending on firmware build flags and device mode.
Aircraft live IAS page
- Route:
/aircraft/live(AircraftLive.tsx) - Polling:
useAircraftMonitor— enabled only while the page is mounted (avoids background WiFi load on the settings home screen) - Rate:
AIRCRAFT_MONITOR_POLL_HZinfrontend/src/config/aircraftMonitor.ts(default 2 Hz, aligned with firmware/api/aircraft/live+ ETag) - Graph samples: recorded only in
airborneandlanding_hold; cleared onlandedand on manual reset
Winch mode uses a global WinchMonitorProvider on the home route instead; aircraft
live is intentionally page-scoped.
Develop against a real device via proxy
Use the Vite proxy workflow in frontend_readme.md so the UI talks to a device
under /api/* while you iterate locally.