Skip to content

A multi-threaded Real-Time Event Ticketing System with a CLI, Spring Boot backend, and React frontend. Implements the Producer-Consumer pattern to simulate concurrent ticket release and purchase operations with real-time updates and synchronization.

Notifications You must be signed in to change notification settings

Inu0724/Real-Time-Ticketing-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Real-Time Event Ticketing System

Introduction

The Real-Time Event Ticketing System is designed to handle concurrent ticket releases and purchases by multiple vendors and customers. It features a Command-Line Interface (CLI), a web-based frontend (using React.js), and a backend developed with Spring Boot. The system ensures thread-safe interactions using multi-threading and synchronization mechanisms.

Features

• Frontend: A React-based UI that allows users to configure the system, manage vendors and customers, and view ticket availability in real-time.

• Backend: A Spring Boot REST API managing ticket operations, configuration, and synchronization.

• CLI: A console-based interface for configuring and simulating ticket release and retrieval by vendors and customers.

Setup Instructions

Ensure the following software is installed:

• Java : JDK 17 , Node.js : Version 18 , MySQL : Version 9.1 , NPM: Included with Node.js , Spring Boot: Included in the project

Backend Setup

  1. Clone the project repository: git clone

  2. Navigate to the backend folder: cd ticket-system-backend

  3. Configure the database: Update the application.properties file in src/main/resources with your MySQL credentials:

spring.datasource.url=jdbc:mysql://localhost:3306/ticket_system spring.datasource.username= spring.datasource.password= spring.jpa.hibernate.ddl-auto=Update

  1. Build and run the backend: ./mvnw spring-boot:run

  2. Verify the backend is running:

  • Access http://localhost:8080/api/health in your browser or Postman.
  • Expected response: "Application is running."

Frontend Setup

  1. Navigate to the frontend folder: cd ticketing-system-frontend

  2. Install dependencies: npm install

  3. Start the development server: npm start

  4. Open the application in your browser at: http://localhost:3006

CLI setup

  1. Navigate to the CLI folder: cd ticketing-system-cli

  2. Compile the Java files: javac *.java

  3. Run the system: java Main

Usage Instructions

Configuring the System

  1. Frontend:
  • Enter values for total tickets, ticket release rate, customer retrieval rate, and maximum ticket capacity.
  • Click Submit to save the configuration.
  1. CLI:
  • Follow the prompts to input configuration values.

Managing Vendors and Customers

  • Add vendors and customers through the frontend UI.
  • In the CLI, vendors and customers are simulated concurrently.

Viewing Ticket Information

  • The frontend displays the number of retrieved and available tickets in real-time using a progress bar

UI Controls

  • Submit Button: Configures the system.
  • Add Vendors/Customers: Adds participants to the system.
  • Start/Stop Buttons: Starts or stops ticket transactions.
  • Log Display: Displays real-time logs of system operations.

Testing the System

Backend

  1. Use Postman or Curl to test API endpoints:
  • Configure the system: POST /api/configuration/setup
  • View tickets: GET /api/tickets
  1. Verify database entries in the configuration andticketstables.

Frontend

  • Interact with the UI and verify operations.

CLI

  • Run different scenarios to test concurrency:
  • Multiple vendors releasing tickets.
  • Customers retrieving tickets concurrently

Contact

For support or questions, contact [inupamaasmini0724@gmail.com]

About

A multi-threaded Real-Time Event Ticketing System with a CLI, Spring Boot backend, and React frontend. Implements the Producer-Consumer pattern to simulate concurrent ticket release and purchase operations with real-time updates and synchronization.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published