Skip to content

Real-time cinema ticket booking backend built with Spring Boot, supporting concurrent seat reservations, event-driven notifications, webhook-based payment handling, and scalable system architecture.

Notifications You must be signed in to change notification settings

sumitverma77/book-it-now

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Book It Now

A comprehensive cinema ticket booking system built with Spring Boot, designed for managing movie events, venues, shows, and real-time seat reservations with integrated payment processing and notifications.

Overview

Book It Now is a full-featured cinema management platform that provides:

  • Multi-venue theater management with dynamic auditorium configurations
  • Real-time seat booking with automatic locking and expiration
  • Payment integration via webhooks with transaction management
  • Event-driven notifications using Apache Kafka for email confirmations
  • Comprehensive admin dashboard for theater operations
  • RESTful API with JWT authentication and role-based access control

Key Features

For Theater Administrators

  • Create and manage movie events with metadata
  • Configure multiple venues and auditoriums
  • Design custom seat layouts with pricing categories
  • Schedule shows with conflict prevention
  • Monitor bookings and venue performance

For Customers

  • Browse movies by genre, language, or location
  • Real-time seat selection with availability display
  • Secure booking with automatic seat locking
  • Payment processing with webhook confirmations
  • Email notifications for booking confirmations

Technical Features

  • Microservices-ready architecture with event-driven communication
  • Docker containerization for easy deployment
  • Database persistence with PostgreSQL and Redis caching
  • Message queuing with Apache Kafka for notifications
  • Comprehensive logging and error handling
  • API documentation with OpenAPI/Swagger

Technology Stack

  • Backend: Spring Boot 3.x, Java 17
  • Database: PostgreSQL with JPA/Hibernate
  • Cache: Redis
  • Message Broker: Apache Kafka
  • Security: JWT authentication, Spring Security
  • Containerization: Docker & Docker Compose
  • Documentation: OpenAPI/Swagger UI

Quick Start

Prerequisites

  • Docker & Docker Compose
  • Java 17+ (for local development)
  • Maven 3.6+

Using Docker (Recommended)

cd book-it-now
docker-compose up -d

The application will be available at http://localhost:8080

Local Development

# Requires local PostgreSQL, Redis, and Kafka
mvn spring-boot:run -Dspring-boot.run.profiles=dev

Default Credentials

  • Admin User: admin@bookitnow.com / admin123
  • API Documentation: http://localhost:8080/swagger-ui.html

API Documentation

For complete API reference including all endpoints, request/response formats, and examples, see:

📖 Complete API Reference

This includes detailed documentation for:

  • Authentication and user management
  • Event and show administration
  • Venue and auditorium management
  • Booking and payment workflows
  • Seat layout configuration

Docker Setup

For detailed Docker setup instructions, environment configuration, and troubleshooting, see:

🐳 Docker Setup Guide

Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   Spring Boot   │    │    PostgreSQL   │    │      Redis      │
│   Application   │◄──►│     Database    │    │      Cache      │
│                 │    │                 │    │                 │
│     REST API    │    │   JPA/Hibernate │    │  Session Cache  │
└─────────────────┘    └─────────────────┘    └─────────────────┘
          │                       │                       │
          └───────────────────────┼───────────────────────┘
                                  │
                    ┌─────────────────┐    ┌─────────────────┐
                    │      Kafka      │    │   Zookeeper     │
                    │   Messaging     │    │   Coordination  │
                    │                 │    │                 │
                    └─────────────────┘    └─────────────────┘

Database Schema

Database ERD

Complete entity relationship diagram showing all tables and their relationships.

Business Rules

  • Seat locking: Bookings expire after 10 minutes if payment not completed
  • Show scheduling: No time overlaps allowed in same auditorium
  • Layout immutability: Seat layouts cannot be changed after first show
  • Payment processing: Webhook-based confirmation with status tracking
  • Notification system: Automatic email confirmations via Kafka

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make changes with tests
  4. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Real-time cinema ticket booking backend built with Spring Boot, supporting concurrent seat reservations, event-driven notifications, webhook-based payment handling, and scalable system architecture.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages