hsenasilva/sample-cqrs
46.0
Weak · 21 September 2026
535
lines of production code
Kotlin
primary language
4
measurements over time
What this system is
This system is a CQRS-based application that separates command and query responsibilities into distinct services. The command server handles state-changing operations and long-running processes using the Axon framework, while the query server manages read operations and data retrieval. It relies on MongoDB for persistence and Kafka for messaging, exposing REST APIs for both commands and queries.
Features
Introduce CQRS command server with Axon framework integration
The command-server module now implements a Command-Query Responsibility Segregation (CQRS) architecture using the Axon Framework. This includes a new Spring Boot application entry point, an aggregate root (SampleAggregate) handling Create and Cancel commands, and a saga (SampleSaga) for long-running process coordination. The server exposes a REST API at /samples via CommandController, which validates incoming requests and dispatches commands through the Axon command bus. Configuration is provided for MongoDB event storage, Kafka messaging, and Jackson serialization, with CORS headers explicitly set to allow cross-origin requests.
command-server · high confidence
Introduce core domain models and events for the CQRS sample
Added new files defining the core domain models and events for the CQRS sample application. The changes introduce a base SampleEvent class and specific event types (CreatedSampleEvent, CanceledCreateSampleEvent) alongside domain models including SampleId, Sample, SampleAction, and SampleStatus. These files establish the foundational data structures for the sample's command and query handling.
sample-core · high confidence
Introduce query-server with CQRS support and REST API
The query-server module is introduced, providing a Spring Boot application that exposes a REST API for retrieving sample data. It includes configuration for Axon (event handling, Kafka integration), MongoDB, and CORS headers. The server listens on port 8085 at the /query-sample/api context path, serving GET requests for /samples/{id} and processing domain events (RequestedSampleEvent, CreatedSampleEvent, CanceledCreateSampleEvent) to update the MongoDB repository.
query-server · high confidence
Behavioural changes
1 commit (0 fixes) modifying classes
A change to existing behaviour in classes — 1 commit, 1 file.
classes · low confidence · unverified
Dependencies
Updated Java build dependencies and module structure
The project's Maven build configuration has been updated across four POM files (root, command-server, query-server, and sample-core). Key changes include upgrading the Gson library to version 2.8.9 in the query-server module, adding the sample-core module, and updating various dependency versions and repository configurations to support the new multi-module CQRS architecture.
(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 56 → 46 (-10.0)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 99 (-0.6)
- Architecture 48 (new)
- Maturity 76 → 76 (+0.0)
- Readiness 18 → 18 (+0.0)
- Security 100 → 97 (-2.9)
- Domain Modelling 100 → 100 (+0.0)
- Event Sourcing 100 → 100 (+0.0)
Resolved (7)
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- Duplicated block (5 lines × 3) (query-server/src/main/kotlin/hsenasilva/com/github/sample/cqrs/listener/SampleEventHandler.kt)
- No exposed public API
- Scanner failed to run — not a clean result
- change coupling unreadable for .kt — no production change history could be paired for this repository's own source
- early-stage repository — too few commits for a meaningful bus factor
- early-stage repository — too little history to judge knowledge freshness
New (11)
- 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)
- Duplicated block (15 lines × 2) (command-server/src/main/kotlin/hsenasilva/com/github/sample/cqrs/configuration/CorsConfiguration.kt)
- Duplicated block (5 lines × 3) (query-server/src/main/kotlin/hsenasilva/com/github/sample/cqrs/listener/SampleEventHandler.kt)
- High IaC: WD-COMPOSE-0002 (docker-compose.yml)
- High IaC: WD-COMPOSE-0002 (docker-compose.yml)
- Medium IaC: WD-COMPOSE-0002 (docker-compose.yml)
- Medium IaC: WD-COMPOSE-0002 (docker-compose.yml)
- Scanner failed to run — not a clean result
- Scanner failed to run — not a clean result
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
hsenasilva/sample-cqrs 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 c304acb579aff0a5895f1e1ed4476e9da417bc4a — 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.