Skip to main content

DDD artifact pack (ddd-crew)

This pack describes the Facility Layout bounded context with the ddd-crew modelling tools plus UML, ER and sequence diagrams. Every diagram is Mermaid, every page lists the source files it was derived from, and every page states what it leaves out.

ArtifactPageddd-crew tool / notation it follows
Core Domain ChartCore Domain ChartCore Domain Charts
Bounded Context CanvasBounded Context CanvasBounded Context Canvas v5
Context MapContext map (kept under Ecosystem, not duplicated here)Context Mapping
Aggregate Design CanvasAggregate Design Canvas — narrative companions: Aggregates, InvariantsAggregate Design Canvas v1.1
Domain Message FlowDomain Message FlowDomain Message Flow Modelling
EventStorming (design level)EventStormingEventStorming glossary & cheat sheet
Ubiquitous LanguageUbiquitous language (kept under Business Context, not duplicated here)Glossary mapped to code identifiers
UML class diagramsClass diagramsUML class diagram + hexagonal ports/adapters view
ER diagramEntity-relationshipCrow's-foot ER of the final migrated schema
UML sequence diagramsSequence diagramsUML sequence diagrams per command use case
Domain eventsDomain eventsPublished Language catalogue (CloudEvents 1.0)

Related narrative pages: Subdomain classification and Hexagonal architecture.

Sources of truth​

The code on develop wins over every page in this pack. The pages were derived from:

  • internal/domain/** — aggregates, value objects, enums, domain errors and the fifteen domain events (internal/domain/shared/events.go).
  • internal/application/usecases/** and internal/application/ports/ports.go — the 31 use cases and the 12 outbound ports.
  • internal/adapters/** — the REST router (inbound/http/server.go), MCP tools (inbound/mcp/tools.go), the CloudEvents helper (kafka/cloudevents/cloudevents.go), publishers, outbox and the analytics consumer.
  • migrations/*.up.sql and migrations/analytics/*.up.sql — the schema.
  • apis/openapi.yaml and apis/asyncapi.yaml — the published contracts.
  • docs/docs/adr/ — the decisions behind the shape (ADR 0001–0031).
  • For downstream relationships, each consumer repository's own develop branch (paths cited on the Context map).

When a page and the code disagree, the code is right and the page is a bug.