Skip to content
CAI
Software that uses CAICheck a score

michalzeman/reactor-ddd

60.3

Adequate · 21 September 2026

2.8k

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 bank account and transaction management service built on a Domain-Driven Design architecture. It exposes HTTP APIs to create accounts, deposit or withdraw funds, and process money transfers. The backend enforces strict state machines for transactions and accounts, utilizing an event-driven message bus to coordinate domain events and commands across the system.

How it got here

2019 — Initial project scaffolding and DDD architecture setup

7 changes.

This period marks the initial setup of the codebase, establishing a multi-module Gradle structure and configuring core dependencies. The team implemented the foundational Domain-Driven Design architecture, including a message bus for asynchronous handling and common API interfaces for commands and events. Additionally, the project was scaffolded with essential configuration files and HTTP error handling utilities.

2020 — Initial domain and API implementation

8 changes.

This period focused on establishing the core domain models, application services, and HTTP APIs for both the account and transaction modules. The work introduced key aggregates, state machines, and persistence interfaces to support creating accounts, processing money transfers, and managing transaction lifecycles.

Features

Add application message bus for event and command handling

A new application message bus has been introduced to support the DDD (Domain-Driven Design) architecture. This includes an \ApplicationMessageBus\ interface and its \ApplicationMessageBusImpl\ service, which manage the publishing and streaming of messages (such as events and commands) using Reactor's \Flux\ and \DirectProcessor\. This change enables the application to handle asynchronous message passing between components.

common-components/src/main/java/com/mz/reactor/ddd/common/components/bus · high confidence

Added persistence layer for aggregates and views

The common-persistence-api module now includes the core interfaces and implementations for managing aggregate state and domain views. This includes the AggregateActor, AggregateFacade, and AggregateRepository contracts along with their implementations, enabling command execution and state retrieval. Additionally, a query layer has been introduced with the Query interface and implementation, backed by a generic ViewRepository for storing and retrieving domain views.

common-persistence-api · high confidence

Initial application entry point and configuration for the bank account service

The bank account application is introduced with a new Spring Boot entry point (BankAccountApp) and a configuration class (BankAccountAppConfiguration) that defines HTTP routes for account and transaction handlers, a JSON deserialization scheduler, and a custom ObjectMapper. An application.yml file configures Jackson date serialization and includes a test property, establishing the foundation for the HTTP API and internal threading model.

bank-account/bank-account-application/src/main · medium confidence

Initial implementation of the transaction domain and application layer

The transaction module has been refactored to introduce a new domain model and application service for managing bank transactions. The \TransactionAggregate\ now enforces a strict state machine (INITIALIZED, CREATED, FINISHED, FAILED) and handles commands for creating, finishing, and canceling transactions, including automatic rollback of deposits or withdrawals during cancellation. The \TransactionCommandHandler\ routes commands to the aggregate, while the \TransactionEventHandler\ applies domain events to update the aggregate's state. On the implementation side, \TransactionApplicationServiceImpl\ exposes the transaction logic via a Spring service, and \TransactionQueryImpl\ provides read access to transaction states via a view repository. Wiring is handled by \TransactionConfiguration\, which registers the aggregate repository, facade, and view repository as Spring beans.

bank-account/transaction/transaction-domain, bank-account/transaction/transaction-impl · high confidence

Initial project scaffolding and demo assets

The repository was initialized with core project files including a Gradle wrapper (gradlew, gradlew.bat), a .gitignore configuration, and an Apache 2.0 LICENSE file. Additionally, an Insomnia HTTP demo collection (Insomnia\_http\_demo.json) was added to facilitate testing the application's RESTful API endpoints for account and transaction operations.

(repo-wide) · high confidence

Introduce account domain model and transactional adapter for money transfers

The account module now includes a new \TransactionChangeStreamAdapter\ that listens for transaction events (created, rolled back) and triggers corresponding account commands (deposit, withdraw, transfer). The domain API layer adds a comprehensive set of new domain models: \AccountState\ to track account balance and transaction status, a suite of commands (\CreateAccount\, \DepositMoney\, \WithdrawMoney\, \DepositTransferMoney\, \WithdrawTransferMoney\, \FinishOpenedTransaction\), and a rich set of domain events (\AccountCreated\, \MoneyDeposited\, \MoneyWithdrawn\, \TransferMoneyDeposited\, \TransferMoneyWithdrawn\, and various failure events). This change enables the system to process and update account states in response to external transactional events.

bank-account/account/account-adapters, bank-account/account/account-domain-api · high confidence

Introduces common API interfaces for DDD primitives

The common-api module now provides foundational interfaces for the domain-driven design architecture, including Message, Command, CommandHandler, CommandResult, DomainEvent, EventHandler, DomainView, and value objects like Money and Id. These interfaces define the contract for command execution, event handling, and state representation, enabling consistent interaction with aggregates and event sourcing across the system.

common-api · high confidence

New account API interfaces for commands and queries

The account module introduces two new API interfaces: AccountApplicationService, which defines methods for executing commands like CreateAccount, DepositMoney, and WithdrawMoney, and AccountQuery, which provides methods to retrieve AccountState by ID or list all accounts. These interfaces establish the contract for application-level operations on bank accounts.

bank-account/account/account-api · high confidence

New account domain and HTTP API for managing bank accounts

The account module has been refactored to introduce a new domain model and HTTP API for managing bank accounts. The domain layer now includes an \AccountAggregate\ that tracks account balance, opened/finished transactions, and handles commands like creating accounts, depositing/withdrawing money, and transferring funds. The HTTP API exposes endpoints for creating accounts, depositing, and withdrawing money, mapping requests to domain commands and responses to domain events. Tests have been added to verify the behavior of the aggregate, command handler, and event handler.

bank-account/account/account-domain, bank-account/account/account-http-api, bank-account/account/account-impl · high confidence

New transaction API endpoints and adapters

The transaction module now exposes HTTP endpoints for creating, listing, and retrieving transactions via the new TransactionHandler, which routes POST /transactions, GET /transactions, and GET /transactions/{id} requests. A new TransactionApplicationService interface and its associated request/response models (CreateTransactionRequest, CreateTransactionResponse) define the API contract. Additionally, an AccountChangeStreamAdapter component was added to listen for account change events (deposits, withdrawals, failures, and not-found states) and trigger corresponding transaction validation or cancellation commands.

bank-account/transaction/transaction-api · high confidence

Behavioural changes

Introduce HTTP error handling and request deserialization utilities

Added new components to the common HTTP layer: an ErrorMessage model for structured error responses, an HttpHandler interface for routing and request body deserialization, and an HttpHandlers utility class that provides JSON deserialization with isolated thread-pool execution and a reusable pattern for returning 500 Internal Server Error responses.

common-components/src/main/java/com/mz/reactor/ddd/common/components/http · medium confidence

Transaction domain API: new state, commands, and events

The transaction domain API now includes the core domain model for the transaction module. This introduces a new TransactionState to track the status and details of a transaction, along with a TransactionStatus enum (INITIALIZED, CREATED, FINISHED, FAILED). It also adds a set of command interfaces (CreateTransaction, CancelTransaction, FinishTransaction, and validation commands) and a comprehensive set of domain events (TransactionCreated, TransactionFailed, TransactionFinished, money deposited/withdrawn, and rollbacks) to support the transaction lifecycle.

bank-account/transaction/transaction-domain-api · high confidence

Updated Gradle wrapper to version 8.11.1

The project's Gradle wrapper has been upgraded to version 8.11.1. This update includes configuration for network timeouts and distribution validation, ensuring the build environment uses the specified Gradle version and improves network reliability during builds.

gradle · high confidence

Test coverage

Added integration test for bank account application

Added a new integration test (BankAccountAppTest) that verifies the full flow of creating accounts and transferring money between them. The test confirms that accounts are created successfully, transactions are processed, and account balances are updated correctly after a transfer.

bank-account/bank-account-application/src/test · high confidence

Dependencies

Initial project structure and dependency configuration

The project is initialized with a multi-module Gradle build configuration. This includes the root build.gradle defining shared dependencies (Guava, Reactor, Jackson, Immutables) and a version catalog in settings.gradle. The structure introduces common modules (common-api, common-components, common-persistence-api) and domain-specific modules for bank accounts and transactions (account, transaction, adapters, impl, domain, api), all wired together via internal project dependencies.

(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 61 → 60 (-0.6)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 98 → 99 (+0.6)
  • Architecture 100 → 87 (-12.7)
  • Maturity 82 → 82 (+0.0)
  • Readiness 26 → 33 (+7.7)
  • Security 100 → 100 (+0.0)
  • Domain Modelling 100 → 79 (-21.3)

Resolved (15)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (10 lines × 2) (bank-account/account/account-domain/src/main/java/com/mz/reactor/ddd/reactorddd/account/domain/AccountCommandHandler.java)
  • Duplicated block (10 lines × 2) (bank-account/transaction/transaction-domain/src/main/java/com/mz/reactor/ddd/reactorddd/transaction/domain/TransactionAggregate.java)
  • Duplicated block (11 lines × 2) (bank-account/transaction/transaction-domain/src/main/java/com/mz/reactor/ddd/reactorddd/transaction/domain/TransactionAggregate.java)
  • Duplicated block (6 lines × 2) (bank-account/transaction/transaction-domain/src/main/java/com/mz/reactor/ddd/reactorddd/transaction/domain/TransactionCommandHandler.java)
  • Duplicated block (8 lines × 2) (bank-account/transaction/transaction-adapters/src/main/java/com/mz/reactor/ddd/reactorddd/transaction/adapters/account/AccountChangeStreamAdapter.java)
  • Duplicated block (8 lines × 2) (bank-account/transaction/transaction-adapters/src/main/java/com/mz/reactor/ddd/reactorddd/transaction/adapters/account/AccountChangeStreamAdapter.java)
  • Duplicated block (8 lines × 2) (bank-account/transaction/transaction-domain/src/main/java/com/mz/reactor/ddd/reactorddd/transaction/domain/TransactionAggregate.java)
  • No exposed public API
  • Test reliability not included
  • early-stage repository — too few commits for a meaningful bus factor
  • early-stage repository — too little history to judge knowledge freshness
  • git history depth insufficient
  • git history depth insufficient

New (21)

  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no contributor guidance (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (11 lines × 2) (bank-account/account/account-domain/src/main/java/com/mz/reactor/ddd/reactorddd/account/domain/AccountCommandHandler.java)
  • Duplicated block (11 lines × 2) (bank-account/transaction/transaction-adapters/src/main/java/com/mz/reactor/ddd/reactorddd/transaction/adapters/account/AccountChangeStreamAdapter.java)
  • Duplicated block (11 lines × 2) (bank-account/transaction/transaction-domain/src/main/java/com/mz/reactor/ddd/reactorddd/transaction/domain/TransactionAggregate.java)
  • Duplicated block (14 lines × 2) (bank-account/transaction/transaction-domain/src/main/java/com/mz/reactor/ddd/reactorddd/transaction/domain/TransactionAggregate.java)
  • Duplicated block (5 lines × 2) (bank-account/transaction/transaction-domain/src/main/java/com/mz/reactor/ddd/reactorddd/transaction/domain/TransactionCommandHandler.java)
  • Duplicated block (7 lines × 2) (bank-account/account/account-impl/src/main/java/com/mz/reactor/ddd/reactorddd/account/impl/AccountQueryImpl.java)
  • Duplicated block (7 lines × 2) (bank-account/transaction/transaction-domain/src/main/java/com/mz/reactor/ddd/reactorddd/transaction/domain/TransactionAggregate.java)
  • Duplicated block (9 lines × 2) (bank-account/transaction/transaction-adapters/src/main/java/com/mz/reactor/ddd/reactorddd/transaction/adapters/account/AccountChangeStreamAdapter.java)
  • No direct assertions: executeParallel (common-persistence-api/src/test/java/com/mz/reactor/ddd/reactorddd/persistance/aggregate/impl/AggregateActorTest.java)
  • No direct assertions: findAllBy_predictionForTwo_isReturnedTwo (common-persistence-api/src/test/java/com/mz/reactor/ddd/reactorddd/persistance/view/impl/ViewRepositoryImplTest.java)
  • No direct assertions: findAllBy_predictionIsForAll_isReturnedAll (common-persistence-api/src/test/java/com/mz/reactor/ddd/reactorddd/persistance/view/impl/ViewRepositoryImplTest.java)
  • No direct assertions: findAllListBy_predictionForTwo_isReturnedTwo (common-persistence-api/src/test/java/com/mz/reactor/ddd/reactorddd/persistance/view/impl/ViewRepositoryImplTest.java)
  • No direct assertions: findByIdParallel (common-persistence-api/src/test/java/com/mz/reactor/ddd/reactorddd/persistance/aggregate/impl/AggregateRepositoryImplTest.java)
  • No direct assertions: findBy_filteredById_isReturnedOne (common-persistence-api/src/test/java/com/mz/reactor/ddd/reactorddd/persistance/view/impl/ViewRepositoryImplTest.java)
  • No direct assertions: onDestroy (common-persistence-api/src/test/java/com/mz/reactor/ddd/reactorddd/persistance/aggregate/impl/AggregateActorTest.java)
  • No direct assertions: testRecoveryState (common-persistence-api/src/test/java/com/mz/reactor/ddd/reactorddd/persistance/aggregate/impl/AggregateActorTest.java)
  • …and 1 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

michalzeman/reactor-ddd 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 12b753daa65dd85036abcc4ef5e5b87db2648884 — 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.