Skip to main content

DDD artifacts (ddd-crew)

The strategic and tactical design of last-mile-delivery, 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 the 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, open questions.
Context mapContext MappingThis context's slice of the network map: patterns per edge.
Aggregate design canvasAggregate Design Canvas v1.1DeliveryWave, Route, DeliveryServicePartner, PackageAttemptHistory: states, invariants, commands, events.
Domain message flowDomain Message Flow ModellingThe key scenarios as command / event / query flows across contexts.
EventStormingEventStorming glossary and cheat sheetProcess flow with sticky-note colours, policies and hotspots.
Ubiquitous languageGlossaryEvery term with the code identifier that implements it.
Class diagramUML class diagramDomain types, events, ports and the adapters that exist.
Entity-relationship diagramER diagramThe 15 OLTP tables of 0001_last_mile_delivery_schema.up.sql (with the columns changed by 0002 and 0003) and the 9 tables of the analytical database.
Sequence diagramsUML sequence diagramSchedule, induct on arrival, plan and start, record an attempt, cancel, MCP read, with error branches.
Domain eventsEvent catalogueEvery event published and consumed: full CloudEvents type, topic, key, payload.

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/{wave,route,partner,history}, 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.

Not in this pack

The MCP server (ADR 0006), the A2A agent (ADR 0009) and the console remote (web/, ADR 0007) 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.