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.
| Artifact | ddd-crew tool / notation | What it shows |
|---|---|---|
| Core domain chart | Core Domain Charts | Where the context sits on business differentiation vs model complexity, and why it is Supporting. |
| Bounded context canvas | Bounded Context Canvas v5 | Purpose, classification, roles, every inbound and outbound message, business decisions, open questions. |
| Context map | Context Mapping | This context's slice of the network map: patterns per edge. |
| Aggregate design canvas | Aggregate Design Canvas v1.1 | DeliveryWave, Route, DeliveryServicePartner, PackageAttemptHistory: states, invariants, commands, events. |
| Domain message flow | Domain Message Flow Modelling | The key scenarios as command / event / query flows across contexts. |
| EventStorming | EventStorming glossary and cheat sheet | Process flow with sticky-note colours, policies and hotspots. |
| Ubiquitous language | Glossary | Every term with the code identifier that implements it. |
| Class diagram | UML class diagram | Domain types, events, ports and the adapters that exist. |
| Entity-relationship diagram | ER diagram | The 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 diagrams | UML sequence diagram | Schedule, induct on arrival, plan and start, record an attempt, cancel, MCP read, with error branches. |
| Domain events | Event catalogue | Every event published and consumed: full CloudEvents type, topic, key, payload. |
Related pages outside the pack: Use cases, Subdomain classification, Integration and the event catalogue.
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.