React + useReducer flight logbook with a map (Leaflet) and per-flight comments.
- Real login via NestJS backend (Register / Login / Logout) using HttpOnly cookies
- Dashboard: stats + recent flights + mini map preview
- Flights list: search + filter
- Flight detail: map + 3-part debrief (Well / Improve / Notes) + GPX import
- Map explorer: all tracks + quick focus + "View Details"
- Vite + React + TypeScript
- react-router-dom
- react-leaflet + leaflet
- @tmcw/togeojson for GPX → GeoJSON
- Install deps
npm install- Start dev server
npm run devOpen a flight detail page and click Import GPX Track.
Flights/comments are stored in localStorage for now (so your notes persist).
This app supports both session cookies and AUTH_MODE=jwt directly against Flight-Training-Server.
By default, the frontend calls the API under /api/v1 on the same origin. In this repo, local development uses a single env file:
/.env.development.localRecommended contents:
VITE_AUTH_MODE=session
VITE_API_URL=http://localhost:3000
VITE_GOOGLE_CLIENT_ID=xxxx.apps.googleusercontent.comVITE_AUTH_MODE must match Flight-Training-Server AUTH_MODE:
session-> browser uses server session cookiesjwt-> browser uses server-issued access token plus refresh cookie
Endpoints expected from Flight-Training-Server:
POST /auth/register-> returns{ id, email }and in jwt mode also returnsaccessTokenPOST /auth/login-> returns{ id, email }and in jwt mode also returnsaccessTokenPOST /auth/google-> returns{ id, email }(andaccessTokenin jwt mode)POST /auth/logout-> clears cookiesGET /auth/profile-> returns{ id, email }if logged inPOST /auth/refresh-> returns{ accessToken }in jwt mode
Set VITE_GOOGLE_CLIENT_ID to your Google OAuth Web Client ID (must match the backend):
VITE_GOOGLE_CLIENT_ID=xxxx.apps.googleusercontent.com