ADR 0007: a web console remote
Status
Accepted (2026-10-25).
Context
The fleet's operators read every bounded context through the warehouse-console shell, a Module Federation host that lazy-loads one remote per context. Every context that exposes reads to operators ships such a remote (node-topology, inbound-receiving, offer-availability, ...); seller-inbound had none, so reading a seller's compliance scorecard or an inbound plan meant raw REST calls (or the MCP server of ADR 0006, which serves agents, not operators with a browser).
Decision
web/is theseller_inbound_mfeModule Federation remote. It exposes exactly./App(a default export, no props); the console lazy-loads it asseller_inbound_mfe/Appand mounts it under its own/seller-inbound/*splat route, providing theBrowserRouter, the design tokens and the runtime config. It also runs standalone on port 4022 (npm run dev/npm run preview,strictPort) without the shell.- A small, REAL, read-only UI: two screens over this context's own GET
routes. A compliance scorecard browser (
GET /sellers/{sellerId}/scorecard?window=7d|30d: the derived tier, the shipments/cartons counts, the rates, the discrepancies by kind -- ADR 0005) and an inbound plan browser (GET /inbound-plans/{planId}: the state, the facts and the lines in eaches). Both are lookups: this context's API has no list route for sellers or plans, so the screens take an id, not filters. Nothing writes: the remote has no mutation call, noIdempotency-Key, no POST/PUT anywhere --POST .../confirmationsandPOST .../cancellationsstay REST commands. - Runtime endpoint resolution, not build-time.
src/config.tsturnswindow.__WAREHOUSE_CONFIG__.apiOrigin(published by the shell from/config.json) into${apiOrigin}/api/seller-inbound, the only base this remote ever calls; a production build without an origin refuses to render rather than falling back to a developer port. - The deployment shape of the fleet.
web/Dockerfileis the two-stage uikit named-context build (node:22-bookworm-slim;@warehouse/ui-kitis thefile:../../warehouse-ui-kitsibling checkout, built first and consumed from itsdist), served by nginx-unprivileged with the fleet'snginx.conf(unhashedremoteEntry.jsandindex.htmlnever cached; immutable hashed assets; SPA fallback;/healthzfor the probes). Vite'sbaseis/mfes/seller-inbound/on build (STATIC object config, never a callback, so configs stay mergeable) and the web gateway — not this chart — owns that public path. - Chart: an optional
frontendcomponent, off by default. Its own Deployment + ClusterIP Service (component=frontend), no database, no Kafka, no routing in this chart. CI grows awebjob (ui-kit checked out as a sibling; oxlint,tsc -b, vitest,vite build).
Consequences
- Operators read a seller's compliance posture and a plan without REST tooling; agents keep using the MCP server of ADR 0006 against the same use cases.
- The remote is deployable as one image in more than one environment: only
/config.jsonchanges between them. - The console shell must carry the matching federation entry
(
seller_inbound_mfeat./App, remote entry under/mfes/seller-inbound/) — a pinned host/remote contract, changed on both sides together or not at all.