DDD Artifacts
The Domain-Driven Design artifact pack for Inventory & Storage, following
the ddd-crew tools plus UML. Every diagram is
Mermaid, derived from the code on develop, and carries a "Source:" line
naming the files it came from and a note on what it omits.
Strategic design
| Artifact | ddd-crew tool | What it answers |
|---|---|---|
| Subdomain Classification | — (reference model) | Why this is a Core subdomain in the WMS tier. |
| Core Domain Chart | Core Domain Charts | Differentiation vs model complexity, with the evolution note. |
| Bounded Context Canvas | Bounded Context Canvas v5 | Purpose, roles, every inbound and outbound message, decisions, open questions. |
| Context Map | Context Mapping | Every upstream/downstream relationship, pattern, technology and wiring status. |
| Context Relationships | — (narrative) | The strategic story behind each edge of the map. |
| Ubiquitous Language | — (glossary) | Every term with its code identifier, and where the two differ. |
Tactical design
| Artifact | ddd-crew tool | What it answers |
|---|---|---|
| Aggregate Design Canvas | Aggregate Design Canvas v1.1 | One canvas per aggregate root: states, invariants with their Err values, commands, events, throughput, size. |
| Domain Events | — (event catalogue) | Every event published and consumed: full CloudEvents type, topic, key, payload, producer, consumers. |
| Domain Message Flow | Domain Message Flow Modelling | Four business scenarios as numbered command / query / event flows between contexts. |
| EventStorming | EventStorming glossary and cheat sheet | Design-level process maps with the standard sticky colours and real hotspots. |
| Use Cases | — | The application use cases, their collaborators and algorithms. |
UML and data
| Artifact | Notation | What it answers |
|---|---|---|
| Class Diagrams | UML class diagram | Domain types, enumerations, events, ports and the hexagonal adapter map. |
| ER Diagram | Entity-relationship | The final OLTP and analytical Postgres schemas and the table-to-aggregate mapping. |
| Sequence Diagrams | UML sequence diagram | Every command use case plus the outbox relay and both Kafka consumers, following the function bodies. |
Sources of truth
Code wins over every page here. The facts come from:
internal/domain/**— aggregates, value objects, invariants, events.internal/application/usecases/**andports/ports.go— use cases and ports.internal/adapters/**andcmd/*/main.go— routes, MCP tools, topics, consumer groups, environment variables and wiring.migrations/*.up.sqlandmigrations/analytics/*.up.sql— the schema.apis/openapi.yamlandapis/asyncapi.yaml— the published contracts (pinned to the code by thecontractandarch-testCI jobs).docs/docs/adr/— the decisions (ADR 0001-0029).- Sibling repositories' outbound adapters on
develop— for who calls this service and how (see the Context Map).
Throughput and size figures on the Aggregate Design Canvas, and the coordinates on the Core Domain Chart, are estimates and are labelled so.