How nijamgouri60/movie_ticket_booking works
CineBook is a React and Express movie-ticket booking platform. Customers browse movies, cinemas, and showtimes, inspect a show’s seat map, hold available seats, confirm a booking, and review their tickets; accounts are handled through registration and login. The backend also exposes admin routes and uses Socket.IO for live seat-state updates. The graph follows the sampled frontend and backend wiring; admin internals and some frontend socket behavior are represented only at the documented or tree-supported subsystem level.
Main entry points: server.js Express server · bookings.js Bookings · shows.js Showtimes · auth.js Authentication
Components 21
Customer app
- React app
frontend/src/App.jsx - API client
frontend/src/api.js - Socket client
frontend/src/socket.js
API and access
- Express server
backend/server.js - Authentication
backend/routes/auth.js - JWT access
backend/middleware/auth.js - JWT utility
backend/utils/jwt.js - Admin routes
backend/routes/admin.js - User records
backend/models/User.js
Movie scheduling
- Movie catalog
backend/routes/movies.js - Cinemas
backend/routes/cinemas.js - Showtimes
backend/routes/shows.js - Movie records
backend/models/Movie.js - Cinema records
backend/models/Cinema.js - Show records
backend/models/Show.js
Seat booking
- Bookings
backend/routes/bookings.js - Seat inventory
backend/models/ShowSeat.js - Booking records
backend/models/Booking.js - Socket.IO
backend/server.js
Other components
- Customer
- MongoDB
Connections 32
- Customer → React app: uses
- React app → API client: requests data
- API client → Express server: HTTP requests
- Express server → Authentication: dispatches
- Express server → Movie catalog: dispatches
- Express server → Cinemas: dispatches
- Express server → Showtimes: dispatches
- Express server → Bookings: dispatches
- Express server → Admin routes: dispatches
- Authentication → User records: reads and writes
- Authentication → JWT utility: signs token
- Authentication → JWT access: protects profile
- Movie catalog → Movie records: reads
- Cinemas → Cinema records: reads
- Showtimes → Show records: reads
- Showtimes → Movie records: reads
- Showtimes → Cinema records: reads
- Showtimes → Seat inventory: reads availability
- Bookings → JWT access: checks access
- Admin routes → JWT access: checks access
- Bookings → Show records: reads show
- Bookings → Seat inventory: holds and books
- Bookings → Booking records: creates and reads
- User records → MongoDB: persists
- Movie records → MongoDB: persists
- Cinema records → MongoDB: persists
- Show records → MongoDB: persists
- Seat inventory → MongoDB: persists
- Booking records → MongoDB: persists
- Bookings → Socket.IO: emits seat updates
- Socket client → Socket.IO: joins show rooms
- React app → Socket client: uses live updates