- Posts to the mock /api/train contract. Replace the Nitro route with the Go endpoint when it
- exists; the form shape stays the same.
+ Uploads through Nitro to Go /api/train. The control credentials stay in the Node process and are
+ never sent to the browser.
Meta is rendered from web-nuxt/mock/meta.json until the Go API exists.
Meta comes from Go /api/meta through the Nitro proxy.
- Mock data renders the full app before the API exists. Nitro routes in server/api mirror the
- contract. Versions and metrics are sample values; the plan heuristic is implemented once in
- shared/staffing.ts and reused by the mock API.
+
+ Explicit dev fallback: NUXT_PUBLIC_USE_MOCK=1. Mock JSON renders the app without the Go
+ service; the plan heuristic is the shared implementation in shared/staffing.ts.
+
+ The browser only talks to this Nuxt origin. Nitro proxies `/api/*` to the Go API at
+ NUXT_API_INTERNAL_BASE; forecast, context and meta are served from there.
Last context update: {{ meta ? formatDateTime(meta.context_version) : '—' }}
diff --git a/app/pages/forecast.vue b/app/pages/forecast.vue
index 8d83821..318ba0f 100644
--- a/app/pages/forecast.vue
+++ b/app/pages/forecast.vue
@@ -21,6 +21,12 @@ const { data: sensors } = await useFetch Forecast · {{ weekLabel(weekStart, weekEnd) }}
- A 168-hour mock forecast for {{ activeSensor?.name ?? 'Stadtgalerie' }}, aggregated by
+ A 168-hour forecast for {{ activeSensor?.name ?? 'the selected store' }}, aggregated by
day. The decision, shift blocks and hourly coverage are on
- The mock weather window does not cover the plan week.
+ The weather window does not cover the plan week.
Weather is the main accuracy driver in the model. Holidays are context and a smaller feature.
@@ -197,13 +203,13 @@ const total = computed(() => days.value.reduce((sum, day) => sum + day.mean, 0))
Last available hour in the mock series. Last available hour in the API series.
Updated {{ context ? formatDateTime(context.updated_at) : '—' }} · context
- {{ context?.cached ? 'cached' : 'mock' }}
+ {{ context?.cached ? 'cached' : 'live' }}
Last: {{ lastHoliday.name }} on {{ formatShortDate(lastHoliday.date) }}.
@@ -258,7 +262,7 @@ const latestPulse = computed(() => {
- Forecast for {{ activeSensor?.name ?? 'Stadtgalerie' }} needs
+ Forecast for {{ activeSensor?.name ?? apiPlan.sensor ?? 'the selected store' }} needs
{{ peakHour?.required_staff ?? '—' }} staff at the busiest hour. The rest of the week
runs on {{ totalStaffHours }} staff-hours at {{ formatEuro(plan.summary.cost_eur) }}.
- Mock forecast · updated {{ context ? formatDateTime(context.updated_at) : '—' }} · no POS, sales or
- labour-cost feed.
+ Mock mode · NUXT_PUBLIC_USE_MOCK=1 · no Go API call.
+
+ Local preview · the Go API plan is unchanged.
+
+
+ Go `/api/staffing` · updated {{ context ? formatDateTime(context.updated_at) : '—' }} · no POS, sales
+ or labour-cost feed.
+
- Change store, service standard or scenario. The plan recomputes from the mock forecast.
+ Store, service standard and scenario are sent to Go `/api/staffing`. Local assumption edits render a
+ preview from the API forecast.
+ These four values are not query inputs of Go `/api/staffing`. Changing them shows a local preview;
+ “Use API plan” restores the server values.
+ Weather during the plan week
- Weather forecast does not cover this window in the mock context.
+ The weather forecast from `/api/context` does not cover this plan window yet.
- {{ activeScenario?.description ?? 'Base scenario uses the mock forecast weather.' }}
+ {{ activeScenario?.description ?? 'Base scenario uses the API forecast weather.' }}
+
+ This card explains the API plan; the assumption preview above is local.
No POS, sales, queue or labour-cost data exists. This is decision support with explicit assumptions,
diff --git a/app/pages/simulate.vue b/app/pages/simulate.vue
index 5a624be..e3de88c 100644
--- a/app/pages/simulate.vue
+++ b/app/pages/simulate.vue
@@ -1,25 +1,74 @@
@@ -178,11 +184,11 @@ const total = computed(() => days.value.reduce((sum, day) => sum + day.mean, 0))
npm run mock and reload.
+ Sensor data is missing. Check that the Go API is running and that NUXT_API_INTERNAL_BASE points to it.