Skip to content
CAI
Software that uses CAICheck a score

event-driven-dotnet/EventDriven.ReferenceArchitecture

47.4

Weak · 8 November 2026

1.3k

lines of production code

C#

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a .NET 8-based reference architecture for building event-driven microservices using Domain-Driven Design and CQRS. It provides a complete, runnable example of loosely coupled services (Customer and Order) that communicate via a Dapr-backed event bus and persist data in MongoDB. The project includes full test coverage with unit and acceptance tests to validate the architecture's behavior.

Features

Add Customer and Order services with CQRS, Dapr, and MongoDB support

The reference architecture now includes fully implemented Customer and Order microservices. Each service exposes REST APIs for creating, updating, and removing entities, as well as querying them. The implementation uses a CQRS pattern with MediatR, featuring command and query handlers, DTOs, and domain models. The services are configured to use MongoDB for persistence and Dapr for event bus capabilities, with logging behaviors and dependency injection registrations included.

reference-architecture · high confidence

Initial release of the Event Driven .NET Reference Architecture

The repository now includes a complete reference architecture for building loosely coupled, event-driven microservices using Domain-Driven Design (DDD) and Command Query Responsibility Segregation (CQRS) with Dapr for publish-subscribe messaging. The solution provides a step-by-step Development Guide, a README with prerequisites and usage instructions, and a .NET 8.0 SDK configuration. The architecture features Customer and Order services that communicate via an event bus abstraction, with separate controllers for read and write operations. The project also includes unit tests using xUnit and Moq, as well as acceptance tests using SpecFlow. Additionally, Dapr components and configuration files are provided for local development, and the repository is licensed under the MIT License.

(repo-wide) · high confidence

Test coverage

Added SpecFlow-based acceptance tests for Customer, Order, and Pub/Sub services; Added unit and integration tests for the Order service; Added unit tests for CustomerService domain and controllers.

Dependencies

Upgrade to .NET 8 and update key dependencies

The reference architecture has been upgraded to .NET 8, enabling access to the latest performance and security improvements. Key packages have been updated to their latest stable versions, including Aspire (8.2), EventDriven.CQRS.Abstractions (2.1.0), EventDriven.CQRS.Extensions (2.0.0), and EventDriven.EventBus.Dapr (1.6.0). Additionally, test projects now use xUnit 2.9.0 and SpecFlow 3.9.74, ensuring compatibility with the new framework version.

(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 46 → 47 (+1.4)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 82 → 82 (+0.0)
  • Architecture 89 → 89 (+0.1)
  • Maturity 64 → 70 (+6.2)
  • Readiness 39 → 41 (+2.2)
  • Security 39 → 41 (+1.8)
  • Domain Modelling 51 → 51 (+0.0)
  • Event-Driven 77 → 67 (-9.2)
  • Performance 100 → 100 (+0.0)

Resolved (7)

  • Inconsistent naming for mock object fields: some use the standard 'Mock' suffix (e.g., _repositoryMock), while others use the abbreviation 'Moq' (e.g., _repositoryMoq, _queryBrokerMoq).
  • Vulnerable: OpenTelemetry.Exporter.OpenTelemetryProtocol
  • XML-doc coverage: Common (reference-architecture/Common/Common.csproj)
  • XML-doc coverage: CustomerService (reference-architecture/CustomerService/CustomerService.csproj)
  • XML-doc coverage: OrderService (reference-architecture/OrderService/OrderService.csproj)
  • XML-doc coverage: ReferenceArchitecture.ServiceDefaults (reference-architecture/ReferenceArchitecture.ServiceDefaults/ReferenceArchitecture.ServiceDefaults.csproj)
  • redundant comment (reference-architecture/ReferenceArchitecture.ServiceDefaults/Extensions.cs)

New (7)

  • CustomerService: 1 contract type(s) expose producer-owned ids/enums
  • OrderService: 2 contract type(s) expose producer-owned ids/enums
  • redundant comment (reference-architecture/CustomerService/Program.cs)
  • redundant comment (reference-architecture/CustomerService/Program.cs)
  • redundant comment (reference-architecture/CustomerService/Program.cs)
  • redundant comment (reference-architecture/OrderService/Controllers/OrderQueryController.cs)
  • redundant comment (reference-architecture/OrderService/Program.cs)

API surface

  • Unchanged — 8 HTTP endpoints

Architecture

  • Unchanged — 4 containers · 2 contexts · 0 edges

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

Survey your own repository

event-driven-dotnet/EventDriven.ReferenceArchitecture 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 8 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 157ea8ad1e602d7a9c7fc5c4f27fe8a2fc0907f0 — 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-45ab2cab63de.