How abdelilaherretby/projet_location_voiture works
This is a car-rental marketplace with client and agency accounts, vehicle listings, booking, reservation management, billing, and reservation history. The main workflow runs from browsing cars through booking and agency confirmation/return handling, with client and agency profile areas for managing activity. The graph preserves the documented frontend and backend domains; some frontend-to-API wiring and unsampled feature internals are not shown in the available evidence, so those connections are omitted.
Main entry points: App.tsx Web app routes · db.js MySQL connection · reservationcontroller.js Reservation lifecycle · reservationRoutes.js Reservation routes
Components 27
Frontend experience
- Web app routes
Frontend/src/App.tsx - Car discovery
Frontend/src/components/About - Home experience
Frontend/src/pages/Home.tsx - Booking flow
Frontend/src/pages/booking_page.tsx - Client portal
Frontend/src/pages/Client_profile.tsx - Agency portal
Frontend/src/pages/Agence_profile.tsx
Accounts and access
- Client login
Frontend/src/pages/Login_client.tsx - Agency login
Frontend/src/pages/Login_agence.tsx - API server
Backend/server.js - JWT authentication
Backend/Middlewares/authMidleware.js - Client accounts
Backend/Controllers/clientcontroller.js - Agency accounts
Backend/Controllers/agencecontroller.js
Rental operations
- Vehicle management
Backend/Controllers/voiturecontroller.js - Car announcements
Backend/Controllers/annoncecontroller.js - Reservation lifecycle
Backend/Controllers/reservationcontroller.js - Reservation routes
Backend/routes/reservationRoutes.js
Rental records
- Reservation history
Backend/Controllers/reservationhistorycontroller.js - Invoicing
Backend/Controllers/facturecontroller.js - MySQL connection
Backend/config/db.js - Client data model
Backend/Models/clientmodel.js - Agency data model
Backend/Models/agencemodel.js - Reservation data model
Backend/Models/reservationmodel.js - History data model
Backend/Models/reservationhistorymodel.js - Invoice data model
Backend/Models/facturemodel.js - Vehicle data model
Backend/Models/voituremodel.js
Other components
- Renter
- Agency user
Connections 27
- Renter → Web app routes: opens
Frontend/src/App.tsx - Agency user → Web app routes: opens
Frontend/src/App.tsx - Web app routes → Home experience: routes to
Frontend/src/App.tsx - Web app routes → Car discovery: routes to
Frontend/src/App.tsx - Web app routes → Booking flow: routes to
Frontend/src/App.tsx - Web app routes → Client login: routes to
Frontend/src/App.tsx - Web app routes → Agency login: routes to
Frontend/src/App.tsx - Web app routes → Client portal: routes to
Frontend/src/App.tsx - Web app routes → Agency portal: routes to
Frontend/src/App.tsx - Client portal → Client accounts
- Agency portal → Agency accounts
- API server → Reservation routes: mounts
Backend/server.js - Reservation routes → Reservation lifecycle: dispatches
Backend/routes/reservationRoutes.js - Reservation routes → JWT authentication: protects routes
Backend/routes/reservationRoutes.js - Reservation lifecycle → Reservation data model: calls
Backend/Controllers/reservationcontroller.js - Client accounts → Client data model: calls
Backend/Controllers/clientcontroller.js - Agency accounts → Agency data model: calls
Backend/Controllers/agencecontroller.js - Vehicle management → Vehicle data model: calls
Backend/Controllers/voiturecontroller.js - Reservation lifecycle → Vehicle data model: uses
- Reservation history → History data model: calls
Backend/Controllers/reservationhistorycontroller.js - Invoicing → Invoice data model: calls
Backend/Controllers/facturecontroller.js - Client data model → MySQL connection: queries
Backend/Models/clientmodel.js - Agency data model → MySQL connection: queries
Backend/Models/agencemodel.js - Reservation data model → MySQL connection: queries
Backend/Models/reservationmodel.js - History data model → MySQL connection: queries
Backend/Models/reservationhistorymodel.js - Invoice data model → MySQL connection: queries
Backend/Models/facturemodel.js - Vehicle data model → MySQL connection: queries
Backend/Models/voituremodel.js