Skip to main content

Facility Layout

Generic Subdomain · WMS-adjacent, extracted once

Facility Layout is the bounded context that owns where things physically are in the building: a site's structural hierarchy — Site → Area → Zone → Aisle → Bay → Level → Position — and the coded storage slots inside it.

It does not own occupancy or stock. That stays in inventory-storage's Bin and StockUnit aggregates. What this service owns is whether a coded location exists, is active, and is legal for a given kind of storage unit — the warehouse map that other contexts read but never write.

WH1-STOR-AMB-A07-03-02-B
| | | | | | `-- Position: left-to-right slot on the level
| | | | | `----- Level: vertical level / shelf
| | | | `-------- Bay: bay / section along the aisle
| | | `------------ Aisle: physical corridor
| | `---------------- Zone: behavioral class (AMB/CHL/FRZ/HAZ/FWD/RSV)
| `--------------------- Area: coarse functional area (STOR/RCV/PACK/STAGE)
`-------------------------- Site: the physical facility

Why it is a Generic Subdomain​

Physical-location structure is well understood, has an established industry pattern, and is not where the platform wins competitively. It is needed by contexts on both sides of the WMS/WES line — inventory-storage needs location validity to accept a stow, wes-work-planning and fulfillment-execution need zone/aisle adjacency for travel-path and congestion reasoning — and neither owns it. Following the platform's DDD reference discipline of "extract generic logic instead of duplicating it," it is extracted once into its own bounded context and its own service, rather than a package bolted onto inventory-storage. See Business context and Bounded Context Canvas for the full argument.

Integration status​

This context is an Open Host Service with a Published Language, and it has no outbound dependency on any other service. It calls no one and consumes no other context's events. Its relationships, per its own Context Map, are:

  • Kafka, warehouse.facility.events: with EVENT_PUBLISHER=kafka, all fifteen domain event types are published as CloudEvents 1.0 (structured mode, type prefix com.warehouse.wms.facility-layout.), through a transactional outbox when a database is configured (ADR 0018). The contract is apis/asyncapi.yaml. The consumers on develop (each repository's own consumer code):
    • inventory-storage feeds a local location-classification cache from ZoneRegistered, LocationSlotRegistered, LocationSlotDecommissioned and LocationSlotHandlingUnitDeclared (LOCATION_LOOKUP_MODE=kafka) for its stow-time placement check and, for the handling unit (EACH, CASE or PALLET, declared with PUT /locations/{locationCode}/handling-unit, ADR 0040), whether a sealed case may be stowed in a bin.
    • warehouse-planning folds LocationSlotRegistered and LocationSlotDecommissioned into a storage-position and station tally.
    • inbound-receiving, slotting-optimization, pick-face-replenishment and task-interleaving keep local slot (and, except inbound-receiving, zone) copies from the same topic; task-interleaving also reads LocationGeometryUpdated.
    • network-inventory-planning consumes SiteCapabilityChanged (the site capability heartbeat, ADR 0041).
  • REST: wes-work-planning calls GET /distance for travel distance (TRAVEL_DISTANCE_MODE=http). fulfillment-execution has an opt-in GET /locations/{locationCode} lookup for a slot's functional role (LOCATION_ROLE_MODE=http, default permissive; warehouse-infra develop sets http since its #92, with a terraform apply pending). inventory-storage keeps GET /locations/{locationCode}/classification as a wired rollback path (LOCATION_LOOKUP_MODE=http). The geometry and role features behind these calls come from ADR 0016 (location roles) and ADR 0017 (geometry and travel graph).
  • MCP and reports: warehouse-ops-agent reads list_sites, get_site_layout, get_zone_grid and estimate_travel_distance, plus the catalog-growth report.
  • Console: the facility-mfe Module Federation remote is this context's own operator UI.

workforce-management is Separate Ways by design. REST and MCP are unauthenticated by deliberate decision (ADR 0015).

This context's pages​

Every page above except the Business Context is synced from the facility-layout repository. This context has no Async API narrative page.

Elsewhere​