How faheemahamed/vrms works
This is a vehicle-rental marketplace: customers discover vehicles, request rentals, manage bookings, and review completed rentals; owners list vehicles and manage booking status. The React client routes users into these flows and sends authenticated API requests to an Express backend, whose controllers enforce domain rules and persist records in MongoDB. The README also documents notifications for eligible cancellations. Backend route/controller wiring and several domain calls are evidenced in excerpts; some frontend and notification behavior is represented from documented capabilities, so unsampled links are omitted or marked unverified.
Main entry points: App.jsx Client routes · axiosInstance.js HTTP client · app.js API mounting · authMiddleware.js JWT and roles
Components 29
Rental web client
- Client routes
client/src/App.jsx - Sign in/up
client/src/pages/Login.jsx - Vehicle discovery
client/src/pages/Home.jsx - Vehicle details
client/src/pages/VehicleDetails.jsx - Rental dashboard
client/src/pages/Dashboard.jsx - Fleet management
client/src/components/OwnerVehicles.jsx - Navigation
client/src/components/Navbar.jsx - HTTP client
client/src/api/axiosInstance.js
API and access
- HTTP server
backend/server.js - API mounting
backend/src/app.js - Auth routes
backend/src/routes/authRoutes.js - JWT and roles
backend/src/middleware/authMiddleware.js - Vehicle routes
backend/src/routes/vehicleRoutes.js - Booking routes
backend/src/routes/bookingRoutes.js - Review routes
backend/src/routes/reviewRoutes.js - Notification routes
backend/src/routes/notificationRoutes.js
Rental operations
- Authentication
backend/src/controllers/authController.js - Vehicle listings
backend/src/controllers/vehicleController.js - Booking lifecycle
backend/src/controllers/bookingController.js - Rental reviews
backend/src/controllers/reviewController.js - Notifications
backend/src/controllers/notificationController.js
MongoDB records
- User records
backend/src/models/User.js - Vehicle records
backend/src/models/Vehicle.js - Booking records
backend/src/models/Booking.js - Review records
backend/src/models/Review.js - Notification records
backend/src/models/Notification.js
Other components
- Customer
- Vehicle owner
- MongoDB
Connections 47
- Customer → Client routes: uses
README.md - Vehicle owner → Client routes: uses
README.md - Client routes → Vehicle discovery: routes to
client/src/App.jsx - Client routes → Sign in/up: routes to
client/src/App.jsx - Client routes → Vehicle details: routes to
client/src/App.jsx - Client routes → Rental dashboard: protects route
client/src/App.jsx - Client routes → Navigation: renders
client/src/App.jsx - Vehicle discovery → HTTP client: requests listings
client/src/pages/Home.jsx - Vehicle details → HTTP client: requests details
client/src/pages/VehicleDetails.jsx - Sign in/up → HTTP client: submits credentials
README.md - Rental dashboard → HTTP client: loads rentals
client/src/pages/Dashboard.jsx - Rental dashboard → Fleet management: renders
client/src/pages/Dashboard.jsx - Fleet management → HTTP client: manages listings
client/src/components/OwnerVehicles.jsx - Navigation → HTTP client: requests account
client/src/components/Navbar.jsx - HTTP client → HTTP server: sends API requests
client/src/api/axiosInstance.js - HTTP server → API mounting: starts
backend/server.js - API mounting → Auth routes: mounts
backend/src/app.js - API mounting → Vehicle routes: mounts
backend/src/app.js - API mounting → Booking routes: mounts
backend/src/app.js - API mounting → Review routes: mounts
backend/src/app.js - API mounting → Notification routes: mounts
backend/src/app.js - Auth routes → Authentication: dispatches
backend/src/routes/authRoutes.js - Auth routes → JWT and roles: protects
backend/src/routes/authRoutes.js - Vehicle routes → Vehicle listings: dispatches
backend/src/routes/vehicleRoutes.js - Vehicle routes → JWT and roles: protects
backend/src/routes/vehicleRoutes.js - Booking routes → Booking lifecycle: dispatches
backend/src/routes/bookingRoutes.js - Booking routes → JWT and roles: protects
backend/src/routes/bookingRoutes.js - Review routes → Rental reviews: dispatches
backend/src/routes/reviewRoutes.js - Review routes → JWT and roles: protects
backend/src/routes/reviewRoutes.js - Notification routes → Notifications: dispatches
backend/src/routes/notificationRoutes.js - Notification routes → JWT and roles: protects
backend/src/routes/notificationRoutes.js - JWT and roles → User records: loads user
backend/src/middleware/authMiddleware.js - Authentication → User records: reads/writes
backend/src/controllers/authController.js - Vehicle listings → Vehicle records: reads/writes
backend/src/controllers/vehicleController.js - Vehicle listings → Booking records: checks availability
backend/src/controllers/vehicleController.js - Booking lifecycle → Vehicle records: loads vehicle
backend/src/controllers/bookingController.js - Booking lifecycle → Booking records: creates and updates
backend/src/controllers/bookingController.js - Booking lifecycle → User records: loads customer
backend/src/controllers/bookingController.js - Booking lifecycle → Notification records: creates cancellation notice
backend/src/controllers/bookingController.js - Rental reviews → Booking records: checks completion
backend/src/controllers/reviewController.js - Rental reviews → Review records: reads/writes
backend/src/controllers/reviewController.js - Notifications → Notification records: reads/updates
backend/src/controllers/notificationController.js - User records → MongoDB: persists
- Vehicle records → MongoDB: persists
- Booking records → MongoDB: persists
- Review records → MongoDB: persists
- Notification records → MongoDB: persists