Modular monolith REST API for resource booking and payment processing built with Java 25 and Spring Boot.
- Language & Framework: Java 25, Spring Boot 4
- Security: Spring Security, JWT (JJWT)
- Database & Migrations: PostgreSQL, Flyway
- Tooling & Quality: Spotless (Palantir Java Format), Checkstyle, Error Prone, JaCoCo
- Testing: JUnit 5, AssertJ, Mockito, ArchUnit, Testcontainers
- Local Infra: Docker Compose (PostgreSQL, Mailpit)
auth— User registration, authentication, JWT issuing & validation, user status management.resource— Inventory of bookable resources (pricing, status, availability).booking— Reservation lifecycle, schedule collision detection, available slots query.payment— Payment handling with idempotency key support.notification— Event notifications (emails dispatched via SMTP).
- JDK 25 installed
- Docker & Docker Compose running
Configure the repository pre-commit hooks:
./gradlew installGitHooksRun PostgreSQL and Mailpit in the background:
docker compose up -d- PostgreSQL:
localhost:5432(DB:booking, user/pass:postgres/postgres) - Mailpit Web UI: http://localhost:8025 (SMTP on
1025)
Start with the local Spring profile:
./gradlew bootRun --args='--spring.profiles.active=local'Default local admin: admin@admin.com / admin
| Task | Command | Description |
|---|---|---|
| Run unit tests | ./gradlew test |
Fast tests excluding integration suite |
| Run integration tests | ./gradlew integrationTest |
Full context tests via Testcontainers |
| Format code | ./gradlew spotlessApply |
Applies Palantir Java Format & trims imports |
| Code check | ./gradlew check |
Runs Spotless check, Checkstyle & integration tests |
| Coverage report | ./gradlew test jacocoTestReport |
Generates HTML report in build/reports/jacoco/test/html/ |
| Stop local infra | docker compose down |
Stops and removes containers |