Skip to content

aashif-sajah/EventPulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EventPulse Simulation System

Overview

EventPulse is a simulation system designed for the production and consumption of tickets, tracking logs, and managing multiple simulations. This system is built as part of an Object-Oriented Programming (OOP) Assignment. The project integrates a robust backend developed with Java Spring Boot and an interactive frontend built with Angular.

Student ID: w2052938 | 20222329


Project Structure

root/
│
├── backend/                # Backend directory (Java Spring Boot)
│   ├── src/                # Backend source code
│   ├── pom.xml             # Maven configuration for the backend
│   └── README.md           # Backend-specific README
│
├── frontend/               # Frontend directory (Angular)
│   ├── src/                # Frontend source code
│   ├── angular.json        # Angular configuration
│   └── README.md           # Frontend-specific README
│
└── README.md               # Root README

Backend Setup (Spring Boot)

Prerequisites

Ensure the following tools are installed on your system:

Running the Backend

  1. Navigate to the backend/ directory.
  2. Ensure your MySQL database is running. Use the following configuration in your application.properties:
spring.datasource.url=jdbc:mysql://localhost:3306/eventpulse_db
spring.datasource.username=root
spring.datasource.password=root
  1. Build and run the Spring Boot application using Maven:
mvn clean install
mvn spring-boot:run
  1. The backend server will start on http://localhost:8080.

API Endpoints

  • POST /start-simulation: Start a new ticket simulation.
  • GET /fetch-simulation-id: Fetch the current simulation ID.
  • GET /fetch-logs/{simulationId}: Fetch logs for a specific simulation.
  • GET /fetch-all-simulation-ids: Fetch all simulation IDs.

Database Schema

Ensure your MySQL database includes the following tables:

  • Ticket: Stores ticket data.
  • LogEntry: Stores logs generated during the simulation.

Frontend Setup (Angular)

Prerequisites

Ensure the following tools are installed on your system:

Running the Frontend

  1. Navigate to the frontend/ directory.
  2. Install the dependencies:
npm install
  1. Start the Angular development server:
ng serve
  1. The frontend will start on http://localhost:4200.

Connecting the Frontend to the Backend

By default, the frontend is configured to interact with the backend running on http://localhost:8080. If the backend runs on a different server or port, update the environment configuration in environment.ts:

export const environment = {
  production: false,
  backendUrl: 'http://localhost:8080'
};

Frontend Features

  • Start Simulation: Initiate a simulation of ticket production and consumption.
  • View Logs: View logs for any simulation based on the simulation ID.
  • View All Simulations: View all past simulations.

Testing

Backend Tests

Run unit and integration tests for the backend using Maven:

mvn test

Frontend Tests

Run unit and end-to-end tests for the frontend using Angular CLI:

ng test   # For unit tests
ng e2e    # For end-to-end tests

Contribution Guidelines

  1. Fork this repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and write appropriate tests.
  4. Create a pull request with a detailed description of your changes.

License

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


Contact

If you have any questions, feel free to open an issue or contact the maintainers.


Screenshots

Include relevant screenshots here to illustrate the system's functionality.


Future Improvements

  • Enhance the ticket production and consumption simulation logic.
  • Implement real-time analytics for ticket simulations.
  • Add user authentication and role-based access control.
  • Optimize database schema for scalability.

Developed as part of Object-Oriented Programming Assignment.

About

A Spring Boot-powered application simulating live ticketing with concurrent producer-consumer threads and real-time updates.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors