cloud.yantra.oss/microservice-patterns-cqrs
59.6
Adequate · 22 September 2026
3.2k
lines of production code
Scala
with Java
6
measurements over time
What this system is
This system is a Scala-based backend service that implements the CQRS and Event Sourcing patterns to manage domain state and process commands. It features an actor-based architecture for handling technical and business validation, entity management, and error handling. The codebase includes infrastructure for serializing objects, managing database migrations, and enforcing code quality through build tooling and test coverage.
Features
Added core domain model classes for event sourcing
Introduced foundational types for the event sourcing pattern, including \Aggregate\, \Entity\, \Event\, \ValueObject\, and their respective ID and compliance traits (\AggregateId\, \EntityId\, \EventId\, \ETagCompliance\, \Publishable\). These classes define the structure for domain aggregates, entities, and events, enabling the system to track state changes and publish domain events.
src/main/scala/cloud/yantra/patterns/es · high confidence
Added object serialization utilities
A new 'tools' package has been added to the 'cloud.yantra' namespace, providing functions to serialize objects to Base64 strings and deserialize them back. This introduces new capabilities for converting objects to and from Base64-encoded strings using Java's serialization.
src/main/scala/cloud/yantra/patterns · high confidence
Introduce DomainError abstraction for CQRS error handling
Added a new \DomainError\ abstract class and companion object in the \cloud.yantra.patterns.cqrs.errors\ package. This introduces a structured way to represent domain-level errors, including properties for error codes, messages, localization parameters, and timestamps. The implementation provides factory methods to create specific error instances, supporting both simple and detailed error reporting within the CQRS pattern.
src/main/scala/cloud/yantra/patterns/cqrs/errors · high confidence
Introduce actor-based command validation and filtering infrastructure
Added new Scala classes to support command validation and message filtering within the actor system. This includes an \Envelope\ pattern for message headers and bodies, a \Filter\ trait for processing messages through a chain of filters (including an \AuthorizationFilter\), and specific validation actors for business and technical domain rules. Additionally, a JSON serializer (\CommandValidationJsonSerializer\) was introduced to handle serialization of command validation events and related types.
src/main/scala/cloud/yantra/patterns/actors · high confidence
Introduces CQRS command processing with validation and entity management
The framework now supports a Command-Query Responsibility Segregation (CQRS) pattern in Scala, introducing actors to manage the full lifecycle of commands. This includes a \CommandProcessorManagerActor\ that orchestrates technical and business domain validation stages, an \EntityManagerActor\ to handle authorized create and update commands, and an \EntityPersistentActor\ for state management. The change also adds supporting types for command IDs, validation results, and domain events.
. · high confidence
Introduces a CQRS-based command processing pipeline for customer registration
The application now implements a Command-Query Responsibility Segregation (CQRS) pattern to process commands, such as new customer registrations. This includes a \CommandProcessingEngine\ that routes commands to a \CustomerDomainCommandProcessor\, which validates the input using technical and business rules (e.g., checking for a full name and a supported country) before executing the \NewCustomerRegistrationHandler\. The handler interacts with an in-memory \CustomerManagementService\ to persist the customer, providing a structured way to handle and validate commands within the system.
src/main/scala/example · high confidence
Introduces core CQRS command processing infrastructure
The CQRS module now provides the foundational types and interfaces for handling commands, including the base Command trait, specialized command types (EventCommand, QueryCommand, CreateCommand, UpdateCommand), and a CommandProcessor that orchestrates technical and business validation stages. This adds the ability to define, validate, and process commands within the domain.
src/main/scala/cloud/yantra/patterns/cqrs · high confidence
Behavioural changes
Database migration files relocated to new directory structure
The SQL migration files for the database schema and command store tables have been moved from the 'infrastructure' directory to the 'infra' directory. This change reorganizes the project's file structure, moving all database migration scripts to a more concise directory path, which may affect build or deployment processes that reference these specific paths.
infra · medium confidence
Refactored CQRS command processing with improved type safety and validation
The CQRS command processing pipeline has been refactored to improve type safety and validation. The \CommandProcessor\ now enforces a strict execution flow: it performs technical validation, then domain validation, and finally domain processing, with each stage tracked via \CommandExecutionStage\. The \CommandHandler\ interface now explicitly defines technical and domain validation rules, and the \domainProcessing\ method returns an \Either\ of \FailureEvent\ or \SuccessEvent\. The \CommandStore\ interface has been updated to store commands and their associated results at each stage. Additionally, the \Failure\ class now includes a \FailureType\ to distinguish between technical, domain state, and domain processing errors. The \Query\ interface's \queryString\ method now returns an \Optional\<String\>\ instead of a raw string. These changes provide a more robust and type-safe way to handle commands and their outcomes.
src/main/java · medium confidence
Test coverage
Added tests for command processing, validation, and entity management actors
Added comprehensive test coverage for the command processing and validation pipeline, including tests for the CommandHandlerActor, CommandProcessingActor, and CommandValidation actors. The suite verifies command acceptance, technical and business validation success/failure scenarios, and empty rule set handling. Additionally, new tests were added for the EntityManagerActor and EntityPersistentActor, covering entity creation, updates, recovery, and error handling for unsupported operations.
src/test · high confidence
Dependencies
Added build tooling and dependency updates for Scala CQRS and testing
The project's build configuration was updated to support a new Scala-based CQRS implementation and associated testing infrastructure. New SBT plugins were added for code quality checks (Checkstyle, Scalastyle), test coverage (scoverage), and artifact publishing (Sonatype, PGP). Dependencies were updated to include Akka (actors, persistence, remote, cluster, HTTP) and Play JSON, alongside test libraries like ScalaTest, ScalaMock, and in-memory database support.
project · high confidence
Updated Scala and Java compiler settings and added CI tooling
The build configuration was updated to use Scala version 2.12.7 and Java 11 compilation targets. Additionally, the build file now includes configurations for Java and Scala checkstyle tools, enables test coverage reporting with a 70% minimum threshold, and adjusts test execution settings such as disabling parallel execution.
(dependencies) · medium 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 66 → 60 (-6.8)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 100 → 99 (-0.5)
- Maturity 58 → 46 (-12.4)
- Readiness 60 → 56 (-4.2)
- Security 78 → 78 (+0.0)
- Domain Modelling 89 → 89 (+0.0)
Resolved (8)
- 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
- Test reliability not included
- The README describes the library as a 'supporting academic implementation' without stating its features, API surface, or how to use it. (README.md)
- complexity unreadable for .java, .scala — churn × complexity hotspots could not be measured
- early-stage repository — too little history to judge knowledge freshness
- single-maintainer — knowledge-concentration (bus factor) risk
New (5)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- No ADRs found
- Repeated repair: src/main/scala/cloud/yantra/patterns/actors/validations/BusinessDomainCommandValidation.scala (src/main/scala/cloud/yantra/patterns/actors/validations/BusinessDomainCommandValidation.scala)
- Repeated repair: src/main/scala/cloud/yantra/patterns/actors/validations/TechnicalDomainCommandValidation.scala (src/main/scala/cloud/yantra/patterns/actors/validations/TechnicalDomainCommandValidation.scala)
Architecture
- Containers 0 added · 0 removed · contexts 1 added · 1 removed · edges 0 added · 0 removed
Added bounded contexts (1)
- repository
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
cloud.yantra.oss/microservice-patterns-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 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 bc52b6a78dea2a0884eb7377cce5f230bf52068d — 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.