Skip to main content

DDD artifacts (ddd-crew)

The strategic and tactical design of storefront-bff, drawn with the ddd-crew tools plus UML and ER diagrams. Every diagram is Mermaid, derived from the code and ADRs on develop, and carries a Source: line naming the files it came from.

This service is a stateless composition edge: it has no aggregate, no table and no event. The pages say so plainly rather than inventing a model; the interesting content is the composition rules, the cookie state, the allowlist and the six upstream relationships.

Artifactddd-crew tool / notationWhat it shows
Core domain chartCore Domain ChartsWhere the BFF sits on differentiation vs complexity, and why it is Generic.
Bounded context canvasBounded Context Canvas v5Purpose, roles, every inbound and outbound message, business decisions.
Context mapContext MappingThe BFF's edges to storefront-web and the six upstreams with the pattern on each.
Aggregate design canvasAggregate Design Canvas v1.1No aggregate: the canvas for the one thing that is state, the sf_state cookie value object.
Domain message flowDomain Message Flow ModellingThe key scenarios as numbered command and query flows across the browser, the BFF and the upstreams.
EventStormingEventStorming glossaryA purchase journey with the commands the BFF relays, the policies it applies and the hotspots.
Ubiquitous languageGlossaryEvery term with the code identifier that implements it.
Class diagramsUML class diagramThe composition types, the use-case Gateway, the one port and the adapters.
Entity-relationship diagramER diagramNo tables; the logical identifiers the cookie holds and the upstream resources they point to.
Sequence diagramsUML sequence diagramAdd to cart, delivery dates, confirm checkout and order detail, with error branches.
Domain eventsEvent catalogueNone published or consumed, and what the BFF relays instead.

Related pages outside the pack: Use cases, Subdomain classification, Integration and the API overview.

Sources of truth

The code wins. The composition rules come from internal/domain/composition, behaviour from internal/application/usecases, the edge contract from apis/openapi.yaml, and decisions from the ADRs in docs/adr/. Where a page and the code disagree, the page is wrong.

:::info Not in this pack There is no business-context page: its content is folded into the Introduction. There is no MCP, A2A or analytics surface to document. :::