A scalable, multi-tenant cinema management platform built with the MERN Stack
Features β’ Tech Stack β’ Installation β’ Usage β’ API β’ Contributors
πΌοΈ View More Screenshots
| Page | Screenshot |
|---|---|
| Home | ![]() |
| Movie Listing | ![]() |
| Movie Details | ![]() |
| Seat Selection | ![]() |
| Payment | ![]() |
| Booking Confirmation | ![]() |
| User Profile | ![]() |
| Admin Dashboard | ![]() |
| Cinema-Admin Dashboard | ![]() |
|
|
|
|
|
|
| Frontend | Backend | Database | DevOps |
|---|---|---|---|
|
React 18 |
Node.js |
MongoDB |
Docker |
|
TypeScript |
Express.js |
Mongoose |
CI/CD |
|
Tailwind CSS |
Socket.io |
Redis (Cache) |
Jest |
| Category | Technologies |
|---|---|
| State Management | React Query (TanStack Query) |
| Form Handling | React Hook Form |
| HTTP Client | Axios |
| Authentication | JWT, bcryptjs |
| Validation | Joi |
| Payment | PayPal Checkout SDK |
| File Generation | jsPDF, html2canvas, QRCode |
| Testing | Jest, Supertest, React Testing Library |
graph TB
subgraph Client["π₯οΈ Frontend (React)"]
UI[UI Components]
RQ[React Query]
WS[WebSocket Client]
end
subgraph Server["βοΈ Backend (Express)"]
API[REST API]
Auth[Auth Middleware]
WSS[WebSocket Server]
end
subgraph Data["πΎ Data Layer"]
MongoDB[(MongoDB)]
Cache[(Redis Cache)]
end
subgraph External["π External Services"]
PayPal[PayPal API]
Email[SendGrid]
end
UI --> RQ --> API
WS <--> WSS
API --> Auth --> MongoDB
API --> Cache
API --> PayPal
API --> Email
- Node.js >= 18.x
- MongoDB >= 6.0 (or Docker)
- npm >= 9.x
# Clone the repository
git clone https://github.com/deaneeth/enterprise-cinema-booking-platform.git
cd enterprise-cinema-booking-platform
# Start all services
docker compose up -d
# Access the application
# Frontend: http://localhost:3000
# Backend API: http://localhost:5000
# MongoDB: localhost:27017π Step-by-step instructions
git clone https://github.com/deaneeth/enterprise-cinema-booking-platform.git
cd enterprise-cinema-booking-platform# Install root dependencies
npm install
# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm install# Backend (.env in /backend directory)
cp backend/.env.example backend/.envEdit backend/.env:
# Server
PORT=5000
NODE_ENV=development
# MongoDB
MONGODB_URI=mongodb://localhost:27017/cinema-booking
# JWT
JWT_SECRET=your-super-secret-key
JWT_EXPIRES_IN=7d
# PayPal (Optional - for payments)
PAYPAL_CLIENT_ID=your-paypal-client-id
PAYPAL_CLIENT_SECRET=your-paypal-client-secret
PAYPAL_MODE=sandbox
# Email (Optional - for verification)
SENDGRID_API_KEY=your-sendgrid-api-key
FROM_EMAIL=noreply@yourcinema.com# Using Docker
docker run -d -p 27017:27017 --name mongodb mongo:latest
# Or install MongoDB locally
# https://www.mongodb.com/docs/manual/installation/# Start backend (from /backend directory)
cd backend
npm run dev
# Start frontend (from /frontend directory - new terminal)
cd frontend
npm startAfter seeding the database (or first run), use these accounts:
| Role | Password | |
|---|---|---|
| Platform Admin | admin@gmail.com |
Admin123 |
| Cinema Admin | cinema@gmail.com |
Cinema123 |
| Regular User | user@gmail.com |
User123 |
journey
title Movie Booking Journey
section Browse
View Movies: 5: User
Select Movie: 5: User
View Showtimes: 5: User
section Book
Select Seats: 4: User
15-min Timer Starts: 3: System
Proceed to Payment: 4: User
section Pay
PayPal Checkout: 4: User
Confirm Payment: 5: PayPal
section Receive
Get QR Ticket: 5: System
Download PDF: 5: User
The API follows RESTful conventions with comprehensive documentation.
Development: http://localhost:5000/api
Production: https://api.your-domain.com/api
All protected endpoints require a Bearer token:
Authorization: Bearer <your-jwt-token>| Endpoint | Method | Description | Auth |
|---|---|---|---|
/auth/register |
POST | Register new user | β |
/auth/login |
POST | Login user | β |
/movies |
GET | List all movies | β |
/movies/:id |
GET | Get movie details | β |
/cinemas |
GET | List all cinemas | β |
/showtimes |
GET | Get showtimes | β |
/bookings |
POST | Create booking | β |
/bookings/:id |
GET | Get booking | β |
/payments/create-order |
POST | Create PayPal order | β |
/payments/capture |
POST | Capture payment | β |
π View Full API Documentation
See API_DOCUMENTATION.md for complete endpoint details, request/response schemas, and examples.
# Run all backend tests
cd backend
npm test
# Run unit tests only
npm run test:unit
# Run integration tests
npm run test:integration
# Run with coverage report
npm run test:coverage
# Run frontend tests
cd frontend
npm test| Module | Coverage |
|---|---|
| Controllers | ~80% |
| Services | ~85% |
| Models | ~90% |
| Middleware | ~75% |
enterprise-cinema-booking-platform/
βββ π backend/
β βββ π src/
β β βββ π config/ # Database & app configuration
β β βββ π controllers/ # Route handlers
β β βββ π middlewares/ # Auth, validation, error handling
β β βββ π models/ # Mongoose schemas
β β βββ π routes/ # API routes
β β βββ π services/ # Business logic
β β βββ π tests/ # Unit & integration tests
β β βββ π types/ # TypeScript definitions
β β βββ π utils/ # Helper functions
β β βββ π server.ts # Entry point
β βββ π package.json
β βββ π tsconfig.json
β
βββ π frontend/
β βββ π src/
β β βββ π components/ # Reusable UI components
β β βββ π contexts/ # React contexts
β β βββ π hooks/ # Custom hooks
β β βββ π pages/ # Page components
β β βββ π services/ # API client
β β βββ π types/ # TypeScript types
β β βββ π App.tsx # Root component
β βββ π package.json
β βββ π tailwind.config.js
β
βββ π docs/ # Documentation
βββ π docker-compose.yml # Docker configuration
βββ π .github/workflows/ # CI/CD pipelines
βββ π README.md
erDiagram
USER ||--o{ BOOKING : makes
USER ||--o{ REVIEW : writes
CINEMA ||--o{ SHOWTIME : has
CINEMA ||--o{ REVIEW : receives
MOVIE ||--o{ SHOWTIME : scheduled_in
MOVIE ||--o{ REVIEW : receives
SHOWTIME ||--o{ BOOKING : for
BOOKING ||--o| PAYMENT : has
USER {
ObjectId _id PK
string email UK
string password
string name
enum role
boolean isVerified
}
CINEMA {
ObjectId _id PK
string name
string location
array facilities
ObjectId adminId FK
}
MOVIE {
ObjectId _id PK
string title
string description
number duration
string genre
string poster
}
SHOWTIME {
ObjectId _id PK
ObjectId movieId FK
ObjectId cinemaId FK
datetime startTime
number price
array seats
}
BOOKING {
ObjectId _id PK
ObjectId userId FK
ObjectId showtimeId FK
array seats
enum status
number totalAmount
}
PAYMENT {
ObjectId _id PK
ObjectId bookingId FK
string paypalOrderId
number amount
enum status
}
Dineth Hettiarachchi Project Lead |
Wickramaarachchi B S Backend Developer |
Himasha Sandeepani Frontend Developer |
Kasun Madhusanka Full Stack Developer |
Kavindu Backend Developer |
Ashiru Frontend Developer |
Jayaweera HRK Developer |
Rashmi Edirisinghe Developer |
This project is licensed under the MIT License - see the LICENSE file for details.
- PayPal Developer - Payment integration
- Socket.io - Real-time communication
- TailwindCSS - Styling framework
- React Query - Data fetching
- MongoDB - Database
β Star this repository if you found it helpful!











