Skip to main content

DDD artifacts (ddd-crew)

The strategic and tactical design of task-interleaving, 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.

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.
Bounded context canvasBounded Context Canvas v5Purpose, classification, roles, every inbound and outbound message, business decisions.
Context mapContext MappingThis context's slice of the fleet map: patterns per edge, with the built/unbuilt status of each side.
Aggregate design canvasAggregate Design Canvas v1.1StationTrip and InterleavingPolicy: states, invariants, commands, events, concurrency.
Domain message flowDomain Message Flow ModellingThe key scenarios as numbered command / event / query flows across contexts.
EventStormingEventStorming glossary and cheat sheetDesign-level process flow with the sticky-note colours, plus hotspots.
Ubiquitous languageGlossaryEvery term with the code identifier that implements it.
Class diagramsUML class diagramDomain types, and the hexagonal ports with the adapters that exist.
Entity-relationship diagramER diagramThe Postgres schema created by migrations/0001_interleaving_schema.up.sql: ten tables, keys and the deferred hint pointer.
Sequence diagramsUML sequence diagramDeclare a policy, complete-then-hint, claim, expiry and the simulation, with error branches.
Domain eventsEvent catalogueEvery event published and 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/policy, travel, recommend and stationtrip, behaviour from internal/application/usecases, the envelope from internal/adapters/kafka/cloudevents, the schema from 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 0007), the analytics read side (ADR 0008) and the web remote (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. 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. :::