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.
- 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
- Java JDK 22
- Node.js and npm (for the frontend)
- IntelliJ IDEA Ultimate or Community Edition
- Git
- Maven
- MySQL 8
-
Clone the Repository:
git clone https://github.com/5OO/events_be.git cd events_be
-
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.
-
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
- The application uses MySQL as the database.
-
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
- Locate
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.
-
Clone the Repository:
git clone https://github.com/5OO/events_front.git cd events_front
-
Install Dependencies:
npm install
-
Run the Frontend:
npm run dev
- The frontend should now be accessible on
http://localhost:5173
. - Vue DevTools: Open http://localhost:5173/__devtools__/ as a separate window
- The frontend should now be accessible on
The Event Registration System adopts a layered architecture with clear separation of concerns, facilitating maintainability and scalability.
- 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
, andCompany
. - 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.
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.
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.
The database schema is included in the project repository and shows how the Events
, Individuals
, and Companies
tables are structured and interrelated.
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.