Skip to content

5OO/events_be

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event Registration System

Overview

This document outlines the setup and architecture of the Event Registration System, which is designed to manage future and past events, register participants (individuals and companies), and handle event-specific information.

Technologies Used

  • Programming Language: Java
  • Framework: Spring Boot
  • Database: H2 Database
  • Frontend: Vue.js 3 with Bootstrap for UI
  • Development Environment: IntelliJ IDEA Ultimate
  • Version Control: Git with repository hosted on GitHub
  • Build Tool: Maven

Installation Guide

Prerequisites

  • Java JDK 22
  • Node.js and npm (for the frontend)
  • IntelliJ IDEA Ultimate or Community Edition
  • Git
  • Maven
  • MySQL 8

Backend Setup

  1. Clone the Repository:

    git clone https://github.com/5OO/events_be.git
    cd events_be
  2. Open the Project:

    • Open IntelliJ IDEA.
    • Select "Open" and navigate to the cloned directory.
    • IntelliJ should automatically recognize the project as a Spring Boot application.
  3. Database Configuration:

    • The application uses MySQL as the database.
      • Update the database configuration in application-local.properties or use environment variables to set the database connection details.
      • Create database "events"
       spring.datasource.url=jdbc:mysql://<your-database-url>:3306/events 
       spring.datasource.username=<your-username>
       spring.datasource.password=<your-password>
       spring.jpa.hibernate.ddl-auto=update
    
  4. Run the Application:

    • Locate EventsApplication.java in the IDE and run it as a Spring Boot application.
    • The application should be accessible on http://localhost:8080. To manage your MySQL database, use a tool like MySQL Workbench or the MySQL command-line client.
    mysql -u <your-username> -p -h <your-database-url> -P 3306
    

Database Configuration

MySQL Database

The system utilizes a MySQL database for production and development environments.

JDBC URL: jdbc:mysql://<your-database-url>:3306/events
Username: <your-username>
Password: <your-password>

The schema is automatically generated by Hibernate upon application startup based on the JPA entities.

Frontend Setup

  1. Clone the Repository:

    git clone https://github.com/5OO/events_front.git
    cd events_front
  2. Install Dependencies:

    npm install
  3. Run the Frontend:

    npm run dev

Architecture Overview

The Event Registration System adopts a layered architecture with clear separation of concerns, facilitating maintainability and scalability.

Key Components

  • Controller Layer: Handles HTTP requests, orchestrating the flow of data between the frontend and the service layer.
  • Service Layer: Contains business logic for managing events, participants, and other core functionalities. It ensures the application's business rules and validation are correctly executed.
  • Repository Layer: Interfaces the database, handling all data persistence operations using Spring Data JPA.
  • Model Layer: Represents the application's domain model including entities such as Event, Individual, and Company.
  • DTO (Data Transfer Objects): Used to transfer data between the client and the server without exposing internal details of the database entities.
  • Validation Layer: Ensures that incoming data adheres to defined constraints before processing.
  • Exception Handling: Centralized exception handling mechanism to manage error scenarios gracefully.

Dependency Management

Spring Boot's Inversion of Control (IoC) container and dependency injection features are extensively used to decouple the application components, making them easy to manage and test.

Testing

Automated tests are written using JUnit and cover the service layer extensively to ensure that business logic is correctly implemented. Integration tests for controllers can be added to ensure the REST API behaves as expected under different scenarios.

Database Diagram

The database schema is included in the project repository and shows how the Events, Individuals, and Companies tables are structured and interrelated.

Untitled(2)

Version Control

The project's progress and versioning are managed through Git, with the repository hosted on GitHub. This setup ensures that changes are tracked and documented, facilitating collaborative development and code reviews.


About

The events registration system backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published