How saroj-tech799/vehicle-management-system works
This is a browser-based fleet management system. Authenticated users enter through the routed application shell and manage vehicles, drivers, projects, assignments, transfers, daily logs, fuel, maintenance, expenses, fines, and LPO requests; reports provide financial and operational analysis. The shared API layer reads and writes Supabase data and maintains local persistence/extensions. Sampled source confirms several write paths and report reads; other page internals and some route-level interactions were not sampled, so their internal data wiring is not asserted.
Main entry points: App.tsx Application router · api.ts Data API and cache · supabase.ts Supabase client · LPORequests.tsx LPO requests
Components 23
Access and Shell
- Application router
src/App.tsx - Sign-in
src/pages/Login.tsx - Navigation shell
src/components/Layout.tsx
Fleet and Projects
- Dashboard
src/pages/Dashboard.tsx - Vehicles and drivers
src/pages/Vehicles.tsx - Projects
src/pages/Projects.tsx - Spreadsheet import
src/components/ui/ExcelImportButton.tsx - Project reconciliation
src/lib/projectDeduplication.ts
Fleet Operations
- Assignments
src/pages/Assignments.tsx - Transfers
src/pages/Transfers.tsx - Daily logs
src/pages/DailyLogs.tsx - Fuel records
src/pages/Fuel.tsx - Maintenance
src/pages/Maintenance.tsx - Expenses
src/pages/Expenses.tsx - Traffic fines
src/pages/TrafficFines.tsx
Reports and LPO
- LPO requests
src/pages/LPORequests.tsx - Financial reports
src/pages/Reports.tsx - LPO document export
src/utils/lpoExport.ts
Persistence
- Data API and cache
src/lib/api.ts - Supabase client
src/lib/supabase.ts - Supabase
- Browser local storage
Other components
- Fleet user
Connections 25
- Fleet user → Application router: opens
- Application router → Sign-in: routes unauthenticated
- Application router → Navigation shell: renders authenticated shell
- Application router → Dashboard: routes
- Application router → Vehicles and drivers: routes
- Application router → Assignments: routes
- Application router → Transfers: routes
- Application router → Daily logs: routes
- Application router → Fuel records: routes
- Application router → Maintenance: routes
- Application router → Expenses: routes
- Application router → Traffic fines: routes
- Application router → LPO requests: routes
- Application router → Financial reports: routes
- Application router → Supabase client: checks session
- Navigation shell → Supabase client: reads session and signs out
- Vehicles and drivers → Data API and cache: creates and updates records
- LPO requests → Data API and cache: updates requests
- Financial reports → Data API and cache: fetches report data
- Spreadsheet import → Data API and cache: creates imported records
- Project reconciliation → Data API and cache: reads and reconciles records
- LPO requests → LPO document export: exports documents
- Data API and cache → Supabase client: uses client
- Supabase client → Supabase: auth and data access
- Data API and cache → Browser local storage: caches and persists extensions