How ripon1995/car-management works
Car Management tracks fleet assets and their commercial and operating records. A user navigates protected React pages, which use API modules to manage records through a versioned FastAPI backend; the backend’s feature packages separate routing, business services, and persistence. The README identifies leases between owners’ cars and vendors, drivers assigned to cars, car-scoped maintenance, documents and payments, and dashboard revenue computed from payments. Several backend route registrations and most page-to-API calls were not shown, so those links are omitted or marked unverified.
Main entry points: api.py Versioned API router · App.tsx React app routes · service.py Payments · PaymentsPage.tsx Payments page
Components 29
Web application
- React app routes
frontend/src/App.tsx - Payments page
frontend/src/pages/PaymentsPage.tsx - API client
frontend/src/api/client.ts - Owners page
frontend/src/pages/CarOwnersPage.tsx - Cars page
frontend/src/pages/CarsPage.tsx - Leases page
frontend/src/pages/LeasesPage.tsx - Income page
frontend/src/pages/IncomePage.tsx - Dashboard page
frontend/src/pages/DashboardPage.tsx - Drivers page
frontend/src/pages/DriversPage.tsx - Vendors page
frontend/src/pages/VendorsPage.tsx - Maintenance page
frontend/src/pages/MaintenancePage.tsx - Fuel page
frontend/src/pages/FuelPage.tsx - Car docs page
frontend/src/pages/CarDocsPage.tsx
API and access
- FastAPI application
backend/app/main.py - Versioned API router
backend/app/api.py - Postgres database
backend/app/db/session.py
Fleet records
- Cars
backend/app/features/cars/service.py - Car owners
backend/app/features/car_owners/service.py - Drivers
backend/app/features/drivers/service.py - Vendors
backend/app/features/vendors/service.py - Leases
backend/app/features/leases/service.py
Operations and finance
- Car documents
backend/app/features/car_docs/service.py - Maintenance
backend/app/features/maintenance/service.py - Fuel records
backend/app/features/fuel/service.py - Payments
backend/app/features/payments/service.py - Lease income
backend/app/features/income/service.py - Revenue dashboard
backend/app/features/revenue/service.py
Other components
- Fleet user
- HTTP API
Connections 34
- Fleet user → React app routes: navigates
frontend/src/App.tsx - React app routes → Payments page: routes to
frontend/src/App.tsx - React app routes → Cars page: routes to
frontend/src/App.tsx - React app routes → Owners page: routes to
frontend/src/App.tsx - React app routes → Leases page: routes to
frontend/src/App.tsx - React app routes → Income page: routes to
frontend/src/App.tsx - React app routes → Dashboard page: routes to
frontend/src/App.tsx - React app routes → Drivers page: routes to
frontend/src/App.tsx - React app routes → Vendors page: routes to
frontend/src/App.tsx - React app routes → Maintenance page: routes to
frontend/src/App.tsx - React app routes → Fuel page: routes to
frontend/src/App.tsx - React app routes → Car docs page: routes to
frontend/src/App.tsx - Payments page → API client: uses API
- API client → HTTP API: sends requests
frontend/src/api/client.ts - FastAPI application → Versioned API router: mounts
backend/app/main.py - HTTP API → Versioned API router: serves requests
- Versioned API router → Cars: dispatches
- Versioned API router → Car owners: dispatches
- Versioned API router → Drivers: dispatches
- Versioned API router → Vendors: dispatches
- Versioned API router → Leases: dispatches
- Versioned API router → Car documents: dispatches
- Versioned API router → Maintenance: dispatches
- Versioned API router → Fuel records: dispatches
- Versioned API router → Payments: dispatches
- Versioned API router → Lease income: dispatches
- Versioned API router → Revenue dashboard: dispatches
- Fuel records → Payments: creates linked payment
backend/app/features/fuel/service.py - Leases → Lease income: generates income
backend/app/features/leases/service.py - Revenue dashboard → Payments: reads records
backend/app/features/revenue/service.py - Revenue dashboard → Lease income: reads records
backend/app/features/revenue/service.py - Payments page → HTTP API: manages payments
- Cars → Postgres database: persists records
- Payments → Postgres database: persists records