A comprehensive, full-stack cinema management and ticket booking platform built with modern web technologies. The system provides a seamless experience for customers to browse movies and book tickets, while offering administrators powerful tools to manage cinema operations.
CineMin is a complete cinema booking solution consisting of three main components:
- User Frontend - Customer-facing web application for browsing movies, selecting showtimes, and booking tickets. Find more in user-frontend/README.md
- Admin Frontend - Administrative dashboard for managing movies, showtimes, bookings, and business analytics. Find more in admin-frontend/README.md
- Backend API - RESTful API server handling business logic, authentication, and data management. Find more in backend/README.md
- Browse current and upcoming movies with detailed information
- Search and filter movies by genre, rating, and release date
- View cinema locations and available showtimes
- Interactive seat selection with real-time availability
- Multiple payment methods support
- Apply discount vouchers during checkout
- Digital tickets with QR codes
- User profile and booking history management
- Cinema reviews and ratings
- Real-time dashboard with business metrics and KPIs
- Movie management (CRUD operations)
- Showtime scheduling and management
- Cinema room configuration and seat layout management
- Booking oversight and management
- User account management
- Promotion and voucher creation
- Revenue and performance analytics
- Detailed business reports
- Framework: React 19.x
- Language: TypeScript 5.9.x
- Build Tool: Vite 7.x
- Routing: React Router DOM 7.x
- State Management: Redux Toolkit, TanStack Query (React Query)
- UI Framework: Tailwind CSS 4.x
- Form Management: React Hook Form with Zod validation
- Charts: Recharts
- Icons: Lucide React, React Icons
- Runtime: Node.js
- Database: PostgreSQL (via Neon DB)
- ORM: Prisma
- Authentication: JWT + Passport.js (Google OAuth)
- Caching: Redis
- API Architecture: RESTful
CineMin/
├── user-frontend/ # Customer-facing web application
│ ├── src/
│ ├── public/
│ ├── Dockerfile
│ └── README.md # User frontend documentation
├── admin-frontend/ # Administrative dashboard
│ ├── src/
│ ├── public/
│ ├── Dockerfile
│ └── README.md # Admin frontend documentation
├── backend/ # RESTful API server
│ ├── src/
│ ├── prisma/
│ ├── docs/
│ ├── Dockerfile
│ └── README.md # Backend API documentation
├── backup/ # Database backups
├── docker-compose.yaml # Docker orchestration configuration
├── DOCKER_SETUP.md # Docker setup guide
└── README.md # This file
- Node.js: 18+ (recommended: 20+)
- npm: 9+
- Docker: 20.10+ (for containerized deployment)
- Docker Compose: 2.0+ (for multi-container setup)
- PostgreSQL: 14+ (if running without Docker)
- Redis: 6+ (if running without Docker)
The easiest way to run the entire application is using Docker Compose:
# Start all services (backend, user-frontend, admin-frontend, redis)
docker-compose up --build
# Or run in background
docker-compose up --build -d
# Stop all services
docker-compose downAccess the applications:
- User Frontend: http://localhost:5173
- Admin Frontend: http://localhost:5174
- Backend API: http://localhost:3000
For detailed Docker setup instructions, see DOCKER_SETUP.md.
If you prefer to run services individually without Docker:
The backend requires Redis and Node.js to run. Follow these steps:
-
Run Redis using Docker:
docker pull redis:latest docker run -d --name cinemin-redis -p 6379:6379 redis
-
Configure environment variables:
Create a
.envfile in thebackenddirectory with required configuration (see backend README for details). -
Install dependencies and run:
cd backend npm install npm run dev
The backend API will be available at http://localhost:3000.
For complete backend documentation, see backend/README.md.
The user-facing frontend requires Node.js to run:
cd user-frontend
npm install
npm run devThe user frontend will be available at http://localhost:5173.
For complete user frontend documentation, see user-frontend/README.md.
The admin dashboard requires Node.js to run:
cd admin-frontend
npm install
npm run devThe admin dashboard will be available at http://localhost:5174.
For complete admin frontend documentation, see admin-frontend/README.md.
Each component has detailed documentation in its respective directory:
- Backend API: backend/README.md - Complete API reference with endpoints, authentication, and middleware
- User Frontend: user-frontend/README.md - User application architecture, features, and setup
- Admin Frontend: admin-frontend/README.md - Admin dashboard features and configuration
- Docker Setup: DOCKER_SETUP.md - Containerized deployment guide
The application follows a three-tier architecture:
- User Frontend: React-based SPA for customer interactions
- Admin Frontend: React-based dashboard for administrative operations
- Backend API: Node.js RESTful API with layered architecture
- Routes Layer: API endpoint definitions
- Controllers Layer: Request/response handling
- Services Layer: Business logic
- Database Layer: Prisma ORM for data access
- PostgreSQL: Primary relational database
- Redis: Caching and session management
- Setup: Clone the repository and install dependencies
- Environment: Configure environment variables for each service
- Database: Run Prisma migrations to set up the database schema
- Development: Start services using Docker Compose or individually
- Testing: Run tests for each component
- Building: Build production-ready artifacts
- Deployment: Deploy using Docker containers
The system uses JWT-based authentication:
- User Authentication: Email/password or Google OAuth
- Admin Authentication: Role-based access control
- Token Management: Automatic token refresh and validation
- Security: Rate limiting, input validation, and XSS protection
The application uses PostgreSQL with Prisma ORM:
- Schema Management: Version-controlled migrations
- Type Safety: Auto-generated TypeScript types
- Query Optimization: Efficient queries with proper indexing
- Backup: Regular database backup procedures (see backup directory)
# Build and start all services
docker-compose -f docker-compose.prod.yml up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down- Build each frontend application
- Configure Nginx or similar web server
- Set up Node.js environment for backend
- Configure PostgreSQL and Redis
- Set environment variables
- Run database migrations
- Start the backend server
- Serve frontend static files
- Code Splitting: Route-based lazy loading in frontends
- Caching: Redis for frequently accessed data
- Query Optimization: Database indexing and efficient queries
- CDN Ready: Static assets can be served via CDN
- Rate Limiting: API rate limiting to prevent abuse
- Authentication: JWT tokens with secure storage
- Authorization: Role-based access control (RBAC)
- Input Validation: Server-side validation with Zod
- SQL Injection Prevention: Prisma ORM parameterized queries
- XSS Protection: Input sanitization
- CORS: Configured cross-origin resource sharing
- HTTPS: SSL/TLS encryption support
- Rate Limiting: Protection against brute force attacks
All modern browsers are supported:
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is part of a Software Engineering Course.
For issues and questions:
- Check the documentation in each component's README
- Review the API documentation for endpoint details
- Create an issue in the repository
Built for CineMin