java clean architecture template
a production-minded http api template built with java 25 and spring boot 4, with layer dependencies enforced by archunit.
architecture and implementation details
- split domain, application, infrastructure and web into package-level layers; kept the domain framework-independent and wired infrastructure through application ports.
- implemented register, login and jwt authentication, plus create, list, update, complete and delete endpoints for user-owned todos.
- added optimistic locking, rfc 9457 problem details, validation, pagination and safe resource-ownership rules.
- made the dependency rule executable with archunit, added a 70% line-coverage gate for the domain and application layers, and covered the service with junit 6, mockito and testcontainers tests.
- configured postgresql 18 with flyway migrations, springdoc openapi/scalar, spotless, error prone and jacoco in a gradle-based ci quality gate.