How pragalathan-22/travel-booking works
This is a vehicle-booking platform with an Express/MongoDB backend, a browser-based admin console, and a driver mobile app; the user-app tree is present but its implementation is not shown. The main workflow is driver registration and vehicle submission, admin review, then booking and trip-status updates. Backend route/controller excerpts establish the API path and booking/vehicle behavior; major frontend pages and driver screens are represented from the source index, but their unsampled calls are not asserted. No README was provided, so capability coverage is based on the source tree and index.
Main entry points: App.jsx Admin web router · server.js API server · axios.js Web API client · vehicleRoutes.js Vehicle endpoints
Components 34
API and data
- API server
backend/server.js - Database connection
backend/config/db.js - Authentication routes
backend/routes/authRoutes.js - Authentication
backend/controllers/authController.js - Token authentication
backend/middleware/authMiddleware.js - Role authorization
backend/middleware/roleMiddleware.js - User records
backend/models/User.js - Vehicle records
backend/models/Vehicle.js - Booking records
backend/models/Booking.js
Fleet operations
- Vehicle endpoints
backend/routes/vehicleRoutes.js - Fleet management
backend/controllers/vehicleController.js - Document uploads
backend/middleware/uploadMiddleware.js
Booking lifecycle
- Booking endpoints
backend/routes/bookingRoutes.js - Booking and trip state
backend/controllers/bookingController.js
Admin console
- Dashboard endpoints
backend/routes/dashboardRoutes.js - Dashboard metrics
backend/controllers/dashboardController.js - User endpoints
backend/routes/userRoutes.js - User management
backend/controllers/userController.js - Admin web router
frontend/src/App.jsx - Admin dashboard layout
frontend/src/layouts/DashboardLayout.jsx - Admin sign-in
frontend/src/pages/Login.jsx - Operations dashboard
frontend/src/pages/Dashboard.jsx - Vehicle review
frontend/src/pages/VehiclesPage.jsx - Driver management
frontend/src/pages/DriversPage.jsx - Booking management
frontend/src/pages/BookingsPage.jsx - User management page
frontend/src/pages/UsersPage.jsx - Web API client
frontend/src/api/axios.js
Driver app
- Driver app entry
driver-app/App.js - Driver session
driver-app/src/context/AuthContext.js - Mobile API client
driver-app/src/api/client.js - Driver navigation
driver-app/src/navigation/RootNavigator.js
Other components
- Administrator
- Driver
- Rider
Connections 47
- API server → Database connection: connects
backend/server.js - API server → Authentication routes: mounts
backend/server.js - API server → Vehicle endpoints: mounts
backend/server.js - API server → Booking endpoints: mounts
backend/server.js - API server → Dashboard endpoints: mounts
backend/server.js - API server → User endpoints: mounts
backend/server.js - Authentication routes → Authentication: dispatches
backend/routes/authRoutes.js - Authentication → User records: reads/writes
backend/controllers/authController.js - Vehicle endpoints → Fleet management: dispatches
backend/routes/vehicleRoutes.js - Vehicle endpoints → Token authentication: authenticates
backend/routes/vehicleRoutes.js - Vehicle endpoints → Role authorization: checks role
backend/routes/vehicleRoutes.js - Vehicle endpoints → Document uploads: uploads files
backend/routes/vehicleRoutes.js - Fleet management → Vehicle records: reads/writes
backend/controllers/vehicleController.js - Booking endpoints → Booking and trip state: dispatches
backend/routes/bookingRoutes.js - Booking endpoints → Token authentication: authenticates
backend/routes/bookingRoutes.js - Booking endpoints → Role authorization: checks role
backend/routes/bookingRoutes.js - Booking and trip state → Booking records: reads/writes
backend/controllers/bookingController.js - Booking and trip state → Vehicle records: reads/updates
backend/controllers/bookingController.js - Dashboard endpoints → Dashboard metrics: dispatches
backend/routes/dashboardRoutes.js - Dashboard endpoints → Token authentication: authenticates
backend/routes/dashboardRoutes.js - Dashboard endpoints → Role authorization: checks role
backend/routes/dashboardRoutes.js - Dashboard metrics → User records: queries
backend/controllers/dashboardController.js - Dashboard metrics → Vehicle records: queries
backend/controllers/dashboardController.js - Dashboard metrics → Booking records: queries
backend/controllers/dashboardController.js - User endpoints → User management: dispatches
backend/routes/userRoutes.js - User endpoints → Token authentication: authenticates
backend/routes/userRoutes.js - User endpoints → Role authorization: checks role
backend/routes/userRoutes.js - User management → User records: reads/writes
backend/controllers/userController.js - Admin web router → Admin sign-in: routes to
frontend/src/App.jsx - Admin web router → Admin dashboard layout: routes to
frontend/src/App.jsx - Admin web router → Operations dashboard: routes to
frontend/src/App.jsx - Admin web router → Vehicle review: routes to
frontend/src/App.jsx - Admin web router → Driver management: routes to
frontend/src/App.jsx - Admin web router → Booking management: routes to
frontend/src/App.jsx - Admin web router → User management page: routes to
frontend/src/App.jsx - Admin sign-in → Web API client: uses API
frontend/src/pages/Login.jsx - Operations dashboard → Web API client: uses API
frontend/src/pages/Dashboard.jsx - Vehicle review → Web API client: uses API
frontend/src/pages/VehiclesPage.jsx - Driver management → Web API client: uses API
frontend/src/pages/DriversPage.jsx - Booking management → Web API client: uses API
frontend/src/pages/BookingsPage.jsx - User management page → Web API client: uses API
frontend/src/pages/UsersPage.jsx - Driver app entry → Driver session: provides session
driver-app/App.js - Driver app entry → Driver navigation: renders
driver-app/App.js - Driver session → Mobile API client: requests auth
driver-app/src/context/AuthContext.js - Driver → Driver app entry: uses
- Rider → Booking endpoints: requests bookings
- Administrator → Admin web router: operates