Skip to main content

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/.

PageWhat it holdsddd-crew tool
Ubiquitous languageLoad, cutoff key, package, staging, short-ship, ship-confirm, bill of lading and the neighbour terms, with the Go identifier of eachglossary
Core domain chartWhy the context is Supporting, with its internal slicescore-domain-charts
Bounded context canvasPurpose, classification, roles, every inbound and outbound message, assumptionsbounded-context-canvas
Context mapEvery upstream and downstream neighbour with its pattern and channelcontext-mapping
Aggregate design canvasOutboundLoad, ShippingPackage, BillOfLading: states, invariants, commands, eventsaggregate-design-canvas
Domain message flowPlan to ship-confirm, the departure that comes too early, diversion and the sweepdomain-message-flow-modelling
EventStormingThe process-level timeline with hotspots and how each was settledeventstorming-glossary-cheat-sheet
Class diagramDomain types and the hexagonal ports and adaptersUML
Entity relationshipThe Postgres schemaER
Sequence diagramsOne runtime sequence per main flowUML
Domain eventsThe 13 published and 9 consumed events with full CloudEvents typesevent catalogue

Also in this section: Use cases (trigger, inputs, invariants, events per use case) and Subdomain classification.

In numbers (from the code)​

ItemCountWhere
Aggregates3: OutboundLoad (5 states), ShippingPackage (5 states), BillOfLading (2 states)Aggregate design canvas
Application use cases17 (8 REST commands, 9 consumer policies) plus the read sideUse cases
Published events13 types, each on the integration topic and its analytics twinEvents
Consumed events9 types from 5 topics, plus the 13 own types from the analytics streamEvents
REST routes13 business routes plus /healthz and /readyzAPI reference
MCP2 read-only tools, 1 resource, 1 promptMCP tools
Tables12Entity relationship
ADRs6ADR index