How fatima0253/garage-platform works
FixDrive is a Bahrain garage-services platform connecting customers with garages and rental cars, while giving garage owners management tools. Customers browse and inspect garages, check appointment availability, then book service with optional pickup and a rental; they can track bookings and review completed work. Owners register a garage and manage its service offerings and hours. Authentication and role checks protect account workflows; admin routes provide platform oversight. The Worker mounts the domain APIs, which use Prisma over D1. Several route and page implementations were not sampled, so their documented responsibilities are shown without speculative internal call chains.
Main entry points: App.tsx Web app routes · index.ts HTTP API · api.ts API client · db.ts Prisma access
Components 30
Customer experience
- Web app routes
client/src/App.tsx - Garage discovery
client/src/pages/Garages.tsx - Garage details
client/src/pages/GarageDetail.tsx - Service booking
client/src/pages/Booking.tsx - Booking tracking
client/src/pages/MyBookings.tsx - Booking detail
client/src/pages/BookingDetail.tsx - Pickup options
client/src/pages/Pickup.tsx - Rental browsing
client/src/pages/Rentals.tsx - API client
client/src/lib/api.ts
Garage operations
- Garage onboarding
client/src/pages/RegisterGarage.tsx - Owner dashboard
client/src/pages/OwnerDashboard.tsx - Admin console
client/src/pages/Admin.tsx
Worker API
- Customer reviews
server/src/routes/reviews.ts - HTTP API
server/src/index.ts - Garage management
server/src/routes/garages.ts - Service catalog
server/src/routes/services.ts - Slot availability
server/src/routes/availability.ts - Booking lifecycle
server/src/routes/bookings.ts - Customer cars
server/src/routes/cars.ts - Rental inventory
server/src/routes/rentals.ts - Administration
server/src/routes/admin.ts
Identity
- Session client
client/src/auth.ts - Role guards
client/src/components/RequireAuth.tsx - Authentication
server/src/auth.ts
Persistence and messaging
- Prisma access
server/src/db.ts - Cloudflare D1
- Email notifications
server/src/lib/notify.ts
Other components
- Customer
- Garage owner
- Email provider
Connections 47
- Customer → Web app routes: uses
- Garage owner → Web app routes: uses
- Web app routes → Garage discovery: routes to
- Web app routes → Garage details: routes to
- Web app routes → Service booking: routes to
- Web app routes → Booking tracking: routes to
- Web app routes → Booking detail: routes to
- Web app routes → Pickup options: routes to
- Web app routes → Rental browsing: routes to
- Web app routes → Garage onboarding: routes to
- Web app routes → Owner dashboard: routes to
- Web app routes → Admin console: routes to
- Web app routes → Session client: reads session
- Web app routes → Role guards: protects routes
- Garage discovery → API client: requests garages
- Garage details → API client: requests details
- Service booking → API client: submits booking
- Booking tracking → API client: loads bookings
- Booking detail → API client: loads booking
- Pickup options → API client: loads options
- Rental browsing → API client: loads rentals
- Garage onboarding → API client: creates garage
- Owner dashboard → API client: manages garage
- Admin console → API client: requests admin
- API client → HTTP API: HTTP requests
- Session client → Authentication: authenticates
- Role guards → Session client: checks session
- HTTP API → Authentication: handles auth
- HTTP API → Garage management: dispatches
- HTTP API → Service catalog: dispatches
- HTTP API → Slot availability: dispatches
- HTTP API → Booking lifecycle: dispatches
- HTTP API → Customer cars: dispatches
- HTTP API → Rental inventory: dispatches
- HTTP API → Customer reviews: dispatches
- HTTP API → Administration: dispatches
- Garage management → Prisma access: queries
- Service catalog → Prisma access: queries
- Slot availability → Prisma access: queries
- Booking lifecycle → Prisma access: reads and writes
- Customer cars → Prisma access: reads and writes
- Rental inventory → Prisma access: queries
- Customer reviews → Prisma access: reads and writes
- Administration → Prisma access: reads and writes
- Prisma access → Cloudflare D1: persists data
- Booking lifecycle → Email notifications: may notify
- Email notifications → Email provider: sends email