Skip to main content

DDD Artifacts

The DDD artifact pack for process-path-management, built with the ddd-crew tools plus UML/ER diagrams. 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.

ArtifactWhat it showsddd-crew tool / notation
Core Domain ChartWhere this context sits on business differentiation vs model complexity (Generic) and its evolutionCore Domain Charts
Bounded Context CanvasPurpose, classification, roles, every inbound and outbound messageBounded Context Canvas v5
Context MapThis context's slice of the fleet map: OHS + PL to five Conformists over Kafka, MCP and console edges, deliberately absent edgesContext Mapping
Aggregate Design CanvasProcessPath, CPTSchedule and ProcessFlow: states, invariants, commands, events, throughput, sizeAggregate Design Canvas v1.1
Domain Message FlowFour business scenarios as numbered cmd: / evt: / qry: flowsDomain Message Flow Modelling
EventStormingDesign-level boards for the path lifecycle, the CPT schedule and the analytics projection, with real hotspotsEventStorming glossary and cheat sheet
Ubiquitous LanguageGlossary, every term mapped to its code identifier and wire nameddd-crew glossary practice
Class DiagramUML class diagrams of internal/domain/** and the hexagonal ports and adaptersUML (Mermaid classDiagram)
Entity RelationshipFinal Postgres schema of the OLTP and analytics databases after every migrationER (Mermaid erDiagram)
Sequence DiagramsEvery command use case through adapter, use case, aggregate, repository and outboxUML (Mermaid sequenceDiagram)
Domain EventsEvery published and consumed event: full CloudEvents type, topic, key, payload, producer, consumersEvent catalogue

Narrative background that predates the pack and is still current: Aggregates and Invariants (the "why" behind each rule) and the ADRs.

Sources of truth​

Code wins over every page here. When a page and the code disagree, the code is right and the page is a bug.

  • Domain model: internal/domain/processpath, internal/domain/cptschedule, internal/domain/processflow, internal/domain/shared.
  • Use cases and ports: internal/application/usecases, internal/application/ports.
  • REST contract: apis/openapi.yaml (rendered in the API Reference); routes in internal/adapters/inbound/http/server.go.
  • Event contract: apis/asyncapi.yaml; the exact type strings in internal/adapters/kafka/cloudevents/types.go; payload structs in internal/adapters/outbound/kafka/publisher.go.
  • Schema: migrations/*.up.sql and migrations/analytics/*.up.sql.
  • Sibling relationships: the consumer files named on the Context Map, read from each sibling's origin/develop.