How sofianesmoun/fleet-manager-pro-v1- works
FleetManager Pro is a fleet-management web application for Algerian SMEs. Users sign in, then work with vehicles, rentals, clients and garages through role-restricted pages; requests pass through Express routes to domain handlers and services that access PostgreSQL. The README also documents audit logs, backups, and authentication flows. Several backend services and frontend pages are unsampled, so their presence is represented where documented, but unverified connections are omitted or marked dashed.
Main entry points: App.tsx Route application · app.ts Express API · prisma.ts PostgreSQL · auth.routes.ts Auth routes
Components 28
Web application
- Route application
frontend/src/App.tsx - Sign in
frontend/src/pages/LoginPage.tsx - Dashboard
frontend/src/pages/DashboardPage.tsx - Vehicle fleet
frontend/src/pages/FlottePage.tsx - Vehicle detail
frontend/src/pages/VehicleDetailPage.tsx - Rentals
frontend/src/pages/LocationsPage.tsx - Clients
frontend/src/pages/ClientsPage.tsx - Client detail
frontend/src/pages/ClientDetailPage.tsx - Garages
frontend/src/pages/GaragesPage.tsx - Insurance pages
frontend/src/pages/PlaceholderPage.tsx
API and access
- Express API
backend/src/app.ts - Auth routes
backend/src/routes/auth.routes.ts - Authentication
backend/src/services/auth.service.ts
Fleet operations
- Vehicle routes
backend/src/routes/vehicles.routes.ts - Vehicle handling
backend/src/controllers/vehicle.controller.ts - Vehicle operations
backend/src/services/vehicleService.ts - Client routes
backend/src/routes/clients.routes.ts - Client operations
backend/src/services/clientService.ts - Rental routes
backend/src/routes/rentals.routes.ts - Rental operations
backend/src/services/rentalService.ts - Garage routes
backend/src/routes/garages.routes.ts - Garage handling
backend/src/controllers/garage.controller.ts - Garage operations
backend/src/services/garageService.ts
Shared services
- Audit logging
backend/src/middleware/auditLog.ts - Backups
backend/src/services/backupService.ts - PostgreSQL
backend/src/lib/prisma.ts - Google Drive
backend/src/lib/googleDrive.ts
Other components
- Fleet staff
Connections 29
- Fleet staff → Route application: uses
frontend/src/App.tsx - Route application → Sign in: routes to
frontend/src/App.tsx - Route application → Dashboard: routes to
frontend/src/App.tsx - Route application → Vehicle fleet: routes to
frontend/src/App.tsx - Route application → Vehicle detail: routes to
frontend/src/App.tsx - Route application → Rentals: routes to
frontend/src/App.tsx - Route application → Clients: routes to
frontend/src/App.tsx - Route application → Client detail: routes to
frontend/src/App.tsx - Route application → Garages: routes to
frontend/src/App.tsx - Route application → Insurance pages: routes to
frontend/src/App.tsx - Route application → Express API: requests API
- Express API → Auth routes: mounts
backend/src/app.ts - Express API → Vehicle routes: mounts
backend/src/app.ts - Express API → Client routes: mounts
backend/src/app.ts - Express API → Rental routes: mounts
backend/src/app.ts - Express API → Garage routes: mounts
backend/src/app.ts - Express API → Backups: mounts backup route
backend/src/app.ts - Auth routes → Authentication: delegates
- Vehicle routes → Vehicle handling: dispatches
backend/src/routes/vehicles.routes.ts - Vehicle handling → Vehicle operations: calls
backend/src/controllers/vehicle.controller.ts - Client routes → Client operations: delegates
- Rental routes → Rental operations: delegates
- Garage routes → Garage handling: dispatches
backend/src/routes/garages.routes.ts - Garage handling → Garage operations: calls
backend/src/controllers/garage.controller.ts - Garage operations → PostgreSQL: reads and writes
backend/src/services/garageService.ts - Vehicle operations → PostgreSQL: uses
backend/src/services/vehicleService.ts - Authentication → PostgreSQL: uses
backend/src/services/auth.service.ts - Audit logging → PostgreSQL: writes audit events
backend/src/middleware/auditLog.ts - Backups → Google Drive: stores backups