How kashishbhutia/booking-platform works
BookingPlatform is a full-stack event-ticket booking application. Users browse and filter events, inspect details, select seats, create a pending booking, and proceed to payment; they can also manage bookings and profiles. Organizers create, edit, publish, and cancel events. The backend separates API routes from authentication, event, booking, and seat-hold services, with PostgreSQL accessed through Prisma and scheduled cleanup jobs. The README documents reviews, coupons, notifications, and payment-gateway readiness, but their implementation is not established by the sampled source.
Main entry points: routes.tsx Page routing · database.ts PostgreSQL via Prisma · BookingPage.tsx Seat selection · event.api.ts Event API client
Components 29
Event discovery
- Web application
BookingPlatform/frontend/src/App.tsx - Page routing
BookingPlatform/frontend/src/routes.tsx - Event browsing
BookingPlatform/frontend/src/pages/Events.tsx - Event details
BookingPlatform/frontend/src/pages/EventDetails.tsx - Organizer tools
BookingPlatform/frontend/src/pages/organizer/OrganizerDashboard.tsx - Event API client
BookingPlatform/frontend/src/api/event.api.ts
Ticket booking
- Seat selection
BookingPlatform/frontend/src/pages/BookingPage.tsx - Interactive seat map
BookingPlatform/frontend/src/components/booking/SeatGrid.tsx - Payment page
BookingPlatform/frontend/src/pages/PaymentPage.tsx - Booking history
BookingPlatform/frontend/src/pages/MyBookings.tsx - Booking API client
BookingPlatform/frontend/src/api/booking.api.ts
Accounts and operations
- Authentication state
BookingPlatform/frontend/src/context/AuthContext.tsx - Authentication client
BookingPlatform/frontend/src/api/auth.api.ts - User API client
BookingPlatform/frontend/src/api/user.api.ts
Backend API
- Express API
BookingPlatform/backend/src/index.ts - API route aggregation
BookingPlatform/backend/src/routes/index.ts - Event endpoints
BookingPlatform/backend/src/routes/event.routes.ts - Booking endpoints
BookingPlatform/backend/src/routes/booking.routes.ts - Authentication endpoints
BookingPlatform/backend/src/routes/auth.routes.ts - User endpoints
BookingPlatform/backend/src/routes/user.routes.ts - Venue endpoints
BookingPlatform/backend/src/routes/venue.routes.ts
Backend services
- Authentication service
BookingPlatform/backend/src/services/auth.service.ts - Event service
BookingPlatform/backend/src/services/event.service.ts - Booking service
BookingPlatform/backend/src/services/booking.service.ts - Seat hold service
BookingPlatform/backend/src/services/seatLock.service.ts - PostgreSQL via Prisma
BookingPlatform/backend/src/config/database.ts - Scheduled cleanup
BookingPlatform/backend/src/jobs/cron.ts
Other components
- Visitor / user
- Payment provider
Connections 31
- Visitor / user → Web application: uses
BookingPlatform/frontend/src/App.tsx - Web application → Page routing: renders
BookingPlatform/frontend/src/App.tsx - Page routing → Event browsing: routes to
BookingPlatform/frontend/src/routes.tsx - Page routing → Event details: routes to
BookingPlatform/frontend/src/routes.tsx - Page routing → Seat selection: protects route
BookingPlatform/frontend/src/routes.tsx - Page routing → Payment page: protects route
BookingPlatform/frontend/src/routes.tsx - Page routing → Booking history: protects route
BookingPlatform/frontend/src/routes.tsx - Page routing → Organizer tools: role-gates
BookingPlatform/frontend/src/routes.tsx - Event browsing → Event API client: requests events
BookingPlatform/frontend/src/pages/Events.tsx - Event details → Event API client: requests event
BookingPlatform/frontend/src/pages/EventDetails.tsx - Organizer tools → Event API client: manages events
BookingPlatform/frontend/src/pages/organizer/OrganizerDashboard.tsx - Seat selection → Interactive seat map: renders seats
BookingPlatform/frontend/src/pages/BookingPage.tsx - Seat selection → Event API client: loads availability
BookingPlatform/frontend/src/pages/BookingPage.tsx - Seat selection → Booking API client: submits booking
BookingPlatform/frontend/src/pages/BookingPage.tsx - Payment page → Booking API client: updates booking
BookingPlatform/frontend/src/pages/PaymentPage.tsx - Booking history → Booking API client: loads bookings
BookingPlatform/frontend/src/pages/MyBookings.tsx - Authentication state → Authentication client: authenticates
BookingPlatform/frontend/src/context/AuthContext.tsx - Authentication endpoints → Authentication service: dispatches to
BookingPlatform/backend/src/routes/auth.routes.ts - Event endpoints → Event service: dispatches to
BookingPlatform/backend/src/routes/event.routes.ts - Booking endpoints → Booking service: dispatches to
BookingPlatform/backend/src/routes/booking.routes.ts - User endpoints → Authentication service: dispatches to
- Venue endpoints → PostgreSQL via Prisma: queries
BookingPlatform/backend/src/routes/venue.routes.ts - Authentication service → PostgreSQL via Prisma: reads and writes
BookingPlatform/backend/src/services/auth.service.ts - Booking service → PostgreSQL via Prisma: reads and writes
BookingPlatform/backend/src/services/booking.service.ts - Seat hold service → PostgreSQL via Prisma: locks seat records
BookingPlatform/backend/src/services/seatLock.service.ts - Event service → PostgreSQL via Prisma: reads and writes
BookingPlatform/backend/src/services/event.service.ts - Booking service → Seat hold service: uses holds
BookingPlatform/backend/src/services/booking.service.ts - Express API → API route aggregation: mounts routes
- Express API → Scheduled cleanup: starts jobs
- Scheduled cleanup → PostgreSQL via Prisma: cleans records
BookingPlatform/backend/src/jobs/cron.ts - Payment page → Payment provider: payment integration