Skip to main content

DDD artifacts (ddd-crew)

This pack describes the Fulfillment Execution bounded context with the ddd-crew modelling tools, plus three UML-style views. Every diagram is Mermaid, every page is derived from the code in this repository, and each diagram has a Source: line naming the files it was drawn from.

ArtifactPageddd-crew tool / notation
Core domain chartCore domain chartCore Domain Charts
Bounded context canvasBounded context canvasBounded Context Canvas v5
Context mapContext map (lives in Ecosystem)Context Mapping
Aggregate design canvasAggregate design canvasAggregate Design Canvas v1.1
Domain message flowDomain message flowDomain Message Flow Modelling
EventStormingEventStormingEventStorming glossary & cheat sheet, design level
Ubiquitous languageUbiquitous language (lives in Business context)glossary with code mapping
UML class diagramClass diagramUML class diagram + hexagonal ports/adapters view
ER diagramEntity-relationship diagramER diagram of the final migration schema
Sequence diagramsSequence diagramsUML sequence diagrams per use case
Domain eventsDomain eventsevent catalogue (full CloudEvents types, topics, consumers)

The narrative DDD pages sit next to the pack and go deeper on single topics: Subdomain classification, Aggregates & invariants, Use cases & ports and Context relationships.

Sources of truth​

When a page and the code disagree, the code wins. The pack was drawn from:

ConcernSource of truth
Aggregates, invariants, value objects, eventsinternal/domain/** (task, station, package (Go package pack), consolidation, pathcatalog, shared)
Use cases and portsinternal/application/usecases/*.go, internal/application/ports/*.go
REST surfaceinternal/adapters/inbound/http/router.go and apis/openapi.yaml (kept 1:1 by openapi_routes_test.go)
MCP surfaceinternal/adapters/inbound/mcp/*.go, cmd/mcp/main.go
Kafka publishedinternal/adapters/outbound/kafka/publisher.go, analytics_publisher.go, internal/adapters/kafka/cloudevents/cloudevents.go, apis/asyncapi.yaml
Kafka consumedinternal/adapters/inbound/kafka/consumer.go, internal/adapters/outbound/kafkacatalog/consumer.go, internal/adapters/inbound/kafka/analytics_consumer.go
Persistencemigrations/*.up.sql, migrations/analytics/*.up.sql, internal/adapters/outbound/postgres/*.go
DecisionsArchitecture decisions (ADR-0001 to ADR-0035)

The fleet-level aggregate of these pages lives in the warehouse-docs repository; this repository is the source those pages are synced from.