How omdarentcar/orc works
Omda Rent Car is a car-rental platform with a public vehicle-browsing and booking experience and an authenticated admin console. The main customer path is browsing/filtering cars, checking a car’s approved booking dates, and submitting a booking; administrators manage cars and booking status and monitor dashboard notifications. The graph includes the documented real-time and image-management capabilities. Several page and route implementations are unsampled, so their internal call wiring is shown only where supported by the application structure and README.
Main entry points: api.ts API client · index.ts Express API · App.tsx Client router · prisma.ts Prisma client
Components 24
Customer experience
- Client router
client/src/App.tsx - Car discovery
client/src/pages/Home/HomePage.tsx - Booking form
client/src/pages/Home/BookingModal.tsx - API client
client/src/services/api.ts
Admin console
- Admin login
client/src/pages/Login/LoginPage.tsx - Auth state
client/src/context/AuthContext.tsx - Admin workspace
client/src/pages/Admin/AdminLayout.tsx - Car management
client/src/pages/Admin/Cars.tsx - Booking management
client/src/pages/Admin/Bookings.tsx - Dashboard
client/src/pages/Admin/Dashboard.tsx - Notifications
client/src/context/NotificationsContext.tsx
API and domain
- Express API
server/src/index.ts - Auth routes
server/src/routes/auth.ts - Car routes
server/src/routes/cars.ts - Booking routes
server/src/routes/bookings.ts - Dashboard routes
server/src/routes/dashboard.ts - Token verification
server/src/middleware/auth.ts
Persistence and integrations
- Prisma client
server/src/lib/prisma.ts - PostgreSQL
- Cloudinary media
server/src/services/cloudinary.ts - Socket server
server/src/socket.ts - Socket client
client/src/services/socket.ts
Other components
- Renter
- Administrator
Connections 36
- Renter → Client router: opens
- Client router → Car discovery: routes to
- Car discovery → API client: requests cars
- Car discovery → Booking form: opens booking
- Booking form → API client: submits booking
- Administrator → Client router: opens admin
- Client router → Admin login: routes to
- Admin login → Auth state: authenticates
- Auth state → API client: requests identity
- Client router → Admin workspace: protects routes
- Admin workspace → Car management: hosts
- Admin workspace → Booking management: hosts
- Admin workspace → Dashboard: hosts
- Car management → API client: manages cars
- Booking management → API client: manages bookings
- Dashboard → API client: loads stats
- Notifications → API client: loads and updates
- Notifications → Socket client: subscribes
- API client → Express API: HTTP requests
- Express API → Auth routes: mounts
- Express API → Car routes: mounts
- Express API → Booking routes: mounts
- Express API → Dashboard routes: mounts
- Auth routes → Token verification: guards admin
- Car routes → Token verification: guards admin writes
- Booking routes → Token verification: guards admin actions
- Dashboard routes → Token verification: guards admin
- Auth routes → Prisma client: reads and updates
- Car routes → Prisma client: reads and writes
- Booking routes → Prisma client: reads and writes
- Dashboard routes → Prisma client: reads stats
- Prisma client → PostgreSQL: queries
- Car routes → Cloudinary media: stores car images
- Express API → Socket server: initializes
- Socket client → Socket server: connects
- Socket server → Notifications: booking updates