Skip to main content

DDD artifacts (ddd-crew)

The strategic and tactical design of checkout, drawn with the ddd-crew tools plus UML and ER diagrams. Every diagram is Mermaid, checked against the code and ADRs on develop, and carries a Source: line naming the files it came from.

Artifactddd-crew tool / notationWhat it shows
Core domain chartCore Domain ChartsWhere this context sits on business differentiation vs model complexity, and why it is Supporting although its complexity is the highest in the storefront.
Bounded context canvasBounded Context Canvas v5Purpose, classification, roles, every inbound and outbound message, business decisions.
Context mapContext MappingThis context's slice of the storefront map: patterns per edge, including the Anti-Corruption Layer to customer-ordering.
Aggregate design canvasAggregate Design Canvas v1.1CheckoutSession: eight states, invariants, commands, events, concurrency.
Domain message flowDomain Message Flow ModellingFive scenarios as numbered command / event / query flows across contexts.
EventStormingEventStorming glossary and cheat sheetSix design-level boards with the sticky-note colours, plus the hotspots and how the code settled them.
Ubiquitous languageGlossaryEvery term with the code identifier that implements it.
Class diagramsUML class diagramThe aggregate and its value objects, the seven events, the use cases and ports, and the hexagonal layout with the adapters that exist.
Entity-relationship diagramER diagramThe Postgres schema created by 0001_checkout_schema.up.sql: three tables, keys and the partial indexes of the policy scans.
Sequence diagramsUML sequence diagramOpen, confirm (authorize, then place), the in-doubt resolver and expiry, with error branches.
Domain eventsEvent catalogueEvery event published (and the statement that none is consumed): full CloudEvents type, topic, key, payload, producer, consumers.

Related pages outside the pack: Use cases, Subdomain classification, Integration and the event catalogue.

Sources of truth

The code wins. Domain rules come from internal/domain/checkoutsession, behaviour from internal/application/usecases, the envelope from internal/adapters/kafka/cloudevents, the schema from internal/adapters/outbound/postgres/migrations, the REST contract from apis/openapi.yaml, the event contract from apis/asyncapi.yaml, and decisions from the ADRs in docs/adr/. Where a page and the code disagree, the page is wrong.

:::info Not in this pack The MCP server (ADR 0005) and the A2A agent (ADR 0007) are built, but they are read surfaces over the same GetSession use case and add no aggregate, entity or event of their own, so the pack has no pages for them; they appear in the class diagram and in MCP tools. There is no web remote and no analytical read side. The application layer, the HTTP and Kafka adapters, the outbox relay and the database schema are covered by the pages above; where an edge to another context is only built on one side, the page says so. :::