How ahtesham-56/event-booking-system works
This is an event-booking application: visitors browse events, select seats, and book; signed-in users manage bookings and profiles; administrators manage events, bookings, users, venues, reports, and settings. The frontend routes users to these workflows and calls an API; the Express backend routes requests through authorization and controllers to MongoDB models. Several frontend capabilities are established by the route table and source index, but their internal behavior was not sampled; those links are omitted rather than inferred.
Main entry points: AppRoutes.jsx Page routing · server.js Express API · auth.js JWT authorization · eventRoutes.js Event endpoints
Components 28
Web application
- Page routing
frontend/src/routes/AppRoutes.jsx - Event discovery
frontend/src/pages/Events.jsx - Event details
frontend/src/pages/EventDetails.jsx - Seat booking
frontend/src/pages/BookingPage.jsx - Booking outcome
frontend/src/pages/BookingConfirmation.jsx - My bookings
frontend/src/pages/MyBookings.jsx - Admin operations
frontend/src/pages/admin - HTTP services
frontend/src/services/api.js - Event service
frontend/src/services/eventService.js - Booking service
frontend/src/services/bookingService.js
API and access
- Express API
backend/server.js - Event endpoints
backend/routes/eventRoutes.js - Booking endpoints
backend/routes/bookingRoutes.js - Authentication endpoints
backend/routes/authRoutes.js - JWT authorization
backend/middleware/auth.js - Admin authorization
backend/middleware/admin.js - Database connection
backend/config/db.js
Booking domain
- Event operations
backend/controllers/eventController.js - Event records
backend/models/Event.js - Booking operations
backend/controllers/bookingController.js - Booking records
backend/models/Booking.js
Accounts
- Sign in and register
frontend/src/pages/Login.jsx - Profile and settings
frontend/src/pages/UsersSettings.jsx - Authentication service
frontend/src/services/authService.js - User endpoints
backend/routes/userRoutes.js - User management
backend/controllers/userController.js - User records
backend/models/User.js
Other components
- Visitor
Connections 39
- Visitor → Page routing: opens
- Page routing → Event discovery: routes to
frontend/src/routes/AppRoutes.jsx - Page routing → Event details: routes to
frontend/src/routes/AppRoutes.jsx - Page routing → Seat booking: routes to
frontend/src/routes/AppRoutes.jsx - Page routing → Booking outcome: routes to
frontend/src/routes/AppRoutes.jsx - Page routing → My bookings: routes to
frontend/src/routes/AppRoutes.jsx - Page routing → Admin operations: routes to
frontend/src/routes/AppRoutes.jsx - Page routing → Sign in and register: routes to
frontend/src/routes/AppRoutes.jsx - Page routing → Profile and settings: routes to
frontend/src/routes/AppRoutes.jsx - Event discovery → Event service: uses
- Event details → Event service: calls
frontend/src/pages/EventDetails.jsx - Seat booking → Event service: calls
frontend/src/pages/BookingPage.jsx - Seat booking → Booking service: calls
frontend/src/pages/BookingPage.jsx - My bookings → Booking service: uses
- Sign in and register → Authentication service: registers
- Event service → HTTP services: sends requests
frontend/src/services/eventService.js - Booking service → HTTP services: sends requests
frontend/src/services/bookingService.js - Authentication service → HTTP services: sends requests
frontend/src/services/authService.js - HTTP services → Express API: HTTP requests
- Express API → Database connection: connects
backend/server.js - Express API → Authentication endpoints: mounts
backend/server.js - Express API → Event endpoints: mounts
backend/server.js - Express API → Booking endpoints: mounts
backend/server.js - Express API → User endpoints: mounts
backend/server.js - Event endpoints → Event operations: dispatches
backend/routes/eventRoutes.js - Booking endpoints → Booking operations: dispatches
backend/routes/bookingRoutes.js - User endpoints → User management: dispatches
backend/routes/userRoutes.js - Booking endpoints → JWT authorization: protects routes
backend/routes/bookingRoutes.js - Event endpoints → JWT authorization: protects admin routes
backend/routes/eventRoutes.js - Event endpoints → Admin authorization: checks admin
backend/routes/eventRoutes.js - User endpoints → JWT authorization: protects routes
backend/routes/userRoutes.js - User endpoints → Admin authorization: checks admin
backend/routes/userRoutes.js - Authentication endpoints → JWT authorization: uses
- JWT authorization → User records: loads user
backend/middleware/auth.js - User management → User records: reads and writes
backend/controllers/userController.js - Event operations → Event records: reads and writes
backend/controllers/eventController.js - Event operations → Booking records: reads bookings
backend/controllers/eventController.js - Booking operations → Booking records: reads and writes
backend/controllers/bookingController.js - Booking operations → Event records: updates availability
backend/controllers/bookingController.js