Skip to main content

Footfall API: Live Connection & Simulator

The dashboard loads footfall centrally via GET /api/analytics/footfall?centerId=<uuid>.
Resolution order: Live → Simulator → empty — no scattered hardcoded mocks.

Data mode (global)

ModeBehavior
liveReal partner/sensor data only (when env is configured)
simulatorDeterministic demo numbers (center + date as seed)
offNo simulated data — empty states when live is missing

Priority: COCKPIT_DATA_MODE (env) → IntegrationConfig (service: cockpit-data-mode) → default (simulator when no live footfall env).

  • API: GET /api/system/data-mode, PATCH super admin only
  • UI: “Data simulator” card on /dashboard/analytics/footfall
  • KPIs: GET /api/analytics/footfall/summary?centerId=<uuid> (admin dashboard tiles)
# Optional: env override (locks UI toggle)
COCKPIT_DATA_MODE=simulator # live | simulator | off

Already in the code

ComponentPath
Types (incl. zones)apps/dashboard/src/lib/analytics/footfall/types.ts
Central resolutionresolve-footfall.ts
Simulatorsimulator.ts
Data modeapps/dashboard/src/lib/data-mode/
Env + live stubintegration.ts
API routesfootfall/route.ts, footfall/summary/route.ts
UIFootfallIntegrationStatusAlert, DataSimulatorSettings, DataSourceBadge

Legacy mock-footfall-data.ts is for tests only — not production.

Nutzungsstatistik: Seitenaufrufe werden anonymisiert erfasst. Im Umami-Dashboard nach diesem Pfad filtern: /en/developer-guide/footfall-integration-prep