Skip to content

KavinthaD/Ticket-Booking-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎫 Real-Time Concurrent Ticket Booking System

πŸŽ“ Academic Project: Developed as an advanced study in Concurrent Systems and Full-Stack Architecture, focusing on thread synchronization and real-time data consistency.

This project is a sophisticated Multi-Client Ticketing System that demonstrates the Producer-Consumer Pattern through high-concurrency Java threads. It features a Spring Boot backend for data persistence and two distinct client interfaces: a React Web UI and a Java-based CLI.

πŸ—οΈ System Architecture

  1. The CLI (Pure Java Engine): Implements the core concurrency logic. Vendors (Producers) add tickets to the pool, while Customers (Consumers) purchase them simultaneously. It uses advanced thread synchronization to ensure no race conditions occur.
  2. The Backend (Spring Boot): A RESTful API that provides global state management, persists data using JPA/Hibernate, and serves as the bridge between the CLI engine and the Web UI.
  3. The Frontend (React): A modern, responsive dashboard built with Vite and Tailwind CSS to visualize real-time ticket availability and system logs.

πŸš€ Key Technical Features

  • Multithreading & Synchronization: Custom implementation of TicketPool to handle concurrent access from multiple vendor and customer threads.
  • Producer-Consumer Logic: Fully configurable thread pool size, release rates, and purchase rates.
  • Full-Stack Integration: Real-time synchronization between the CLI system state and the Web Dashboard.
  • Configuration Persistence: System-wide settings are handled via a robust Configuration model.
  • Modern UI/UX: Interactive dashboard with live tracking of ticket counts and system activities.

πŸ› οΈ Tech Stack

  • Languages: Java 17, TypeScript, SQL
  • Frameworks: Spring Boot 3.4, React 19 (Vite)
  • Database: H2 (In-memory) for high-speed local processing
  • Styling: Tailwind CSS, PostCSS
  • Concurrency: Java Threads, synchronized blocks, and volatile keywords.

πŸ“‚ Project Structure

β”œβ”€β”€ back-end/          # Spring Boot REST API
β”œβ”€β”€ cli/               # Pure Java CLI (Multi-threaded Engine)
β”œβ”€β”€ front-end/         # React Web Dashboard (Vite + Tailwind)
└── README.md          # Project Documentation

βš™οΈ Quick Start

  1. Backend:
    cd back-end
    ./mvnw spring-boot:run
  2. CLI Engine:
    • Compile and run cli/src/Main.java using your preferred IDE (IntelliJ/VS Code).
  3. Frontend:
    cd front-end
    npm install && npm run dev

Built with ❀️ by Kavintha Dilshan

About

🎟️ Real-Time Concurrent Ticket Booking System | Java Threads (Producer-Consumer) | University Project | Spring Boot | React + Tailwind

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors