https://github.com/lakshay1341/cineticket
CineTicket is an enterprise-grade Spring Boot application that provides a comprehensive solution for movie enthusiasts. It seamlessly integrates movie reviews with theater seat reservations, offering a complete platform for users to discover movies, share opinions, and book seats for upcoming shows.
https://github.com/lakshay1341/cineticket
api-development authentication backend bcrypt itextpdf java jwt-authentication movie-review movie-ticket-booking-system mysql postman-collection rest-api s3-bucket spring-boot spring-data-jpa spring-security stripe-payments swagger
Last synced: 9 months ago
JSON representation
CineTicket is an enterprise-grade Spring Boot application that provides a comprehensive solution for movie enthusiasts. It seamlessly integrates movie reviews with theater seat reservations, offering a complete platform for users to discover movies, share opinions, and book seats for upcoming shows.
- Host: GitHub
- URL: https://github.com/lakshay1341/cineticket
- Owner: lakshay1341
- License: mit
- Created: 2025-02-22T16:55:50.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-05-02T09:32:13.000Z (9 months ago)
- Last Synced: 2025-05-08T02:53:43.913Z (9 months ago)
- Topics: api-development, authentication, backend, bcrypt, itextpdf, java, jwt-authentication, movie-review, movie-ticket-booking-system, mysql, postman-collection, rest-api, s3-bucket, spring-boot, spring-data-jpa, spring-security, stripe-payments, swagger
- Language: Java
- Homepage: https://cineticket.onrender.com/
- Size: 9.71 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🎬 CineTicket - Movie Review & Reservation System
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
[](https://spring.io/projects/spring-boot)
[](https://www.mysql.com/)
[](https://github.com/jwtk/jjwt)
[](https://stripe.com/)
[](LICENSE)
**A modern, secure, and scalable RESTful API for movie reviews and theater seat reservations**
🌐 **[Live Demo: https://cineticket.onrender.com](https://cineticket.onrender.com)**
[Overview](#-overview) •
[Features](#-key-features) •
[Demo](#️-frontend-demo) •
[Architecture](#-architecture) •
[Installation](#-installation) •
[API Reference](#-api-reference) •
[Security](#-security) •
[Documentation](#-documentation) •
[Contributing](#-contributing) •
[Contact](#-contact)
## 📋 Overview
**CineTicket** is an enterprise-grade Spring Boot application that provides a comprehensive solution for movie enthusiasts. It seamlessly integrates movie reviews with theater seat reservations, offering a complete platform for users to discover movies, share opinions, and book seats for upcoming shows.
Built with modern Java and Spring technologies, this API implements industry best practices including JWT authentication, role-based access control, Stripe payment integration, PDF receipt generation, email notifications, rate limiting, and comprehensive API documentation.
The system is deployed and fully functional at [https://cineticket.onrender.com](https://cineticket.onrender.com).
## 🖥️ Frontend Demo
|  |  |
|:---:|:---:|
| **👨💼 Admin Dashboard** | **🧑💻 User Experience** |
| *Manage movies, theaters, showtimes, and view reservation data* | *Browse movies, read reviews, select seats, and complete the reservation process* |
## ✨ Key Features
| 🎬 **Movie Platform** | 🎟️ **Reservation System** | 🔒 **Enterprise Security** |
|:---|:---|:---|
| • Browse & search movies
• Rate & review movies
• Manage user reviews
• Movie recommendations | • Theater management
• Showtime scheduling
• Seat selection & booking
• Stripe payment integration
• PDF receipt generation
• Email notifications | • JWT authentication
• Role-based access control
• Rate limiting protection
• Secure transactions |
### 🌟 Advanced Features
| 💳 **Payment Processing** | 📧 **Email Notifications** | 🎫 **Reservation Management** |
|:---|:---|:---|
| • Stripe integration
• Checkout sessions
• Webhook handling
• Receipt generation | • Confirmation emails
• PDF attachments
• Branded templates | • Interactive seat selection
• Status tracking
• Concurrent booking protection |
## 🏗️ Architecture
### Technology Stack
- **Backend**: Java 17, Spring Boot 3.2.3, Spring Data JPA
- **Database**: MySQL 8.0
- **Security**: Spring Security, JJWT 0.12.6
- **API Documentation**: Swagger OpenAPI 3.0
- **Payment Processing**: Stripe API 22.0.0
- **PDF Generation**: iText 5.5.13.3
- **Email Service**: Spring Mail
- **Utilities**: Lombok, Resilience4j, MessageSource
- **Testing**: JUnit 5, Mockito
## 🔍 Installation
### Prerequisites
- Java 17 or higher
- Maven 3.6+
- MySQL 8.0+
### Quick Start Guide
1. **Clone the repository**
```bash
git clone https://github.com/lakshay1341/Movie-Review-System-API.git
cd Movie-Review-System-API
```
2. **Configure the database**
```sql
CREATE DATABASE moviereviewdbupdated;
```
3. **Configure application properties**
Update `src/main/resources/application.properties` with your database credentials, JWT configuration, and Stripe API keys.
> **⚠️ Security Note**: Generate a secure JWT secret using `openssl rand -base64 64` and never commit it to version control.
4. **Set up environment variables**
Create a `.env` file based on the provided `.env.example` with your configuration.
```bash
# Copy the example file
cp .env.example .env
# Edit the .env file with your actual values
# For security, generate a new JWT secret:
openssl rand -base64 64
```
5. **Build and run the application**
```bash
mvn clean install
mvn spring-boot:run
```
6. **Access the application**
- API: [http://localhost:8080](http://localhost:8080)
- Swagger UI: [http://localhost:8080/swagger-ui/index.html](http://localhost:8080/swagger-ui/index.html)
### Default Credentials
The system automatically creates two users on startup:
| Role | Username | Password |
|-------|----------|----------|
| Admin | `admin` | `password` |
| User | `user` | `password` |
## 🔥 API Reference
### API Categories
### 🔑 Authentication
Method
Endpoint
Description
Access
POST
/api/v1/auth/register
Register new user
POST
/api/v1/auth/login
Get JWT token
### 🎬 Movies
Method
Endpoint
Description
Access
GET
/api/v1/movies
Get all movies
GET
/api/v1/movies?search={query}
Search movies
GET
/api/v1/movies/{id}
Get movie by ID
POST
/api/v1/movies
Add movie
PUT
/api/v1/movies/{id}
Update movie
DELETE
/api/v1/movies/{id}
Delete movie
### ⭐ Reviews
Method
Endpoint
Description
Access
POST
/api/v1/reviews/movies/{movieId}
Add review
GET
/api/v1/reviews/my-reviews
Get user reviews
PUT
/api/v1/reviews/{reviewId}
Update review
DELETE
/api/v1/reviews/{reviewId}
Delete review
### 🏛️ Theaters
Method
Endpoint
Description
Access
GET
/api/v1/theaters
Get all theaters
GET
/api/v1/theaters/{id}
Get theater by ID
GET
/api/v1/theaters/search?location={location}
Search theaters
POST
/api/v1/theaters
Add theater
PUT
/api/v1/theaters/{id}
Update theater
DELETE
/api/v1/theaters/{id}
Delete theater
### 📅 Showtimes
Method
Endpoint
Description
Access
GET
/api/v1/showtimes?date={date}
Get showtimes by date
GET
/api/v1/showtimes/movies/{movieId}
Get showtimes by movie
GET
/api/v1/showtimes/theaters/{theaterId}
Get showtimes by theater
GET
/api/v1/showtimes/available
Get available showtimes
POST
/api/v1/showtimes
Add showtime
PUT
/api/v1/showtimes/{id}
Update showtime
DELETE
/api/v1/showtimes/{id}
Delete showtime
### 💺 Seats
Method
Endpoint
Description
Access
GET
/api/v1/seats/showtimes/{showtimeId}
Get all seats
GET
/api/v1/seats/showtimes/{showtimeId}/available
Get available seats
### 🎟️ Reservations
Method
Endpoint
Description
Access
POST
/api/v1/reservations
Create reservation
GET
/api/v1/reservations/my-reservations
Get user reservations
GET
/api/v1/reservations/{id}
Get reservation by ID
DELETE
/api/v1/reservations/{id}
Cancel reservation
GET
/api/v1/reservations
Get all reservations
GET
/api/v1/reservations/reports/revenue
Get revenue report
## 🔒 Security
| **Security Features** | **Authentication Flow** |
|:---|:---|
| • **JWT Authentication**: Secure token-based authentication
• **Password Encryption**: BCrypt encoding (strength 12)
• **Role-Based Access Control**: User/admin permissions
• **Rate Limiting**: 100 requests per minute
• **Concurrent Access Control**: Pessimistic locking
• **Transactional Operations**: Data integrity
• **Secure Payments**: Stripe integration
• **Environment Variables**: Secure credential management | 1. User registers or logs in with credentials
2. Server validates credentials and returns a JWT token
3. Client includes JWT in Authorization header
4. Server validates token and grants access based on roles
**Example Header:**
`Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...` |
## 📖 Documentation
### API Documentation
| **Swagger UI** | **Postman Collection** |
|:---|:---|
| Interactive API documentation with request/response examples
• [Local Development](http://localhost:8080/swagger-ui/index.html)
• [Production](https://cineticket.onrender.com/swagger-ui/index.html)
• [OpenAPI Specification](https://cineticket.onrender.com/api-docs) | Complete API testing suite with environments
[](https://me3333-6732.postman.co/workspace/4f28700f-ee89-485e-a928-767cd44234f9)
*Also available in `docs/postman` directory* |
### Response Format
All API responses follow a consistent format:
```json
{
"success": true,
"message": "operation.success.message",
"data": {"Response data here"}
}
```
### Postman Collection Features
- **Complete API Coverage**: All endpoints from authentication to reservations
- **Environment Variables**: Pre-configured for development and testing
- **Authentication Handling**: Automatic JWT token management
- **Test Scripts**: Response validation and environment variable extraction
- **Request Examples**: Sample payloads for all operations
## 💻 Contributing
Contributions are welcome! Here's how you can contribute:
1. Fork the repository
2. Create a feature branch: `git checkout -b feature/amazing-feature`
3. Commit your changes: `git commit -m 'Add some amazing feature'`
4. Push to the branch: `git push origin feature/amazing-feature`
5. Open a Pull Request
## 🔗 Related Links
- 🎬 **Original Problem Statement**: [roadmap.sh](https://roadmap.sh/projects/movie-reservation-system/solutions?u=658efb1fae22c12523f4de17)
- 🌐 **Live Demo**: [https://cineticket.onrender.com](https://cineticket.onrender.com)
- 📚 **API Documentation**: [https://cineticket.onrender.com/swagger-ui/index.html](https://cineticket.onrender.com/swagger-ui/index.html)
## 👨💻 Contact
**Lakshay Chaudhary**
📧 Email: [lakshaychaudhary2003@gmail.com](mailto:lakshaychaudhary2003@gmail.com)
💼 GitHub: [lakshay1341](https://github.com/lakshay1341)
---
⭐ Star this repository if you find it helpful!
Built with ❤️ by Lakshay Chaudhary