Skip to content
CAI
Software that uses CAICheck a score

devmentors/ddd-building-a-model

38.8

Weak · 8 November 2026

4.1k

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 domain-driven design (DDD) exploration framework that implements an e-commerce checkout workflow. It manages the lifecycle of placing orders, including cart management, payment processing, and order validation. The codebase demonstrates various DDD patterns—such as specialized aggregates, the specification pattern for business rules, and logic fragmentation—across multiple versioned project structures. It enforces specific business constraints, such as quarterly purchase limits and payment method restrictions based on customer type.

Features

Added domain models and handlers for placing orders from checkout

Introduced the \PlaceOrderFromCheckoutCommand\ and its handler in both \DDD.BuildingBlocks.V8.LogicFragmentation\ and \DDD.BuildingBlocks.V9.OutOfProcDependency\. This adds the core domain logic for converting a shopping cart into a completed order, including validation for product quantity limits and quarterly purchase restrictions. The change also includes the necessary entity classes (\Order\, \OrderLine\, \CheckoutCart\, \Cart\), value objects (\Payment\, \Shipment\, \YearQuarter\), and repository interfaces/infrastructure to support the new order placement workflow.

DDD.BuildingBlocks.V8.LogicFragmentation, DDD.BuildingBlocks.V9.OutOfProcDependency · high confidence

Introduce specification pattern for order validation and payment rules

Added a new specification pattern implementation to enforce business rules during the checkout process. This includes a \HasActiveOrderWithLimitedProductThisQuarter\ specification that prevents customers from placing orders for limited-availability products if they already have an active order for that product in the current quarter. Additionally, new \CanPayWithCash\ specifications define payment constraints for both B2B (under 20,000) and B2C (under 10,000) customer types, ensuring that cash payments are only allowed within specific value limits based on the payer type.

DDD.BuildingBlocks.V10.SpecificationUsage · high confidence

New DDD model versions for the aggregate pattern

Added three new versions of the domain model to explore different aggregate design patterns. Version 5 (GraphOfObjects) introduces a monolithic Customer aggregate that manages the Cart, Checkout, and Order lifecycle, including quarterly purchase limits. Version 6 (SpecializedAggregate) refactors this into specialized aggregates, separating quarterly purchase tracking and order placement logic into dedicated classes like CustomerQuarterlyPurchases. Version 7 (AsyncBestEffort) introduces placeholder rules for asynchronous order cancellation and manual shipping checks.

DDD.BuildingBlocks.Core.V5.GraphOfObjects, DDD.BuildingBlocks.Core.V6.SpecializedAggregate, DDD.BuildingBlocks.Core.V7.AsyncBestEffort · high confidence

Behavioural changes

Expanded domain model versions and updated requirements

The solution file (DDD.BuildingBlocks.sln) was updated to include five new project references: DDD.BuildingBlocks.Core.V5.GraphOfObjects, DDD.BuildingBlocks.Core.V6.SpecializedAggregate, DDD.BuildingBlocks.Core.V7.AsyncBestEffort, DDD.BuildingBlocks.V8.LogicFragmentation, and DDD.BuildingBlocks.V10.SpecificationUsage. Additionally, the README.md was updated to add a commentary section linking YouTube videos about models, aggregates, and trade-offs, and the requirements section was modified to change the product availability limit from 'per quarter' to 'per customer per quarter' to prevent scalping.

(repo-wide) · high confidence

Introduce V10 CLI entry point for specification-based checkout

Added a new V10 CLI entry point that demonstrates a behavior-driven, specification-based approach to placing an order. The V10 class registers dependencies for the specification pattern, constructs a cart with a product, and processes a checkout with cash payment and B2B payer type, ultimately invoking the PlaceOrderFromCheckoutCommand handler.

DDD.BuildingBlocks.CLI · medium confidence

Dependencies

Upgrade .NET target framework to .NET 7.0

The project files have been updated to target .NET 7.0, moving from .NET 6.0. Additionally, the DDD.BuildingBlocks.V10.SpecificationUsage and DDD.BuildingBlocks.CLI projects now include specific package references for Microsoft.EntityFrameworkCore (versions 7.0.4 and 7.0.5), Microsoft.EntityFrameworkCore.Tools, Newtonsoft.Json, and Npgsql.EntityFrameworkCore.PostgreSQL.

(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 40 → 39 (-1.5)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 82 → 82 (+0.0)
  • Architecture 98 → 71 (-26.8)
  • Maturity 44 → 44 (+0.0)
  • Readiness 27 → 27 (+0.0)
  • Security 32 → 32 (-0.1)
  • Domain Modelling 100 → 100 (+0.0)
  • Performance 100 → 100 (+0.0)

Resolved (13)

  • End-of-life runtime: .NET net7.0 (DDD.BuildingBlocks.V9.OutOfProcDependency/DDD.BuildingBlocks.V9.OutOfProcDependency.csproj)
  • XML-doc coverage: DDD.BuildingBlocks.CLI (DDD.BuildingBlocks.CLI/DDD.BuildingBlocks.CLI.csproj)
  • XML-doc coverage: DDD.BuildingBlocks.Core.V1 (DDD.BuildingBlocks.Core.V1/DDD.BuildingBlocks.Core.V1.csproj)
  • XML-doc coverage: DDD.BuildingBlocks.Core.V2.Encapsulated (DDD.BuildingBlocks.Core.V2.Encapsulated/DDD.BuildingBlocks.Core.V2.Encapsulated.csproj)
  • XML-doc coverage: DDD.BuildingBlocks.Core.V3.Decomposed (DDD.BuildingBlocks.Core.V3.Decomposed/DDD.BuildingBlocks.Core.V3.Decomposed.csproj)
  • XML-doc coverage: DDD.BuildingBlocks.Core.V4.LifecycleAligned (DDD.BuildingBlocks.Core.V4.LifecycleAligned/DDD.BuildingBlocks.Core.V4.LifecycleAligned.csproj)
  • XML-doc coverage: DDD.BuildingBlocks.Core.V5.GraphOfObjects (DDD.BuildingBlocks.Core.V5.GraphOfObjects/DDD.BuildingBlocks.Core.V5.GraphOfObjects.csproj)
  • XML-doc coverage: DDD.BuildingBlocks.Core.V6.SpecializedAggregate (DDD.BuildingBlocks.Core.V6.SpecializedAggregate/DDD.BuildingBlocks.Core.V6.SpecializedAggregate.csproj)
  • XML-doc coverage: DDD.BuildingBlocks.Core.V7.AsyncBestEffort (DDD.BuildingBlocks.Core.V7.AsyncBestEffort/DDD.BuildingBlocks.Core.V7.AsyncBestEffort.csproj)
  • XML-doc coverage: DDD.BuildingBlocks.V10.SpecificationUsage (DDD.BuildingBlocks.V10.SpecificationUsage/DDD.BuildingBlocks.V10.SpecificationUsage.csproj)
  • XML-doc coverage: DDD.BuildingBlocks.V8.LogicFragmentation (DDD.BuildingBlocks.V8.LogicFragmentation/DDD.BuildingBlocks.V8.LogicFragmentation.csproj)
  • XML-doc coverage: DDD.BuildingBlocks.V9.OutOfProcDependency (DDD.BuildingBlocks.V9.OutOfProcDependency/DDD.BuildingBlocks.V9.OutOfProcDependency.csproj)
  • redundant comment (DDD.BuildingBlocks.CLI/Program.cs)

New (13)

  • Documentation: no build, run or usage example (README.md)
  • Documentation: no map of the repository's parts (README.md)
  • End-of-life runtime: .NET net7.0 (DDD.BuildingBlocks.CLI/DDD.BuildingBlocks.CLI.csproj)
  • End-of-life runtime: .NET net7.0 (DDD.BuildingBlocks.Core.V1/DDD.BuildingBlocks.Core.V1.csproj)
  • End-of-life runtime: .NET net7.0 (DDD.BuildingBlocks.Core.V2.Encapsulated/DDD.BuildingBlocks.Core.V2.Encapsulated.csproj)
  • End-of-life runtime: .NET net7.0 (DDD.BuildingBlocks.Core.V3.Decomposed/DDD.BuildingBlocks.Core.V3.Decomposed.csproj)
  • End-of-life runtime: .NET net7.0 (DDD.BuildingBlocks.Core.V4.LifecycleAligned/DDD.BuildingBlocks.Core.V4.LifecycleAligned.csproj)
  • End-of-life runtime: .NET net7.0 (DDD.BuildingBlocks.Core.V5.GraphOfObjects/DDD.BuildingBlocks.Core.V5.GraphOfObjects.csproj)
  • End-of-life runtime: .NET net7.0 (DDD.BuildingBlocks.Core.V6.SpecializedAggregate/DDD.BuildingBlocks.Core.V6.SpecializedAggregate.csproj)
  • End-of-life runtime: .NET net7.0 (DDD.BuildingBlocks.Core.V7.AsyncBestEffort/DDD.BuildingBlocks.Core.V7.AsyncBestEffort.csproj)
  • End-of-life runtime: .NET net7.0 (DDD.BuildingBlocks.V10.SpecificationUsage/DDD.BuildingBlocks.V10.SpecificationUsage.csproj)
  • End-of-life runtime: .NET net7.0 (DDD.BuildingBlocks.V8.LogicFragmentation/DDD.BuildingBlocks.V8.LogicFragmentation.csproj)
  • End-of-life runtime: .NET net7.0 (DDD.BuildingBlocks.V9.OutOfProcDependency/DDD.BuildingBlocks.V9.OutOfProcDependency.csproj)

Architecture

  • Unchanged — 2 containers · 1 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

devmentors/ddd-building-a-model 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 c73341311ce713d44f0136bc00e5c64b175887e3 — 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.