A Ticketing System designed to simulate a real-time ticket booking process. The system includes:
- Vendor Threads: Add tickets to the pool.
- Customer Threads: Book tickets from the pool.
- WebSocket Integration: Real-time updates on ticket status.
- User Authentication: Admins can register and log in.
- Java 17
- Spring Boot
- Spring Security (for authentication)
- WebSockets
- Angular
- WebSocket
- MySQL
- Maven
- Node.js
- npm
Before running the application, ensure you have the following installed:
- Java 17 or higher (for the backend ticketing logic)
- Node.js 14.x or higher (for the Angular frontend)
- Maven (for building and managing Java project dependencies)
- Visual Studio Code (for frontend development)
- IntelliJ IDEA (for backend development)
Clone the repository and navigate to the project folder:
git clone https://github.com/omeshapasan2/Ticketing-System-Springboot-Angular-MySQL.git
cd Ticketing-System-Springboot-Angular-MySQLNavigate to the root directory of your Spring Boot application and use Maven to build it:
cd Springboot
mvn clean installAfter building the application, you can start the Spring Boot backend:
mvn spring-boot:runThis will start the backend on http://localhost:8080.
Navigate to the frontend directory and set up the Angular application:
cd Angular
npm installStart the Angular development server:
ng serveOR
npm startThis will start the frontend on http://localhost:4200.
Users can register by creating an account. The Register form collects the following information:
- Username
- Password
After successful registration, users are redirected to the Login page.
After registering, users can log in using their Username and Password. Upon successful login, they are directed to the Admin Dashboard.
The JwtTokenProvider class handles the generation and validation of JWT tokens for user authentication. Tokens are generated upon successful login.
/home: Displays information about the system with links./register: Displays the registration form for creating an account./login: Displays the login form to authenticate users./admin-dashboard: The Admin Dashboard (accessible only after successful login)./logout: Redirects users back to the login screen.
POST /auth/register: Endpoint to register a new user.POST /auth/login: Endpoint to authenticate the user and generate a JWT token.GET /api/ticketing/logs: Endpoint to retrieve logs for ticket addition/removal from the backend.
Once logged in, admins can:
- Configure the ticket pool:
- Total Tickets
- Ticket Release Rate
- Customer Retrieval Rate
- Maximum Ticket Capacity
- Start and stop the ticketing process.
- Monitor real-time logs of how vendors release tickets and how customers purchase them.
- Go to
/register(Frontend page). - Fill in the Username, Email, and Password fields.
- Click Register to create a new account.
- After a successful registration, you will be redirected to the Login page.
- Go to
/login(Frontend page). - Enter your Username and Password.
- After successful login, you will be redirected to the Admin Dashboard.




