getSoftware/clean-architecture-hexagonal-my-approach
54.2
Adequate · 22 September 2026
1.4k
lines of production code
Java
with Kotlin
6
measurements over time
What this system is
This is a Spring Boot-based Java application implementing a clean architecture for user management. It exposes a REST API to register, update, and query users, utilizing a CQRS pattern to separate read and write operations. The system manages user and address data via JPA repositories and Liquibase, with a focus on structured error handling and dependency injection.
Features
Add UserJpaRepository for database access
A new Spring Data JPA repository interface, UserJpaRepository, is introduced to handle persistence operations for the User entity. This interface extends JpaRepository and provides specific query methods to retrieve user data by name and domain entity ID, enabling the application layer to interact with the database.
src/main/java/eu/getsoftware/cleanarchitecture/adapter/out/persistence/repository · high confidence
Add UserResponseDTOPortFormatter for user response formatting
A new adapter component, UserResponseDTOPortFormatter, has been introduced to handle the formatting of user domain responses. This component implements the IUserResponseDTOPortPresenter interface, providing methods to format successful responses by converting creation time to a specific string format, and to handle failure views by throwing appropriate exceptions for both specific business/argument errors and unexpected server errors.
src/main/java/eu/getsoftware/cleanarchitecture/adapter/out · medium confidence
Added persistence mappers for user and address data
The application now includes new MapStruct mapper interfaces to handle data conversion between domain models and database entities. Specifically, UserEntityMapper converts between UserRootDomainEntity and UserMappedDBEntity, while AddressValueObjectMapper handles AddressValueObject to AddressDBEmbeddable conversion. These mappers enable proper data mapping for user and address persistence, supporting the CQRS pattern implementation.
src/main/java/eu/getsoftware/cleanarchitecture/adapter/out/persistence/mapper · high confidence
Implemented user management features in the clean architecture
Added new files implementing the user domain, including controllers, use cases, DTOs, and persistence models. This introduces the ability to register, update, and query users via a REST API, with a clear separation between the application layer (use cases) and the infrastructure layer (persistence adapters).
. · high confidence
Introduced domain model abstractions and user entity implementation
Added new domain model components including the UserRootDomainEntity with password validation logic, a UserDomainFactory for entity creation, and supporting interfaces for DTOs (IDomainRequestDTO, IUserDomainResponseDTO) and mappers (IDomainMapper). The change also introduces abstract repository and service classes (GenericRepositoryServiceAbstr) to handle entity persistence and mapping, establishing a richer domain model layer within the application domain.
src/main/java/eu/getsoftware/cleanarchitecture/application/domain · medium confidence
Behavioural changes
Introduces Spring Boot configuration classes for dependency injection
The application now uses Spring Boot's dependency injection framework to manage object creation and decouple business logic from the DI container. New configuration classes (ApplicationConfiguration, DomainConfiguration, InfrastructureAdapterConfiguration) are added to the main module. InfrastructureAdapterConfiguration specifically enables JPA repository scanning and entity scanning for the persistence adapter layer, allowing Spring to automatically register beans for classes in the adapter and application packages without requiring explicit @Component annotations on domain classes.
src/main/java/eu/getsoftware/cleanarchitecture/main · high confidence
Introduces distinct query and command interfaces for user management
The application layer now explicitly separates query and command operations for user management. A new GenericInDTOQueryService interface provides generic find methods, while a specific UserInDTOQueryService handles user lookups. Concurrently, dedicated use case interfaces (UserRegisterUseCase, UserUpdateUseCase) are introduced to handle commands, ensuring that commands flow through use cases while queries flow through query services, aligning with the CQRS pattern.
src/main/java/eu/getsoftware/cleanarchitecture/application/port/in · high confidence
Migrated project build system to Gradle
The project has been migrated from its previous build system to Gradle, introducing the Gradle wrapper scripts (gradlew and gradlew.bat) to manage the build process and dependencies. Additionally, a Liquibase configuration file (liquibase.properties) was added to support database migration management.
(repo-wide) · high confidence
New port presenter interface for user response DTOs
A new interface, IUserResponseDTOPortPresenter, has been added to the application layer's 'port out' directory. This interface defines the contract for presenting user domain response DTOs, including methods to prepare success and failure views, facilitating the interaction between the application core and external adapters.
src/main/java/eu/getsoftware/cleanarchitecture/application/port/out/user · high confidence
Standardized JSON error responses for API exceptions
The application now returns consistent JSON error responses for API exceptions. A new JsonErrorResponse class defines the structure for error messages, and an ApiExceptionHandler controller advice maps specific exceptions (EntityNotFoundException, BusinessException, MethodArgumentNotValidException, and generic Exception) to appropriate HTTP status codes and JSON payloads, ensuring clients receive structured error information.
src/main/java/eu/getsoftware/cleanarchitecture/adapter/in · high confidence
Fixes
Initial database schema and test data configuration
Added configuration for a PostgreSQL database connection and Liquibase migration setup. The application now includes SQL scripts to create the 'users', 'roles', 'products', 'orders', and 'order\_items' tables, along with a test data script for testing purposes.
src/main/resources · medium confidence
Separate query and persistence interfaces for the user port service
The user port service layer now distinguishes between read and write operations. A new GenericOutRepositoryQueryService interface defines query methods (findAll, findById, findByField, findByDomainId, findOrThrow) for retrieving entities, while a separate GenericOutPersistService interface handles update operations (convertAndPersist). This separation aligns with the CQRS pattern, allowing the application to enforce stricter boundaries between commands and queries in the user domain.
src/main/java/eu/getsoftware/cleanarchitecture/application/port/out/user/iportservice · high confidence
Separate read and write paths for user persistence
The application now enforces a clear separation between query and update operations for user data, implementing the CQRS pattern. New adapter components, UserOutRepositoryQueryAdapter and UserOutRepositoryUpdateAdapter, handle read and write operations respectively, each extending their respective generic base classes to interact with the database.
src/main/java/eu/getsoftware/cleanarchitecture/adapter/out/persistence/service · high confidence
Test coverage
Added integration and unit tests for the user registration controller; Added unit tests for application layer use cases.
Dependencies
Migrate build system to Gradle with Spring Boot 3.2.1
The project has been migrated to use Gradle as the build system, replacing the previous build configuration. This change introduces Spring Boot version 3.2.1 and configures Java 21 compatibility. The dependency graph now explicitly includes Spring Boot starters for JPA, web, and validation, alongside MapStruct 1.6.3 for object mapping and Lombok for boilerplate reduction. Test dependencies have been updated to include Testcontainers for PostgreSQL and JUnit 5, with JUnit Vintage engine excluded.
(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 → 54 (+3.8)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 99 (-1.0)
- Architecture 69 → 69 (+0.0)
- Maturity 57 → 58 (+1.3)
- Readiness 26 → 33 (+7.7)
- Security 100 → 100 (+0.0)
- Domain Modelling 100 → 100 (+0.0)
Resolved (5)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- No exposed public API
- Small-team knowledge concentration
- Test reliability not included
New (14)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- No ADRs found
- No direct assertions: testCreateUser (src/test/java/eu/getsoftware/cleanarchitecture/adapter/in/web/controller/UserRegisterControllerIntegrationTest.java)
- No direct assertions: testCreateUser (src/test/java/eu/getsoftware/cleanarchitecture/adapter/in/web/controller/UserRegisterControllerMVCTest.java)
- No direct assertions: testFindById (src/test/java/eu/getsoftware/cleanarchitecture/adapter/in/web/controller/UserRegisterControllerIntegrationTest.java)
- No direct assertions: testFindById (src/test/java/eu/getsoftware/cleanarchitecture/adapter/in/web/controller/UserRegisterControllerMVCTest.java)
- No direct assertions: testUpdateAddress (src/test/java/eu/getsoftware/cleanarchitecture/adapter/in/web/controller/UserRegisterControllerIntegrationTest.java)
- No direct assertions: testUpdateAddress (src/test/java/eu/getsoftware/cleanarchitecture/adapter/in/web/controller/UserRegisterControllerMVCTest.java)
- Test project verifies nothing: eu.getsoftware.cleanarchitecture (src/test/java/eu/getsoftware/cleanarchitecture/adapter/in/web/controller/UserRegisterControllerIntegrationTest.java)
- TodoComment (src/main/java/eu/getsoftware/cleanarchitecture/adapter/out/UserResponseDTOPortFormatter.java)
- TodoComment (src/main/java/eu/getsoftware/cleanarchitecture/adapter/out/UserResponseDTOPortFormatter.java)
- TodoComment (src/main/java/eu/getsoftware/cleanarchitecture/application/domain/model/user/UserRootDomainEntity.java)
Architecture
- Containers 0 added · 0 removed · contexts 1 added · 1 removed · edges 0 added · 0 removed
Added bounded contexts (1)
- eu.getsoftware.cleanarchitecture
Removed bounded contexts (1)
- .
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
getSoftware/clean-architecture-hexagonal-my-approach 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 22 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 0f0b4d38299bdb6b0239a132ada713a6c0336514 — 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-821afab8930d.