How mcchukwu/fleet-tracking-web works
Fleet Tracking Web is a map-first fleet operations console. Dispatchers and other signed-in users enter through routed, role-guarded pages; feature screens combine API-backed records with live vehicle state and map views. The main domain areas include fleet monitoring, playback, alerts, trips, geofences, drivers, imports, reports, audit, and system health. The README documents the API, live socket, map-adapter, offline-cache, and PWA boundaries; unsampled feature internals are represented at their page level.
Main entry points: client.ts API and query state · AppShell.tsx App shell · MapPage.tsx Live fleet map · router.tsx Route guards
Components 28
Application shell
- Route guards
src/app/router.tsx - App shell
src/features/shell/components/AppShell.tsx - Sign in
src/features/login/components/LoginPage.tsx
Fleet operations
- Live fleet map
src/features/map/components/MapPage.tsx - Trip playback
src/features/playback/components/PlaybackPage.tsx - Alerts
src/features/alerts/components/AlertsPage.tsx - Trips
src/features/trips/components/TripsPage.tsx - Geofences
src/features/geofences/components/GeofencesPage.tsx - Drivers
src/features/drivers/components/DriversPage.tsx - Data import
src/features/import/components/ImportPage.tsx - Reports
src/features/reports/components/ReportsPage.tsx - Audit log
src/features/audit/components/AuditPage.tsx - System health
src/features/system/components/SystemPage.tsx
Data and live state
- Session and roles
src/auth/AuthProvider.tsx - API and query state
src/api/client.ts - Live state
src/stores/live.ts - Live socket
src/live/LiveProvider.tsx
Maps and offline
- Map adapter
src/map/types.ts - MapLibre provider
src/map/providers/maplibre/index.ts - Offline persistence
src/api/persistedCache.ts - PWA support
src/pwa/register.ts
Shared experience
- Error handling
src/errors/normalize.ts - Style guide
src/features/styleguide/StyleGuidePage.tsx - Page layout
src/ui/PageFrame.tsx - Toast notifications
src/ui/Toast.tsx
Other components
- Fleet user
- Fleet API
- Fleet WebSocket
Connections 29
- Fleet user → Route guards: opens console
README.md - Route guards → Sign in: routes unauthenticated
src/app/router.tsx - Route guards → App shell: routes signed-in
README.md - App shell → Live fleet map: hosts feature pages
README.md - App shell → Style guide: hosts style guide
README.md - Sign in → Session and roles: authenticates
src/auth/AuthProvider.tsx - Live fleet map → API and query state: queries server state
README.md - Trip playback → API and query state: queries server state
README.md - Alerts → API and query state: queries server state
README.md - Trips → API and query state: queries server state
README.md - Geofences → API and query state: queries server state
README.md - Drivers → API and query state: queries server state
README.md - Data import → API and query state: uses API data
README.md - Reports → API and query state: queries server state
README.md - Audit log → API and query state: queries server state
README.md - System health → API and query state: queries server state
README.md - API and query state → Fleet API: requests
README.md - Live fleet map → Live state: reads live positions
README.md - Live socket → Live state: updates positions
README.md - Live socket → Fleet WebSocket: connects
README.md - Live fleet map → Map adapter: renders map
README.md - Trip playback → Map adapter: renders playback map
README.md - Map adapter → MapLibre provider: uses provider
README.md - API and query state → Offline persistence: persists queries
README.md - PWA support → Offline persistence: enables offline cache
README.md - MapLibre provider → Offline persistence: caches PMTiles ranges
README.md - API and query state → Error handling: normalizes failures
src/api/client.ts - App shell → Page layout: frames pages
src/app/router.tsx - App shell → Toast notifications: provides notifications