Skip to content
CAI
Software that uses CAICheck a score

barsifedron/candid-cqrs

57.0

Adequate · 20 September 2026

4.3k

lines of production code

Java

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a CQRS framework library that provides core abstractions for command, query, and event buses with middleware support, alongside integration utilities for Spring and Guice. It includes a reference implementation called 'Happy Neighbourhood' that demonstrates these patterns in a community item-lending application, handling member registration, item loans, and returns. The project serves as both a reusable architectural toolkit and a concrete example of how to structure a Java-based CQRS application using Spring Boot and JPA.

Features

Added Guice integration for automatic CQRS handler discovery

This change introduces the \cqrs-guice-utils\ module, which provides a Guice module (\CqrsHandlersModule\) and registry classes (\CommandHandlersRegistry\, \QueryHandlersRegistry\, \DomainEventHandlersRegistry\) to automatically discover and register command, query, and domain event handlers. Using the Reflections library, these registries scan specified packages to map handler types to their corresponding commands, queries, or events, allowing the application to inject and instantiate handlers lazily via Guice providers.

cqrs-guice-utils · high confidence

Initial CQRS API with middleware-based command, query, and event buses

This change introduces the core CQRS API interfaces and implementations in the bus-cqrs-api module, enabling developers to dispatch commands, queries, and domain events through pluggable middleware chains. It provides CommandBus and MapCommandBus for routing commands to handlers, QueryBus and MapQueryBus for routing queries, and DomainEventBus with MapDomainEventBus for dispatching domain events to multiple listeners. A key architectural feature is the middleware pattern (CommandBusMiddleware, QueryBusMiddleware, DomainEventBusMiddleware) which allows intercepting and decorating these buses for cross-cutting concerns. Specifically, the DomainEventsDispatcher middleware automatically routes domain events returned by command handlers to the domain event bus, ensuring events are processed as part of the command execution flow. The API also includes a ToProcessAfterMainTransaction marker interface, hinting at transactional boundaries for event processing.

bus-cqrs-api/src · high confidence

Initial CQRS domain implementation for the Happy Neighbourhood loan system

The happy-neighbourhood-core module introduces the foundational CQRS (Command Query Responsibility Segregation) domain for managing a community item-lending association. This change adds the core command handlers and domain models required to register new members and items, process item loans with daily fee and late-fine calculations, and handle item returns. It also implements the domain event infrastructure to trigger side effects, such as sending confirmation emails to members upon borrowing, and provides the necessary repository interfaces and in-memory implementations to support these operations.

happy-neighbourhood-core · high confidence

Initial project configuration and user documentation added

The application now includes essential configuration files to run locally, specifically setting up an H2 in-memory database with Hibernate for persistence. Additionally, a welcome page has been added to the public directory, providing users with instructions and links for testing the API endpoints using Postman or curl.

happy-neighbourhood-spring-shell/src/main/resources · high confidence

Initial project setup with Apache 2.0 license and Gradle wrapper

The repository has been initialized with foundational project files, including an Apache License 2.0, a Code of Conduct, and a detailed README explaining the CQS/CQRS library goals. A Gradle wrapper (gradlew) has been added to ensure consistent builds, alongside a .gitignore file to exclude build artifacts and IDE settings.

(repo-wide) · high confidence

Spring Boot shell for the Happy Neighbourhood CQRS application

This change introduces the Spring Boot integration layer for the Happy Neighbourhood application, providing the infrastructure to run the CQRS domain. It includes Spring configuration classes for JPA/Hibernate persistence and dependency injection, REST controllers for managing items, members, and reports, and a startup listener that seeds initial data. The wiring supports a command bus with middleware for validation, logging, and transactional boundaries, allowing domain events to be processed either within the main transaction or in a separate one.

happy-neighbourhood-spring-shell/src/main/java · high confidence

Spring integration for automatic CQRS handler registration

The cqrs-spring-utils module now provides Spring-specific utilities to automatically discover and register Command, Query, and Domain Event handlers. New components (CommandHandlersRegistry, QueryHandlersRegistry, DomainEventHandlersRegistry) scan specified packages for handler implementations and register them in the Spring application context, allowing the framework to instantiate buses without manual wiring. Additionally, a ToProcessAfterMainTransaction marker interface is introduced to support executing specific domain event handlers after the main database transaction commits.

cqrs-spring-utils · high confidence

Test coverage

Added integration tests for the Spring Boot application

Added a new test suite for the happy-neighbourhood-spring-shell module, including a basic context load test and a comprehensive integration test for the loan workflow. The integration test verifies the end-to-end flow of registering a member, adding an item, borrowing the item, returning it, and querying the resulting state using a random port and an in-memory H2 database configured via new persistence properties.

happy-neighbourhood-spring-shell/src/test · high confidence

Dependencies

Gradle wrapper upgraded to version 7.2

The project's Gradle wrapper has been updated to use Gradle 7.2 (via the distribution URL in gradle-wrapper.properties). This ensures that builds will consistently use this specific Gradle version, providing access to its features and bug fixes while maintaining reproducible build environments across different machines.

gradle · high confidence

Initial multi-project Gradle build setup

The project is initialized as a multi-module Gradle build named 'candid-cqrs', introducing a structured dependency graph with modules including 'bus-cqrs-api', 'cqrs-guice-utils', 'cqrs-spring-utils', 'happy-neighbourhood-core', and 'happy-neighbourhood-spring-shell'. The build enforces Java 8 compatibility via AdoptOpenJDK toolchains, enables parallel execution and caching, and configures reproducible archives. Key dependencies include Spring Boot 2.5.6 for the shell module, Guice 4.0 for utility modules, and QueryDSL 4.4.0 for JPA query generation.

(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

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 55 → 57 (+1.5)
  • Rubric changed (rubric-2026.08.17 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 99 → 99 (-0.6)
  • Architecture 100 → 97 (-3.2)
  • Maturity 48 → 47 (-0.9)
  • Readiness 47 → 50 (+3.7)
  • Security 80 → 95 (+15.3)
  • Domain Modelling 85 → 85 (+0.2)
  • Accessibility 66 → 66 (+0.0)

Resolved (13)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — no supported dependency manifest was read
  • Duplicated block (10 lines × 2) (happy-neighbourhood-core/src/main/java/com/barsifedron/candid/cqrs/happy/utils/cqrs/command/middleware/WithExecutionDurationLoggingCommandBusMiddleware.java)
  • Duplicated block (13 lines × 3) (cqrs-spring-utils/src/main/java/com/barsifedron/candid/cqrs/spring/CommandHandlersRegistry.java)
  • Duplicated block (18 lines × 2) (happy-neighbourhood-spring-shell/src/main/java/com/barsifedron/candid/cqrs/happy/shell/StartupApplicationListenerExample.java)
  • Duplicated block (8 lines × 2) (happy-neighbourhood-core/src/main/java/com/barsifedron/candid/cqrs/happy/utils/cqrs/query/middleware/ExecutionDurationLoggingQueryBusMiddleware.java)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • LLM evaluation failed
  • No exposed public API
  • Test reliability not included
  • dormant codebase — no living knowledge left to concentrate

New (25)

  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no installation or build instructions (README.md)
  • Duplicated block (10 lines × 2) (happy-neighbourhood-core/src/main/java/com/barsifedron/candid/cqrs/happy/utils/cqrs/query/middleware/ExecutionDurationLoggingQueryBusMiddleware.java)
  • Duplicated block (10 lines × 2) (happy-neighbourhood-core/src/main/java/com/barsifedron/candid/cqrs/happy/utils/cqrs/query/middleware/WithFilteringQueryBusMiddleware.java)
  • Duplicated block (11 lines × 2) (cqrs-spring-utils/src/main/java/com/barsifedron/candid/cqrs/spring/CommandHandlersRegistry.java)
  • Duplicated block (11 lines × 2) (happy-neighbourhood-core/src/main/java/com/barsifedron/candid/cqrs/happy/domain/ItemId.java)
  • Duplicated block (11 lines × 2) (happy-neighbourhood-core/src/main/java/com/barsifedron/candid/cqrs/happy/utils/cqrs/command/middleware/WithExecutionDurationLoggingCommandBusMiddleware.java)
  • Duplicated block (11–16 lines × 3) (happy-neighbourhood-spring-shell/src/main/java/com/barsifedron/candid/cqrs/happy/shell/StartupApplicationListenerExample.java)
  • Duplicated block (13 lines × 3) (cqrs-spring-utils/src/main/java/com/barsifedron/candid/cqrs/spring/CommandHandlersRegistry.java)
  • Duplicated block (23 lines × 2) (happy-neighbourhood-core/src/main/java/com/barsifedron/candid/cqrs/happy/utils/cqrs/command/middleware/WithErrorLogCommandBusMiddleware.java)
  • Duplicated block (6 lines × 2) (bus-cqrs-api/src/main/java/com/barsifedron/candid/cqrs/command/MapCommandBus.java)
  • Duplicated block (6 lines × 2) (happy-neighbourhood-core/src/main/java/com/barsifedron/candid/cqrs/happy/utils/cqrs/command/middleware/ValidatingCommandBusMiddleware.java)
  • Duplicated block (6 lines × 2) (happy-neighbourhood-spring-shell/src/main/java/com/barsifedron/candid/cqrs/happy/shell/controllers/ItemController.java)
  • Duplicated block (9 lines × 2) (cqrs-spring-utils/src/main/java/com/barsifedron/candid/cqrs/spring/CommandHandlersRegistry.java)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • No ADRs found
  • …and 5 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

barsifedron/candid-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 20 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 63769961d63bd11e609d129cfe7af1f2d0c990ee — 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-28e75b8e3254.