Skip to main content

Core domain chart

Following the ddd-crew Core Domain Charts: business differentiation (y) against model complexity (x).

Source: internal/domain/outboundload/load.go, internal/domain/outboundload/commands.go, internal/domain/shippingpackage/commands.go, internal/domain/billoflading/bol.go, internal/application/usecases/on_departure.go, internal/application/usecases/expect_package.go, internal/application/usecases/sweep_missed.go, internal/application/usecases/project_board.go.

Omitted: the other contexts (their points are on their own charts; the fleet plot is the Core Domain Chart in warehouse-docs, which has no point for this context yet). The five slices are this page's reading of the code, not values taken from a design model: they place relative effort and distinctiveness, not measurements. All of them stay in quadrant 3 (Supporting) or on its edge.

Classification: Supporting​

The context point sits in quadrant 3 (Supporting) (classification, ADR 0001).

Differentiation is moderate to low (y = 0.35). The fleet does not win customers by how it records what was loaded on a truck. What this context protects is accuracy and timeliness of the "it left" fact that order-management, exception-management and the retail network act on. The highest slice is ship-confirm on departure, because getting it wrong (confirming a load that did not leave, or missing one that did) is the failure other contexts feel.

Model complexity is moderate (x = 0.40). Three aggregates, small state machines (5, 5 and 2 states), and cross-aggregate coordination that lives in use cases: one open load per cutoff key under a race backstop, a departure that must be handled differently in three load states, idempotency at three layers, and events that arrive out of order from five producers. There is no optimiser and no scoring.

Slices​

SliceReadingWhy
Ship-confirm on departure (OnDeparture)highest differentiation, highest complexityThree-way split on the load state, the seal rule, the once-only bill of lading, the "never confirm a loading load" decision of ADR 0002.
Load planning from the manifest (ExpectPackage, ResolveCutoff)middleResolves a manifested cutoff instant against a site's timezone schedule, with one open load per key and a retried race.
Missed-load detection (FlagMissedLoad, SweepMissedLoads)lowerA once-per-package flag raised by a sweep or by an early departure.
Load board and adherence (ProjectBoard)lowPlain counting over the own analytics stream.
Bill of lading (BillOfLading)lowestA commodity document with one invariant pair (confirmed load, seal).

Evolution​

PartEvolution stage (reading)Why
Load, package and ship-confirm modelCustom-builtSpecific to the fleet's split between the yard (physical facts) and shipping (the load).
Bill of ladingProductA shipping document is commodity; a product could issue it if fed the same facts.
Board and adherence reportCustom-built, thinA small projection with no analytics database behind it.
Plumbing (outbox, inbox, CloudEvents, idempotency)CommodityThe same building blocks as every context of the fleet.

Movement to watch. Pallets, load sequencing and a master bill of lading are deferred (ADR 0001, decision D4); adding them would raise model complexity but not differentiation. If loading adherence ever drove dispatch decisions rather than being reported, the missed-load slice would move toward the Core quadrant.