Skip to main content

Warehouse Floor Client

warehouse-floor-client is the scan-first progressive web app that operators use on RF guns and station screens to run the warehouse floor. It is the first-party client of the floor-execution REST APIs: it registers a station, checks an operator in, claims the next task, keeps the lease alive, takes the confirming scans, completes the task, and, at the receiving dock, receives cartons against an inbound receipt.

It is a client, not a bounded context. It models no aggregate, raises no domain event and persists nothing except a device-local outbox and the station session. Domain meaning stays with the owning context; the app renders what each API publishes and sends the commands each API accepts, as a downstream Conformist to the published OpenAPI of that context.

AreaExperience
Subdomain classExperience (an application, not a domain subdomain)
KindReact 19 + Vite 8 + TypeScript (strict) PWA, static files behind nginx-unprivileged on :8080
UI kit@warehouse/ui-kit (sibling checkout file:../warehouse-ui-kit)
Talks toKong at the page's own origin, /api/<context>/...
Authenticationnone; the fleet is unauthenticated by decision

What it does​

CapabilityScreen and routeContext it callsPage
Register a station, check in by badge, pull work, check outStation, /fulfillment-executionStation flow
Hold a task with a visible lease that renews itselfTask, /task (LeaseCountdown)fulfillment-executionStation flow
Confirm a pick by scanning each item or case, complete PICK, RELOCATE and REPLENISH, break a sealed caseTask, /taskfulfillment-executionStation flow
Receive cartons, cases and items against a receipt, audit a mixed carton, close the receipt, print an unlabelled carton's labelReceiving, /receiving and /receiving/:receiptIdinbound-receivingReceiving flow
Gate clerk: check a visit in (scan the trailer units), reject at the gate, check outGate, /yard/gateyard-managementYard flow
Hostler: claim the next move, see from/to/why/due and the lease, complete it with the scanned placeHostler, /yard/hostleryard-managementYard flow
Dock operator: trailers at doors, start and complete door work, complete a visiting driver's moveDock, /yard/dockyard-managementYard flow
Keep working when the network drops: banner, persisted outbox, replay with the original keyevery screenn/aOffline and idempotency
Load the app shell with no networkservice worker (public/sw.js)n/aOffline and idempotency

The four feature folders are src/features/station, src/features/task, src/features/receiving and src/features/yard; shared pieces are ScanInput, OfflineBanner, NoticeBar, LeaseCountdown and Barcode128 under src/components.

What it owns, and what it does not​

Owns

  • Everything the operator sees and touches: screens, scan capture, touch targets, plain-words error text for every problem code.
  • The device-side mechanics of reliable commands: the Idempotency-Key per action, the persisted outbox (wfc.outbox.v1), replay in order, connectivity detection.
  • The station session on the device (wfc.station.v1) and the local lease countdown.
  • GS1 parsing and Code 128 / GS1-128 label drawing in the browser.
  • The app shell: manifest, hand-written service worker and the nginx image.

Does not own

  • Tasks, stations, leases and pick plans (fulfillment-execution); receipts, cartons, discrepancies and quantities (inbound-receiving). The device computes no quantity: it shows what the service says.
  • Any API, event, database, authentication or BFF. Nothing calls this app.
  • Supervisor and planner screens: those live in warehouse-console and each context's own remote.
  • The edge that routes /api to Kong at its host, and any cluster deployment (no chart here; nothing in warehouse-infra yet).
  • Pack, SLAM, put-wall, stow, cycle-count, transfer-receipt and the shift clock: later work.

The rules it lives by​

The repo has no ADRs; its decisions are the numbered rules in the README ("Rules this repo lives by"), reflected in the pages below:

  1. Kong only, same origin. Relative /api/<context>/..., no service URLs.
  2. Every command carries an Idempotency-Key minted once per action and reused on every retry, also after a reload.
  3. Offline: banner, persisted outbox, shell-only service worker. No API response is ever served from cache.
  4. Scan first. One focus-locked input for every barcode.
  5. Errors are for operators: what happened and what to do, never raw JSON.
  6. Log through src/lib/log.ts, which flattens CR/LF.
  7. GitFlow, and the CI names lint, test, typecheck, build, docs.

Where to go next​

I want to...Read
see how the code is layeredArchitecture
run it, with or without a clusterQuickstart
understand keys, the outbox and the service workerOffline and idempotency
follow a station through a taskStation flow
follow a receipt through the dockReceiving flow
follow a truck through the yardYard flow
configure or deploy itConfiguration, Runbook
debug itTroubleshooting
run and extend the testsTesting
see what it calls and how it failsIntegration, API contract
Disclaimer

This project is a domain-driven design study. It is not associated with, endorsed by or affiliated with any company, and it uses no company's code, data, logos or trademarks. All names, figures and examples are illustrative or synthetic.