Skip to main content

Context map

Synced from outbound-shipping

This page is a copy of docs/docs/ddd/context-map.md on develop, derived from that repository's code. Edit it there, then re-sync.

Following ddd-crew Context Mapping. This is outbound-shipping's slice of the fleet map: every relationship it has, with the upstream (U) and downstream (D) side, the pattern and the channel. Abbreviations: OHS = Open Host Service, PL = Published Language, CF = Conformist, C/S = Customer/Supplier.

Source: internal/adapters/inbound/kafka/fulfillment_consumer.go, internal/adapters/inbound/kafka/cpt_layout_consumers.go, internal/adapters/inbound/kafka/dock_yard_consumers.go, internal/adapters/outbound/events/sink.go, apis/asyncapi.yaml, docs/adr/0001-outbound-shipping-bounded-context.md, docs/adr/0005-cloudevents-envelope-and-type-catalogue.md.

Legend: arrows point from upstream to downstream. Solid = events or commands that exist on both sides; dotted = a synchronous read, or an edge that ADR 0005 intends but is not yet running in the cluster (checked 2026-11-13: network-fulfillment's consumer landed on its develop on 2026-11-12 but the pod's image predates it; yard-management's consumer does not exist). "Exists on both sides" is about code and configuration; the live question is separate: outbound-shipping is applied and running, so the solid edges whose both ends run — the five upstreams, the analytics fold and exception-management — are live today (see Integration). yard-management appears twice because it is on both sides of the intended relationship. People and callers are rounded boxes.

Omitted: Kafka and Postgres as infrastructure. Separate Ways (no edge at all): the retail network; no retailnetwork.* topic is consumed or produced, and network-fulfillment stays the only channel to it. No sibling is called synchronously: sibling data reaches this service only as event-fed local copies.

Relationships​

NeighbourDirectionPatternChannelNotes
fulfillment-executionupstreamCustomer/Supplierwarehouse.fulfillment.eventsThe producer's correlation fields (site_id, source_order_id, cpt, weight_g) are additive and optional (ADR 0003); the consumer never parses order_ref.
process-path-managementupstreamConformistwarehouse.process-path-management.eventsTakes CPTScheduleChanged as published; no translation beyond the cutoff resolution.
facility-layoutupstreamConformistwarehouse.facility.eventsTakes ZoneRegistered and LocationSlotRegistered; a location's site is its zone's site.
dock-schedulingupstreamCustomer/Supplierwarehouse.dock-scheduling.eventsOutbound DockAppointmentBooked only; cpt_id and carrier_scac nullable. Pinned and tested (ADR 0007).
yard-managementupstreamCustomer/Supplierwarehouse.yard-management.eventsThe only recorder of physical facts. Pinned and tested (ADR 0006).
order-managementdownstreamOHS + PLwarehouse.outbound-shipping.eventsImplemented in code (shipped lines from ShipmentConfirmed, re-promise from PackageMissedLoad); off by default and not switched on in warehouse-infra.
exception-managementdownstreamOHS + PLwarehouse.outbound-shipping.eventsImplemented: one case per PackageMissedLoad; its consumer group is set in warehouse-infra.
network-fulfillmentdownstreamOHS + PL (intended)warehouse.outbound-shipping.eventsBuilt on its develop on 2026-11-12 (its PR 165); the running pod's image predates it, so the edge is not live yet.
yard-management (reverse edge)downstreamC/S (intended)warehouse.outbound-shipping.eventsAbsent: no handler on its develop.
dock operators, schedulersclientsnoneRESTUnauthenticated.
MCP agentsclientsnoneMCP over Streamable HTTPRead-only, unauthenticated.