Documentation
README
Layered Architecture
Layer Rules
@RestController ← HTTP only. No business logic. No JPA entities in responses.
↓ DTOs
@Service ← All business logic lives here. Orchestrates repositories.
↓ Domain objects / Entities
@Repository ← Data access only. No business logic. Returns entities or projections.
↓ JPA / JDBC
Database
Controller Layer
- Handles HTTP: parsing requests, validating input (
@Valid), returning responses - Calls ONE service method per endpoint — no orchestration in controllers
- Never returns
@Entityclasses directly — always map to response DTOs - Never injects
@Repository— always goes through a@Service - Exception handling via
@ControllerAdvice, never try/catch in controllers
This is the opening of the README. Read the full README on GitHub.