event management system

An Event Management System built with microservices architecture using Spring Boot. It allows users to browse, book, and manage event tickets. Features include user management, event handling, ticket booking, payment processing, notifications, and analytics, demonstrating RESTful API design and industry standards.

๐ŸŽŸ๏ธ Event Management System

Event Management System Interface

Overview

The Event Management System is a university project designed to demonstrate the use of microservices architecture using Spring Boot. The system enables users to browse, book, and manage bookings for various events like musical shows, concerts, and theater performances. Organizers can create and manage events, while the system tracks ticket sales and user interactions.

๐Ÿ—๏ธ Microservices Architecture

The application is divided into the following microservices:

  1. ๐Ÿ‘ค User Service: Handles user registration, authentication, and profile management.
  2. ๐ŸŽซ Event Service: Manages the creation, editing, and retrieval of events.
  3. ๐Ÿ›’ Ticket Service: Manages the booking, cancellation, and retrieval of bookings.
  4. ๐Ÿ’ณ Payment Service: Processes payments and maintains payment history.
  5. ๐Ÿ”” Notification Service: Sends notifications to users about bookings, cancellations, and event updates.
  6. ๐Ÿ“Š Analytics Service: Tracks user interactions, ticket sales, and event metrics.

๐ŸŒŸ Key Features

  • ๐Ÿ‘ค User Service (Port 8081):
    • Register: POST /api/users/register

      • Request: User object
      • Response: Registered User object
    • Login: POST /api/users/login

      • Parameters: email, password
      • Response: JSON with message and sessionId or error message
    • Check Status: GET /api/users/status

      • Response: Login status message
    • Logout: POST /api/users/logout

      • Response: Logout success message
    • Get User by ID: GET /api/users/id/{id}

      • Path Variable: id
      • Response: User object or 404 Not Found
    • Get User by Email: GET /api/users/email/{email}

      • Path Variable: email
      • Response: User object or 404 Not Found
    • Update User Name: PUT /api/users/update-name

      • Parameters: email, newName
      • Response: Success or 404 Not Found
    • Update User Role: PUT /api/users/update-role

      • Parameters: email, newRole
      • Response: Success or 404 Not Found
    • Delete User: DELETE /api/users/delete

      • Parameters: email
      • Response: Success or 404 Not Found

  • ๐ŸŽซ Event Service (Port 8082):

    • CRUD operations for event management.
    • List and detailed view of events.
    • RESTful endpoints: /events, /events/{id}.
  • ๐Ÿ›’ Ticket Service (Port 8083):

    • Booking, viewing, and cancellation of bookings.
    • RESTful endpoints: /bookings, /bookings/{id}, /bookings/user/{userId}.
  • ๐Ÿ’ณ Payment Service (Port 8084):

    • Processes payments for ticket bookings.
    • RESTful endpoints: /payments, /payments/user/{userId}, /payments/ticket/{ticketId}.
  • ๐Ÿ”” Notification Service (Port 8085):

    • Sends notifications related to bookings, cancellations, and updates.
    • RESTful endpoints: /notifications, /notifications/user/{userId}, /notifications/{id}.
  • ๐Ÿ“Š Analytics Service (Port 8086):

    • Tracks and analyzes user interactions and sales metrics.
    • RESTful endpoints: /analytics/user/{userId}, /analytics/event/{eventId}, /analytics/ticket/{ticketId}.

๐Ÿ’ป Technologies Used

  • Backend: Spring Boot, Spring Data JPA, Spring Security
  • Frontend: SvelteKit, Tailwind CSS
  • Database: MySQL
  • Architecture: Microservice Architecture (Spring MVC within each Microservice)
  • API Design: RESTful APIs
  • Other: Maven

๐Ÿ—‚๏ธ Project Structure

event-management-system/
|
โ”œโ”€โ”€ backend/                              # ๐Ÿ–ฅ๏ธ Contains all the Spring Boot microservices
|   |
โ”‚   โ”œโ”€โ”€ user-service/                     # ๐Ÿ‘ค Microservice for user management
โ”‚   โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ main/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ java/
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ lk/nibm/userservice/    # ๐Ÿ“‚ Java package for User Service
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ controller/         # ๐Ÿš REST controllers for handling HTTP requests
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ service/            # ๐Ÿ› ๏ธ Business logic and service classes
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ model/              # ๐Ÿ—„๏ธ Entity models representing database tables
โ”‚   โ”‚   โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ repository/         # ๐Ÿ“š Repository interfaces for database operations
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ resources/
โ”‚   โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ application.properties  # โš™๏ธ Configuration file for Spring Boot
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ test/
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ java/
โ”‚   โ”‚   โ”‚           โ””โ”€โ”€ lk/nibm/userservice/    # ๐Ÿงช Unit and integration tests for User Service
โ”‚   โ”‚   โ””โ”€โ”€ pom.xml                            # ๐Ÿ“ Maven build file for User Service
โ”‚   โ”œโ”€โ”€ event-service/                         # ๐ŸŽซ Microservice for event management
โ”‚   โ”œโ”€โ”€ ticket-service/                        # ๐Ÿ›’ Microservice for ticket management
โ”‚   โ”œโ”€โ”€ payment-service/                       # ๐Ÿ’ณ Microservice for payment processing
โ”‚   โ”œโ”€โ”€ notification-service/                  # ๐Ÿ”” Microservice for sending notifications
โ”‚   โ””โ”€โ”€ analytics-service/                     # ๐Ÿ“Š Microservice for analytics and reporting
|
โ”œโ”€โ”€ frontend/                                  # ๐ŸŒ SvelteKit frontend application
โ”‚   โ”œโ”€โ”€ static/
โ”‚   โ”‚   โ”œโ”€โ”€ favicon.ico                        # ๐Ÿ”– Favicon for the SvelteKit app
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ lib/                               # ๐Ÿ“‚ Reusable UI components and stores
โ”‚   โ”‚   โ”œโ”€โ”€ routes/                            # ๐Ÿ›ค๏ธ Pages and endpoints for different views
โ”‚   โ”‚   โ”œโ”€โ”€ services/                          # ๐Ÿ› ๏ธ API service modules for interacting with backend
โ”‚   โ”‚   โ”œโ”€โ”€ app.html                           # ๐Ÿ  Main HTML template for SvelteKit
โ”‚   โ”‚   โ”œโ”€โ”€ hooks.server.js                    # ๐Ÿ”„ Server-side hooks for handling requests
โ”‚   โ”‚   โ”œโ”€โ”€ index.js                           # ๐Ÿš€ Entry point for the SvelteKit application
โ”‚   โ”‚   โ””โ”€โ”€ styles/                            # ๐ŸŽจ Tailwind CSS stylesheets for the application
โ”‚   โ”œโ”€โ”€ package.json                           # ๐Ÿ“ฆ Project dependencies and scripts for the SvelteKit app
โ”‚   โ””โ”€โ”€ .env                                   # ๐ŸŒ Environment variables for frontend configuration
|
โ””โ”€โ”€ misc/                                      # ๐Ÿ—ƒ๏ธ Miscellaneous files (e.g., images, documentation)

๐Ÿ”ง Requirements

  • Backend: Java 17+ and Maven
  • Frontend: Node.js and npm (or yarn)

๐Ÿ—๏ธ Setup Instructions

Backend (IntelliJ IDEA)

  1. Clone the Repository:

    git clone https://github.com/YourUsername/event-management-system.git
    cd event-management-system
    
  2. Import Project into IntelliJ:

    • Open IntelliJ IDEA.
    • Select File -> Open and choose the root directory of the project.
    • IntelliJ will automatically detect the Maven project and import all sub-modules.
  3. Run the Application:

    • Navigate to the backend directory within IntelliJ IDEA.
    • Open the Application.java class (or the main class of your microservice).
    • Click the Run button or use Shift + F10 to start the application.
  4. Verify the Application:

    • Check that the application starts without errors and the required ports are open.

Frontend (VSCode)

  1. Clone the Repository:

    git clone https://github.com/YourUsername/event-management-system.git
    cd event-management-system/frontend
    
  2. Install Dependencies:

    npm install
    
  3. Run the Application:

    npm run dev
    
  4. Verify the Application:

    • Open a browser and navigate to http://localhost:5173 to see the SvelteKit application in action.

๐Ÿ“ฌ API Testing

You can test the API endpoints using the provided Postman collection.

Import this collection into Postman to explore and test the API endpoints for the Event Management System.

๐Ÿค Project Contributors