ADR 0009: a web console remote
Status
Accepted (2026-10-24).
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 (task-interleaving, slotting-optimization, inbound-receiving, ...); node-topology had none, so browsing the network's nodes, lanes, service areas and regions meant raw REST calls.
Decision
web/is thenode_topology_mfeModule Federation remote. It exposes exactly./App(a default export, no props); the console lazy-loads it asnode_topology_mfe/Appand mounts it under its own/node-topology/*splat route, providing theBrowserRouter, the design tokens and the runtime config. It also runs standalone on port 4017 (npm run dev/npm run preview,strictPort) without the shell.- A small, REAL, read-only UI: three screens over this context's own GET
routes. A node registry browser (
GET /nodeswith the type, region and status filters; a row links to the node's page with its current operational profile), a lane browser (GET /laneswith the origin and destination filters) and a region browser (GET /regions). Nothing writes: the remote has no mutation call, noIdempotency-Key, no POST/PUT anywhere. - Runtime endpoint resolution, not build-time.
src/config.tsturnswindow.__WAREHOUSE_CONFIG__.apiOrigin(published by the shell from/config.json) into${apiOrigin}/api/node-topology, 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/node-topology/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 browse the topology without REST tooling; agents keep using the MCP server of ADR 0008 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
(
node_topology_mfeat./App, remote entry under/mfes/node-topology/) — a pinned host/remote contract, changed on both sides together or not at all.