CineMe_BE is a comprehensive backend solution for a modern Movie Theater Ticketing System. It aims to provide a seamless booking experience for users while offering powerful management tools for theater owners. The system supports bilingual interfaces (Vietnamese/English) and integrates advanced features like AI-based Movie Recommendations and Genetic Algorithms for Schedule Optimization.
- Authentication: Register/Login via Email or Google (OAuth2).
- Movie Discovery:
- View "Now Showing" and "Coming Soon" movies.
- Personalized Recommendations: Get movie suggestions based on booking history and preferences.
- Search movies by genre, actor, or simple text search.
- Booking Flow:
- View details: Trailer, Plot, Cast, Reviews.
- Check showtimes by Theater & Date.
- Real-time Seat Selection: Choose seats visually with status updates (Available/Booked/Locked).
- Add Combos (Popcorn/Drinks).
- Payment: Secure online payment integration (VNPay/MoMo support ready structure).
- My Account: Manage profile, change password, view Booking History and E-Tickets (QR Code).
- Dashboard: View statistics on revenue, ticket sales, and trending movies.
- Movie Management: CRUD operations for Movies, Genres, Actors, Formats (2D/3D/IMAX).
- Theater Management: Manage branches, rooms, and seat layouts (customizable matrices).
- Showtime Scheduling:
- Manual scheduling.
- Auto-Scheduling: Use Genetic Algorithm to automatically generate optimal showtimes based on movie ratings and duration constraints.
- Ticket Verification: Scan QR Codes to check in customers at the theater.
- Staff Management: Manage employees and assign granular permissions (RBAC).
The project is built using a robust, enterprise-grade technology stack:
| Component | Technology | Version | Description |
|---|---|---|---|
| Core Framework | Java Spring Boot | 3.3.3 | Main backend framework for RESTful APIs. |
| Database | PostgreSQL | 16 | Relational database for structured data. |
| Caching | Redis | 7-alpine | Caching frequent data (movies, configs) & JWT Blacklist. |
| Message Queue | RabbitMQ | 3.x | Async processing (Email sending, notifications). |
| Storage | MinIO | Latest | S3-compatible object storage for images/posters. |
| Security | Spring Security | 3.4.2 | JWT Auth, OAuth2, Role-Based Access Control. |
| Real-time | Socket.IO | 2.x | Real-time seat updates and notifications. |
| API Docs | OpenAPI / Swagger | 3.0 | Auto-generated API documentation. |
| Build Tool | Maven | 3.x | Dependency and build management. |
| Containerization | Docker | - | Containerizing DB, Redis, MinIO services. |
Follow these steps to set up and run the project locally.
- Java Development Kit (JDK) 21
- Maven (or use the included
./mvnwwrapper) - Docker Desktop (Recommended for running PostgreSQL, Redis, MinIO)
-
Clone the Repository
git clone https://github.com/Ginwnn924/CineMe-BE.git cd CineMe-BE -
Start Infrastructure Services (Docker) Use the provided
docker-compose.yml(if available) or start PostgreSQL, Redis, and MinIO instances manually.# Example if docker-compose.yaml is present in root docker-compose up -d -
Configure Environment Variables Check
src/main/resources/application.properties(or.envfile) to match your local setup:spring.datasource.url: JDBC URL for PostgreSQL.spring.data.redis.host: Redis host.minio.url: MinIO endpoint.
-
Build the Project
./mvnw clean compile
-
Run the Application
./mvnw spring-boot:run
Once the application is running (default port 8080):
Visit http://localhost:8080/swagger-ui.html to explore all available endpoints.
- Public APIs: Login, Register, View Movies/Showtimes (No token required).
- Protected APIs: Booking, Profile, Admin Stats (Require
Bearer Token).
- Login:
POST /api/v1/auth/login-> ReceiveaccessToken. - Authorize: Click "Authorize" in Swagger button -> Paste
Bearer <your_access_token>. - Find Movie:
GET /api/v1/movies/available. - Get Showtimes:
GET /api/v1/showtimes?movieId=.... - Book Ticket:
POST /api/v1/bookingswith selected seat IDs.
src/main/java/com/project/CineMe_BE/
├── api/ # API Response wrappers (CommonResult)
├── config/ # Configurations (Security, Redis, OpenAPI...)
├── controller/ # REST API Controllers (Clean & Standardized)
├── consumer/ # RabbitMQ Consumers (Email/Notification)
├── dto/ # Data Transfer Objects (Request/Response)
├── entity/ # JPA Entities
├── repository/ # Database Repositories
├── service/ # Business Logic
├── security/ # Auth Logic (JWT, Filters)
└── utils/ # Utilities (Date, String, QR, OTP...)Built with ❤️ by the CineMe Team.