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.
• 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.
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
-
Clone the project repository: git clone
-
Navigate to the backend folder: cd ticket-system-backend
-
Configure the database: Update the
application.propertiesfile insrc/main/resourceswith your MySQL credentials:
spring.datasource.url=jdbc:mysql://localhost:3306/ticket_system spring.datasource.username= spring.datasource.password= spring.jpa.hibernate.ddl-auto=Update
-
Build and run the backend: ./mvnw spring-boot:run
-
Verify the backend is running:
- Access
http://localhost:8080/api/healthin your browser or Postman. - Expected response: "Application is running."
-
Navigate to the frontend folder: cd ticketing-system-frontend
-
Install dependencies: npm install
-
Start the development server: npm start
-
Open the application in your browser at: http://localhost:3006
-
Navigate to the CLI folder: cd ticketing-system-cli
-
Compile the Java files: javac *.java
-
Run the system: java Main
Configuring the System
- Frontend:
- Enter values for total tickets, ticket release rate, customer retrieval rate, and maximum ticket capacity.
- Click
Submitto save the configuration.
- 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
- 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.
Backend
- Use Postman or Curl to test API endpoints:
- Configure the system:
POST /api/configuration/setup - View tickets:
GET /api/tickets
- Verify database entries in the
configurationandticketstables.
Frontend
- Interact with the UI and verify operations.
CLI
- Run different scenarios to test concurrency:
- Multiple vendors releasing tickets.
- Customers retrieving tickets concurrently
For support or questions, contact [inupamaasmini0724@gmail.com]