Repository navigation
Frontend
The UI is a Next.js App Router application. Server-side routes proxy requests to the FastAPI backend; configure MES_BACKEND_URL and BACKEND_INTERNAL_URL for the deployment environment.
| Route | Function |
|---|---|
/ |
Redirects to /dashboard. |
/dashboard |
Combined production and delivery overview, worker/source status, active and waiting orders. |
/production-orders |
Production order list, manual order entry, detail, and run review. |
/delivery-orders |
Delivery order list, manual order entry, detail, and run review. |
/inventory |
Live PLC stock snapshot from GET /plc-storage/. |
/analytics |
Historical run view with date and order type filters. |
/settings |
PLC node names and polling interval from GET/PUT /settings/. |
Order entry uses the catalog and available capacity supplied by /orders/input-context. It can explicitly request catalog refresh before submission. A successful 202 means the order has been persisted, not that the PLC has started it. The run detail and dashboard show execution state and offer manual review when a run needs an operator decision.
-
/api/mes/[...path]forwards order and shared order operations toMES_BACKEND_URL(fallbackhttp://127.0.0.1:8000). -
/api/[...path]and/api/analyticsforward settings, storage, PLC storage, and analytics requests toBACKEND_INTERNAL_URL(fallbackhttp://localhost:8000). Production Compose configures the internal service URL.
The /inventory route reads live PLC data via /plc-storage; the legacy database-backed /storage API is not the inventory page's data source.
cd frontend
npm ci
npm run devUse the scripts declared in frontend/package.json for available checks and browser tests. See Development and Tests.