Skip to content

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.

License

Notifications You must be signed in to change notification settings

lakshay1341/CineTicket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

54 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 CineTicket - Movie Review & Reservation System

Java Spring Boot MySQL JWT Stripe License

A modern, secure, and scalable RESTful API for movie reviews and theater seat reservations

🌐 Live Demo: https://cineticket.onrender.com

Overview β€’ Features β€’ Demo β€’ Architecture β€’ Installation β€’ API Reference β€’ Security β€’ Documentation β€’ Contributing β€’ 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.

πŸ–₯️ Frontend Demo

Admin Dashboard User Experience
πŸ‘¨β€πŸ’Ό 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
git clone https://github.com/lakshay1341/Movie-Review-System-API.git
cd Movie-Review-System-API
  1. Configure the database
CREATE DATABASE moviereviewdbupdated;
  1. 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.

  1. Set up environment variables

Create a .env file based on the provided .env.example with your configuration.

# 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
  1. Build and run the application
mvn clean install
mvn spring-boot:run
  1. Access the application

Default Credentials

The system automatically creates two users on startup:

Role Username Password
Admin admin password
User user password

πŸ”₯ API Reference

View Complete Collection

API Categories

Authentication: 2 Endpoints Movies: 6 Endpoints Reviews: 4 Endpoints

Theaters: 6 Endpoints Showtimes: 7 Endpoints Seats: 2 Endpoints

Reservations: 6 Endpoints

πŸ”‘ Authentication

Method Endpoint Description Access
POST /api/v1/auth/register Register new user Public
POST /api/v1/auth/login Get JWT token Public

🎬 Movies

Method Endpoint Description Access
GET /api/v1/movies Get all movies Public
GET /api/v1/movies?search={query} Search movies Public
GET /api/v1/movies/{id} Get movie by ID Public
POST /api/v1/movies Add movie Admin
PUT /api/v1/movies/{id} Update movie Admin
DELETE /api/v1/movies/{id} Delete movie Admin

⭐ Reviews

Method Endpoint Description Access
POST /api/v1/reviews/movies/{movieId} Add review User Admin
GET /api/v1/reviews/my-reviews Get user reviews User Admin
PUT /api/v1/reviews/{reviewId} Update review Owner Admin
DELETE /api/v1/reviews/{reviewId} Delete review Owner Admin

πŸ›οΈ Theaters

Method Endpoint Description Access
GET /api/v1/theaters Get all theaters Public
GET /api/v1/theaters/{id} Get theater by ID Public
GET /api/v1/theaters/search?location={location} Search theaters Public
POST /api/v1/theaters Add theater Admin
PUT /api/v1/theaters/{id} Update theater Admin
DELETE /api/v1/theaters/{id} Delete theater Admin

πŸ“… Showtimes

Method Endpoint Description Access
GET /api/v1/showtimes?date={date} Get showtimes by date Public
GET /api/v1/showtimes/movies/{movieId} Get showtimes by movie Public
GET /api/v1/showtimes/theaters/{theaterId} Get showtimes by theater Public
GET /api/v1/showtimes/available Get available showtimes Public
POST /api/v1/showtimes Add showtime Admin
PUT /api/v1/showtimes/{id} Update showtime Admin
DELETE /api/v1/showtimes/{id} Delete showtime Admin

πŸ’Ί Seats

Method Endpoint Description Access
GET /api/v1/seats/showtimes/{showtimeId} Get all seats Public
GET /api/v1/seats/showtimes/{showtimeId}/available Get available seats Authenticated

🎟️ Reservations

Method Endpoint Description Access
POST /api/v1/reservations Create reservation Authenticated
GET /api/v1/reservations/my-reservations Get user reservations Authenticated
GET /api/v1/reservations/{id} Get reservation by ID Owner Admin
DELETE /api/v1/reservations/{id} Cancel reservation Owner Admin
GET /api/v1/reservations Get all reservations Admin
GET /api/v1/reservations/reports/revenue Get revenue report Admin

πŸ”’ 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
β€’ Production
β€’ OpenAPI Specification
Complete API testing suite with environments

Run in Postman

Also available in docs/postman directory

Response Format

All API responses follow a consistent format:

{
  "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

πŸ‘¨β€πŸ’» Contact

Lakshay Chaudhary πŸ“§ Email: [email protected] πŸ’Ό GitHub: lakshay1341


⭐ Star this repository if you find it helpful!

Built with ❀️ by Lakshay Chaudhary

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Languages