Skip to main content

DDD artifacts (ddd-crew)

The strategic and tactical design of order-sourcing, drawn with the ddd-crew tools plus UML and ER diagrams. Every diagram is Mermaid, derived from the code and ADRs on develop, and carries a Source: line naming the files it came from. The same pack is held in the aggregator (warehouse-docs, network contexts); that copy was written before the service was built and this one follows the code.

Artifactddd-crew tool / notationWhat it shows
Core domain chartCore Domain ChartsWhere this context sits on business differentiation versus model complexity, and why it is Core.
Bounded context canvasBounded Context Canvas v5Purpose, classification, roles, every inbound and outbound message, business decisions, what is still open.
Context mapContext MappingThis context's slice of the network map: pattern, channel and messages per edge.
Aggregate design canvasAggregate Design Canvas v1.1FulfillmentAssignment: states, invariants, policies, commands, events; the five read models.
Domain message flowDomain Message Flow ModellingHappy path, refusal and re-promise, shipment and delivery, and cancellation across contexts.
EventStormingEventStorming glossary and cheat sheetProcess-level boards with the sticky-note colours, plus the hotspot inventory.
Ubiquitous languageGlossaryEvery term with the code identifier that implements it, and the neighbour terms it borrows.
Class diagramsUML class diagramThe aggregate and its value objects, the eleven events of events.go, the search types, and the hexagonal ports and adapters.
Entity-relationship diagramER diagramThe Postgres schema created by 0001_order_sourcing_schema.up.sql: 14 tables (columns changed by 0002 to 0004), and the 4 tables of the analytical database.
Sequence diagramsUML sequence diagramQueue, re-optimise, sweep and release, refusal, lock, ship and deliver, cancel and revise, with error branches.
Domain eventsEvent catalogueThe fifteen published events with topic, producing command and consumers (typed fields for eleven of them), and the 34 consumed types.

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

:::note Sources of truth The code wins. Domain rules come from internal/domain/assignment, sourcing and network, 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 0006), the A2A agent (ADR 0009) and the web remote (ADR 0007, web/) are built, but they are read surfaces over the model and add no aggregate, entity or event of their own, so the pack has no pages for them. They are described on the API overview and MCP tools. :::