Skip to main content

DDD artifacts (ddd-crew)

The strategic and tactical design of Delivery Promise, one page per ddd-crew artifact. Every page is checked against the code on the branch; where the code disagrees with the aggregator's model, the page says so (see the open questions on the Bounded context canvas). All names in the domain are synthetic, see the README disclaimer. Start with the Ubiquitous language, the Use cases and the Subdomain classification.

ArtifactPageAnswers
Core Domain ChartCore domain chartWhy this context is Core and which slices deserve the most care
Bounded Context CanvasBounded context canvasPurpose, roles, messages in and out, decisions, metrics, open questions
Context MappingContext mapUpstream, downstream and pattern of every relationship
Aggregate Design CanvasAggregate design canvasInvariants, state machines, commands and events of the four aggregates
Domain Message Flow ModellingDomain message flowThe four business scenarios across contexts
EventStormingEventStormingProcess-level boards with policies and hotspots
Class diagramClass diagramThe domain model and the ports and adapters
Entity relationshipEntity relationshipThe Postgres tables, indexes and read models
Sequence diagramsSequence diagramsAdapter to aggregate to outbox for each flow
Domain eventsDomain eventsMeaning, raiser and recipients of each event

The model in one paragraph​

Four aggregates: a short-lived DeliveryOffer (a quote with a witness path), the Promise (a seven-state commitment with a capacity hold), the PromiseBook (the order-count ledger of one node pickup cutoff, shared by many promises) and the versioned PromisePolicy. Everything else is a local read model fed by eight Kafka topics, so the quote hot path calls nobody. Twelve events leave through the outbox. The code is in internal/domain (pure, no I/O), internal/application (use cases and ports) and internal/adapters; the architecture fitness tests in internal/architecture enforce the dependency direction.

How the pages relate​

Read left to right for the order the artifacts were produced in; the strategic ones (up to the context map) say why, the tactical ones say how.