A comprehensive event and venue management REST API built with Spring Boot, following hexagonal architecture principles and modern development practices.
EventApp is a microservices-ready application that manages events and venues with full CRUD operations, advanced JPA relationships, database migrations, and JWT-based security.
- β RESTful API for Events and Venues management
- β Hexagonal Architecture (Ports & Adapters pattern)
- β JPA/Hibernate with PostgreSQL persistence
- β Flyway database migrations
- β Advanced Relations (OneToMany/ManyToOne between Venues and Events)
- β JWT Authentication with Spring Security 6+
- β RFC 7807 Error Handling (ProblemDetail)
- β Soft Delete support for all entities
- β Bean Validation for request DTOs
- β OpenAPI/Swagger documentation
- β Docker support with Docker Compose
This project follows Hexagonal Architecture (Clean Architecture):
src/main/java/com/codeup/eventapp/
βββ domain/ # Business logic (core)
β βββ model/ # Domain entities
β βββ ports/in/ # Input ports (use cases)
β βββ ports/out/ # Output ports (repository interfaces)
βββ application/ # Use case implementations
β βββ usecases/
βββ infrastructure/ # External adapters
β βββ adapters/ # Repository implementations
β βββ controllers/ # REST controllers
β βββ entities/ # JPA entities
β βββ security/ # JWT & Security config
β βββ web/ # DTOs, mappers, exception handlers
- Java 17+
- Maven 3.8+
- Docker & Docker Compose
- PostgreSQL 15+ (or use Docker)
-
Clone the repository
git clone https://github.com/TonyS-dev/eventapp-spb.git cd eventapp-spb -
Start PostgreSQL with Docker
docker-compose up -d
-
Run the application
./mvnw spring-boot:run
The API will be available at http://localhost:8080
Configure the following in application.properties or via environment:
# Database
spring.datasource.url=jdbc:postgresql://localhost:5432/eventapp
spring.datasource.username=postgres
spring.datasource.password=postgres
# Flyway
spring.flyway.enabled=true
# Server
server.port=8080Access interactive API documentation at:
http://localhost:8080/swagger-ui.html
Login (Mock credentials for demo):
POST /auth/login
Content-Type: application/json
{
"username": "admin",
"password": "admin"
}Response:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}Use the token in subsequent requests:
Authorization: Bearer <token>| Method | Endpoint | Description |
|---|---|---|
| GET | /api/venues |
List all venues |
| GET | /api/venues/{id} |
Get venue by ID |
| POST | /api/venues |
Create new venue |
| PUT | /api/venues/{id} |
Update venue |
| DELETE | /api/venues/{id} |
Soft delete venue |
| GET | /api/venues/deleted |
List deleted venues |
| PUT | /api/venues/{id}/restore |
Restore deleted venue |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/events |
List all events |
| GET | /api/events/{id} |
Get event by ID |
| POST | /api/events |
Create new event |
| PUT | /api/events/{id} |
Update event |
| DELETE | /api/events/{id} |
Soft delete event |
| GET | /api/events/deleted |
List deleted events |
| PUT | /api/events/{id}/restore |
Restore deleted event |
POST /api/venues
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Madison Square Garden",
"address": "4 Pennsylvania Plaza, New York, NY 10001",
"capacity": 20000
}POST /api/events
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Spring Boot Conference 2025",
"location": "New York",
"date": "2025-06-15T09:00:00",
"description": "Annual Spring Boot developer conference",
"venueId": 1
}CREATE TABLE venues (
id BIGSERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
address VARCHAR(255) NOT NULL,
capacity INTEGER NOT NULL,
deleted BOOLEAN DEFAULT FALSE
);CREATE TABLE events (
id BIGSERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL UNIQUE,
location VARCHAR(255),
date TIMESTAMP,
description VARCHAR(1000),
venue_id BIGINT REFERENCES venues(id),
deleted BOOLEAN DEFAULT FALSE
);./mvnw test./mvnw clean package
java -jar target/eventapp-0.0.1-SNAPSHOT.jardocker build -t eventapp:latest .
docker run -p 8080:8080 eventapp:latest- Framework: Spring Boot 3.4.0
- Language: Java 17
- Database: PostgreSQL 15
- ORM: Hibernate/JPA
- Migration: Flyway
- Security: Spring Security 6 + JWT
- Validation: Jakarta Bean Validation
- Documentation: SpringDoc OpenAPI 3
- Build Tool: Maven
- Containerization: Docker
This project follows Gitflow with 5 User Stories:
main- Production-ready codedevelop- Integration branchfeat/User-Story-1- In-Memory Catalog (Oct 30, 2025)feat/User-Story-2- JPA Persistence (Nov 7, 2025)feat/User-Story-3- Hexagonal Architecture (Nov 14, 2025)feat/User-Story-4- Relations & Flyway (Nov 21, 2025)feat/User-Story-5- Security & JWT (Dec 5, 2025)
This project is licensed under the MIT License.
Tony S
- GitHub: @TonyS-dev
Contributions, issues, and feature requests are welcome!
Built with β€οΈ using Spring Boot