How pandeymohit20/rentcar-backend works
RentCar is a multi-tenant car-rental backend API. Its central user-facing flow exposes versioned REST endpoints for authentication, fleet discovery and availability, bookings, payments, and related records; staff-facing domains support fleet and platform operations. The README documents a controller → service → repository design and Prisma/MySQL persistence. The route registry and some controllers are excerpted, but most domain implementations are not, so links between domain stages are limited to documented capabilities rather than inferred calls.
Main entry points: index.js API router · app.js Express app · auth Auth · authenticate.js Authentication
Components 23
API foundation
- Express app
src/app.js - API router
src/routes/index.js - Prisma / MySQL
src/config/database.js
Identity and access
- Authentication
src/middlewares/authenticate.js - Auth
src/modules/auth - User accounts
src/modules/users
Rental lifecycle
- Fleet catalog
src/modules/cars - Availability
src/modules/availability - Pricing
src/modules/pricing - Bookings
src/modules/bookings - Booking reads
src/modules/bookingReads - Payments
src/modules/payments - Refunds
src/modules/refunds - Wallet
src/modules/wallet - Invoices
src/modules/invoices
Platform operations
- Vendors
src/modules/vendors - Locations
src/modules/locations - Inventory
src/modules/inventory - KYC
src/modules/kyc - Analytics and reports
src/modules/analytics - Customer support
src/modules/support - Reviews
src/modules/reviews
Other components
- API clients
Connections 20
- API clients → Express app: send requests
README.md - Express app → API router: mounts API
src/app.js - API router → Auth: mounts routes
src/routes/index.js - API router → User accounts: mounts routes
src/routes/index.js - API router → Fleet catalog: mounts routes
src/routes/index.js - API router → Availability: mounts routes
src/routes/index.js - API router → Bookings: mounts routes
src/routes/index.js - API router → Payments: mounts routes
src/routes/index.js - API router → Booking reads: mounts routes
src/routes/index.js - API router → Refunds: mounts routes
src/routes/index.js - API router → Invoices: mounts routes
src/routes/index.js - API router → Vendors: mounts routes
src/routes/index.js - API router → Locations: mounts routes
src/routes/index.js - API router → Inventory: mounts routes
src/routes/index.js - API router → KYC: mounts routes
src/routes/index.js - API router → Analytics and reports: mounts routes
src/routes/index.js - API router → Customer support: mounts routes
src/routes/index.js - API router → Reviews: mounts routes
src/routes/index.js - Authentication → Auth: loads auth constants
src/middlewares/authenticate.js - Express app → Prisma / MySQL: configures through modules