andreschaffer/event-sourcing-cqrs-examples
66.2
Adequate · 9 November 2026
1.4k
lines of production code
Java
primary language
10
measurements over time
What this system is
Features
Initial domain model for banking aggregates and events
This change introduces the core domain model for the bank service, establishing the foundational building blocks for event-sourced aggregates. It adds abstract base classes for Aggregates and Events, utilizing Java's \java.time\ for timestamps, along with supporting infrastructure like \EventStore\, \Specification\, and \ValueObject\. Concrete domain entities for \Account\ and \Client\ are implemented, defining their lifecycle events (such as account opening, deposits, withdrawals, and client enrollment) and business rules, including validation for email addresses and sufficient funds checks.
src/main/java/bankservice/domain · high confidence
Initial release of HTTP API endpoints and in-memory event store
This change introduces the incoming HTTP adapter layer for the banking service, exposing REST endpoints for managing clients (enroll, update, retrieve) and accounts (open, retrieve, deposit, withdraw) via JSON resources. It also adds the outgoing in-memory event store implementation, which persists domain events using a concurrent map and enforces optimistic locking to prevent concurrent modification conflicts.
src/main/java/bankservice/port · high confidence
Initial release of account and client management services
This change introduces the core service layer for managing bank accounts and clients, including the \AccountService\ and \ClientService\ implementations. These services handle domain operations such as opening accounts, depositing/withdrawing funds, enrolling clients, and updating client details. To ensure data consistency in concurrent environments, the services utilize a new \Retrier\ component that automatically retries operations on \OptimisticLockingException\ up to three times. The implementation relies on an event-sourcing pattern, persisting state changes via an \EventStore\ and publishing events through an \EventBus\ (for accounts).
src/main/java/bankservice/service · high confidence
Initial release of the Bank Service application
This change introduces the initial open-source version of the Bank Service, bootstrapped on Dropwizard. The application registers core REST resources for managing accounts, deposits, withdrawals, and clients, alongside read-model projections for account transactions and client accounts. It utilizes an in-memory event store and an asynchronous event bus to handle domain events, with exception mappers for optimistic locking and account not found scenarios, and enables hypermedia support via Declarative Linking.
src/main/java/bankservice/bootstrap · high confidence
New read-model projections for client accounts and account transactions
This change introduces two new read-model projections within the banking service to support efficient querying of account data. The \clientaccounts\ projection maintains a denormalized view of client accounts, tracking balances and client associations via an \AccountsListener\ that reacts to domain events (account opening, deposits, withdrawals) and exposes them through a REST endpoint at \/clients/{id}/accounts\. The \accounttransactions\ projection tracks individual transaction history per account, storing deposit and withdrawal details in a \TransactionsRepository\ and exposing them via \/accounts/{id}/transactions\. Both projections use in-memory repositories for initial implementation and rely on Java's \java.time\ API for timestamp handling.
src/main/java/bankservice/projection · high confidence
Test coverage
Initial test suite for domain models, services, and integration endpoints
Added comprehensive test coverage for the banking service, including unit tests for domain aggregates (Aggregate, Account, Client, EmailSpecification), service logic (AccountService retry behavior, Retrier), and infrastructure adapters (InMemoryEventStore, InMemoryTransactionsRepository, InMemoryAccountsRepository). Integration tests verify the full HTTP API lifecycle for clients, accounts, deposits, withdrawals, and transactions, along with exception mapping and health checks.
src/test · high confidence
Dependencies
Initial Maven project setup with Java 19 and Dropwizard 4
This change introduces the initial \pom.xml\ for the \bank-service\ project, establishing the build configuration and dependency landscape. The project targets Java 19 and utilizes Dropwizard 4.0.10 for the application framework, along with Jersey 3.1.11 and Jakarta EE 2.1.1 APIs. Development and testing rely on JUnit 6.1.3, Mockito 5.23.0, and Guava 33.5.0-jre, while static analysis is enforced via Error Prone 2.42.0 and Checkstyle 3.6.0. The build also configures specific JVM arguments to open \java.math\ and \java.time\ modules for reflection.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 60 → 66 (+6.1)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 74 → 74 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 51 → 67 (+15.7)
- Readiness 60 → 60 (+0.2)
- Security 85 → 90 (+5.6)
- Domain Modelling 90 → 90 (+0.0)
Resolved (5)
- No assertions: retriesGetUpToMaxAttemptsWithoutSharedStateBetweenCalls (src/test/java/bankservice/service/RetrierTest.java)
- No assertions: returnClientAccounts (src/test/java/bankservice/it/ClientAccountsIT.java)
- Orphaned file (src/main/java/bankservice/bootstrap/BankServiceApplication.java)
- Orphaned file (src/main/java/bankservice/service/account/AccountService.java)
- Orphaned files with no living knowledge
New (2)
- High CVE: [GHSA redacted] (pom.xml)
- Scattered collaborators
Changes since last survey
- 10 commits — 10 feature/other, 0 fixes
By area
- (repo) — 4 commits
- (root) — 4 commits
- .github/workflows — 1 commit
- src/main — 1 commit
Notable commits
- change: Bump mvn-test-plugins.version from 3.6.0 to 3.6.1
- change: Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.6.3 to 3.7.0
- change: Bump org.checkerframework:checker-qual from 4.3.1 to 4.4.0
- change: Bump org.jacoco:jacoco-maven-plugin from 0.8.15 to 0.8.16
- change: Merge pull request #551 from andreschaffer/dependabot/maven/mvn-test-plugins.version-3.6.1
- change: Merge pull request #553 from andreschaffer/dependabot/maven/org.jacoco-jacoco-maven-plugin-0.8.16
- change: Merge pull request #554 from andreschaffer/dependabot/maven/org.apache.maven.plugins-maven-enforcer-plugin-3.7.0
- change: Merge pull request #555 from andreschaffer/dependabot/maven/org.checkerframework-checker-qual-4.4.0
- change: Reject non-positive account transaction amounts (#550)
- change: Skip Qlty coverage upload on fork PRs (#557)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
andreschaffer/event-sourcing-cqrs-examples 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 9 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit e3f7c99125819c404581705c271ab681ff5c87d3 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-b921b700395b.