flatlining/clean-architecture-java-example
48.7
Weak · 21 September 2026
728
lines of production code
Java
primary language
4
measurements over time
What this system is
This system is a Spring Boot-based backend service for managing 'Circular' entities, structured with a clean architecture separating core domain logic, data persistence, and presentation layers. It exposes a REST API to create, read, delete, and list circular records, utilizing Spring's dependency injection and H2 database integration. The codebase is organized as a multi-module Maven project with comprehensive unit and integration tests covering all use cases and repository implementations.
Features
Added MIT license and project documentation
The repository now includes a MIT license file (LICENSE.md) and a comprehensive README in reStructuredText format. The documentation outlines the project's clean architecture, including its core, dataproviders, entrypoints, and configuration layers, along with testing strategies and usage instructions.
(repo-wide) · high confidence
Added REST API for managing circular entities
Introduced a new REST interface for creating, reading, deleting, and listing circular entities. The \CircularController\ exposes endpoints at \/circular\ (POST, GET, DELETE) and \/circular/{id}\ (GET, DELETE), delegating to use cases via \UseCaseExecutor\. Error handling is centralized in \CircularControllerAdvice\, which maps \NotFoundException\ to 404 and \DomainException\ to 500, returning a structured \ApiResponse\ with timestamp, status, reason, and message. A \CircularMapper\ converts domain entities to response DTOs, and a \RequestResponseLoggingFilter\ logs HTTP requests and responses.
presenter · high confidence
Introduce core use cases and repository interface for managing Circular entities
Added a new \CircularRepository\ interface defining CRUD operations (create, read by identity, read all, delete by identity, delete all) for the \Circular\ domain model. Implemented corresponding use cases (\CreateCircularUseCase\, \ReadAllCircularUseCase\, \ReadCircularUseCase\, \DeleteCircularUseCase\, \DeleteAllCircularUseCase\) that interact with the repository. The \CreateCircularUseCase\ also utilizes a new \GenerateRandomIdentityUseCase\ to generate unique identities for new circulars. This establishes the backend logic for creating, reading, and deleting circular records.
core/src/main/java/dev/schertel/cq/core/usecase/circular · high confidence
Introduces core domain and use-case abstractions
The application now includes foundational domain classes (Circular, Identity, DomainException, NotFoundException) and a generic UseCase/UseCaseExecutor interface for executing business logic. This establishes a structured approach to domain modeling and use-case execution.
core/src/main/java/dev/schertel/cq/core/domain · high confidence
Behavioural changes
Add H2 database repository for Circular entities
A new H2-based persistence layer for Circular entities has been introduced. This includes a Spring Data JPA repository interface and an implementation class that maps between domain models and database entities, with logging added to track create, read, and delete operations.
data/src/main/java · high confidence
Added empty placeholder file in core resources
An empty file named .empty was added to the core/src/main/resources directory. This appears to be a placeholder to ensure the directory is tracked by version control.
core/src/main/resources · high confidence
Introduce Spring configuration classes for dependency injection
The application now uses explicit Spring configuration classes to wire up use cases and repositories. Core use cases (such as GenerateRandomIdentity, CreateCircular, ReadAllCircular, etc.) are registered as beans in CoreConfig. The CircularRepository is injected with a Logger and a database-specific repository implementation in DataConfig. A global Logger bean is provided via LoggerConfig, enabling automatic logger injection into components. This change establishes the dependency injection structure for the app module.
app/src/main · high confidence
Removal of default application configuration
The default application properties file has been removed from the project. This eliminates the standard configuration file that previously provided default settings for the application.
src/main · low confidence
Test coverage
Added Karate-based API tests for the Circular Queue resource; Added tests for GenerateRandomIdentityUseCase; Added unit tests for CircularEntity; Added unit tests for CircularRepositoryImpl; Added unit tests for circular use cases; Added unit tests for domain classes.
Dependencies
Migrate to Spring Boot 2.3 and restructure project into multi-module Maven build
The project has been upgraded to Spring Boot 2.3.0.RELEASE, which changes the dependency management and available starters. The build system has been restructured from a single-module project into a multi-module Maven build with four distinct modules: app, core, data, and presenter. Each module now has its own \pom.xml\ with specific dependencies (e.g., Spring Boot starters, Lombok, JUnit 5, Mockito, AssertJ, Karate, H2, ModelMapper, Jackson JSR310, and various test libraries). The parent \pom.xml\ defines these modules and manages common properties and plugins, including the \flatten-maven-plugin\ for version management. This change impacts how the application is built and deployed, requiring a multi-module build process.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 50 → 49 (-0.9)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.2)
- Architecture 100 → 87 (-13.2)
- Maturity 28 → 28 (+0.0)
- Readiness 33 → 37 (+3.7)
- Security 100 → 100 (+0.0)
- Domain Modelling 100 → 100 (+0.0)
Resolved (7)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- Duplicated block (7 lines × 2) (presenter/src/main/java/dev/schertel/cq/presenter/rest/circular/CircularControllerAdvice.java)
- No exposed public API
- Scanner failed to run — not a clean result
- Test reliability not included
- single-maintainer — knowledge-concentration (bus factor) risk
New (17)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Duplicated block (8 lines × 2) (presenter/src/main/java/dev/schertel/cq/presenter/rest/circular/CircularControllerAdvice.java)
- No ADRs found
- No assertions (empty test): contextLoads (app/src/test/java/dev/schertel/cq/CentralQueueApplicationTests.java)
- No assertions: errorNotFound (presenter/src/test/java/dev/schertel/cq/presenter/rest/circular/CircularControllerTest.java)
- No assertions: errorNotFound (presenter/src/test/java/dev/schertel/cq/presenter/rest/circular/CircularControllerTest.java)
- No assertions: success (presenter/src/test/java/dev/schertel/cq/presenter/rest/circular/CircularControllerTest.java)
- No assertions: success (presenter/src/test/java/dev/schertel/cq/presenter/rest/circular/CircularControllerTest.java)
- No assertions: successWithAllProperties (presenter/src/test/java/dev/schertel/cq/presenter/rest/circular/CircularControllerTest.java)
- No assertions: successWithAllProperties (presenter/src/test/java/dev/schertel/cq/presenter/rest/circular/CircularControllerTest.java)
- No assertions: successWithItems (presenter/src/test/java/dev/schertel/cq/presenter/rest/circular/CircularControllerTest.java)
- No assertions: successWithNoItems (presenter/src/test/java/dev/schertel/cq/presenter/rest/circular/CircularControllerTest.java)
- No assertions: successWithNoProperties (presenter/src/test/java/dev/schertel/cq/presenter/rest/circular/CircularControllerTest.java)
- No assertions: successWithOnlyDescription (presenter/src/test/java/dev/schertel/cq/presenter/rest/circular/CircularControllerTest.java)
- No assertions: successWithOnlyName (presenter/src/test/java/dev/schertel/cq/presenter/rest/circular/CircularControllerTest.java)
- Scanner failed to run — not a clean result
- Scanner failed to run — not a clean result
Architecture
- Containers 0 added · 0 removed · contexts 1 added · 0 removed · edges 0 added · 0 removed
Added bounded contexts (1)
- data
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
flatlining/clean-architecture-java-example was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit eac38a15f0c4a1f0ec6daaab26588483feb40a1b — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.