DDD artifacts
The strategic and tactical design of outbound-shipping follows the ddd-crew tools. The pack was written from the code of this repository: every Mermaid diagram carries a Source: line naming the files it was drawn from. There is no hand-written design pack in the central documentation site for this context, so where a page reads the design, it reads ADR 0001 to ADR 0006 and the code, and where they differ the code wins and the page says so.
Source: internal/domain/, internal/application/, internal/adapters/, migrations/, apis/, docs/adr/.
| Page | What it holds | ddd-crew tool |
|---|---|---|
| Ubiquitous language | Load, cutoff key, package, staging, short-ship, ship-confirm, bill of lading and the neighbour terms, with the Go identifier of each | glossary |
| Core domain chart | Why the context is Supporting, with its internal slices | core-domain-charts |
| Bounded context canvas | Purpose, classification, roles, every inbound and outbound message, assumptions | bounded-context-canvas |
| Context map | Every upstream and downstream neighbour with its pattern and channel | context-mapping |
| Aggregate design canvas | OutboundLoad, ShippingPackage, BillOfLading: states, invariants, commands, events | aggregate-design-canvas |
| Domain message flow | Plan to ship-confirm, the departure that comes too early, diversion and the sweep | domain-message-flow-modelling |
| EventStorming | The process-level timeline with hotspots and how each was settled | eventstorming-glossary-cheat-sheet |
| Class diagram | Domain types and the hexagonal ports and adapters | UML |
| Entity relationship | The Postgres schema | ER |
| Sequence diagrams | One runtime sequence per main flow | UML |
| Domain events | The 13 published and 9 consumed events with full CloudEvents types | event catalogue |
Also in this section: Use cases (trigger, inputs, invariants, events per use case) and Subdomain classification.
In numbers (from the code)
| Item | Count | Where |
|---|---|---|
| Aggregates | 3: OutboundLoad (5 states), ShippingPackage (5 states), BillOfLading (2 states) | Aggregate design canvas |
| Application use cases | 17 (8 REST commands, 9 consumer policies) plus the read side | Use cases |
| Published events | 13 types, each on the integration topic and its analytics twin | Events |
| Consumed events | 9 types from 5 topics, plus the 13 own types from the analytics stream | Events |
| REST routes | 13 business routes plus /healthz and /readyz | API reference |
| MCP | 2 read-only tools, 1 resource, 1 prompt | MCP tools |
| Tables | 12 | Entity relationship |
| ADRs | 6 | ADR index |