Robust API built with Spring Boot 4 and Kotlin, using a strict Hexagonal Architecture to ensure domain isolation and testability.
The project follows a Contract-First approach using OpenAPI. The server-side code is generated from the OpenAPI spec, ensuring a perfect sync between documentation and implementation.
🔗 Swagger UI (dev mode): http://localhost:8080/api/swagger-ui
The project follows the Ports & Adapters pattern to decouple business logic from technical details:
domain/: The Core.model/: Domain entities and value objects.port/: Inbound (In) and Outbound (Out) interfaces.service/: Business orchestration. Services implement In-Ports and use Out-Ports to execute business logic.
infrastructure/: The Adapters.- Concrete implementations of Out-Ports (Persistence with JPA/PostgreSQL, Security with JWT, Email with SMTP).
- Inbound adapters such as REST Controllers.
application/: The Shell.- Entry point of the application (Main class).
- Global configurations (Spring, Security, Docker Compose).
- Integration tests and architectural validation (ArchUnit).
| Variable | Description | Dev Value |
|---|---|---|
DB_HOST |
PostgreSQL Host | localhost |
DB_PORT |
PostgreSQL Port | 5433 |
DB_NAME |
Database Name | tripr |
JWT_SECRET |
JWT Signature Secret | very-secret-32-characters... |
BASE_URL |
Frontend URL (for email links) | http://localhost:4200 |
The backend automatically manages its infrastructure dependencies (PostgreSQL, Maildev) via devops/compose-dev.yaml using Spring Boot's Docker Compose support.
./gradlew bootRunNote: Docker Desktop must be running.
The project enforces a 80% test coverage (via Kover).
./gradlew test # Run all tests (Unit, Integration, ArchUnit)
./gradlew koverHtmlReport # Generate coverage report (build/reports/kover)- Port Conflict: If
8080is already in use, changeserver.portinapplication-dev.yml. - Docker Error: Ensure Docker Desktop is started before running
bootRun. - Liquibase Lock: If a crash occurs, the
databasechangeloglocktable might stay locked. Manually delete the lock in the DB.