PROJECT STUDY

Store & Workforce Vision

Turn camera events into reviewable context.

A privacy-aware store operations platform for occupancy, queue and zone events, with configurable alerts, manager review and aggregate reporting.

Explore the build
Illustration of an occupancy event in a synthetic cafe scene from the product's simulator, with stylised avatars blurred at the head, an occupancy event card for manager review and a synthetic scene label.
Original interface illustration · Synthetic demo data.View larger

At a glance

Capabilities
6
Technologies
12
Year
2026

The challenge

A store can have several cameras and still lack a useful view of its operations.

Managers cannot watch every feed continuously, and hours of footage do not immediately explain a queue, an overcrowded area or a zone that needs attention.

The workflow also needs restraint. Automated activity alerts should help a manager investigate an event, with privacy controls and context before any conclusion about a person.

What we built

Store & Workforce Vision connects edge camera analysis to a bilingual operations dashboard.

Events instead of endless viewing

Configurable occupancy, queue, line and zone rules produce reviewable events. Phone-use logic includes device and exemption zones to account for approved work devices and break areas

Events instead of endless viewing

Configurable occupancy, queue, line and zone rules produce reviewable events. Phone-use logic includes device and exemption zones to account for approved work devices and break areas

An alert workflow

Alerts reach managers through Telegram, WhatsApp, e-mail, webhooks or the app, and managers can search events, inspect the associated evidence and manage alerts rather than relying on a continuous feed

Operational reporting

Aggregate analytics show movement, occupancy and queue patterns, with reports and optional summaries built from structured metrics

Camera and rule administration

Teams configure cameras, privacy masks, zones, schedules and thresholds from the web application

Rules drafted from plain language

A manager can describe a rule in Indonesian or English; a language model or a deterministic parser drafts it, and nothing is saved until a person confirms it

Local resilience

The edge component evaluates rules near the cameras and buffers delivery through a durable offline outbox

How it works

  1. Mask, then analyse

    Each store's edge agent reads its cameras through MediaMTX, which keeps raw recordings on the store's box. Privacy masks are applied before analysis and storage, and stored event images and clips blur heads and faces; the system does not use face recognition.

  2. Turn detections into events

    RF-DETR detection, tracking, pose, role and activity scoring feed zone, line, occupancy and queue analytics. A rules engine evaluates them every second and opens events with blurred snapshots and 20-second clips.

  3. Deliver every event once

    Events and metrics leave through a durable SQLite outbox to NATS JetStream or HTTPS. The backend ingests them idempotently into PostgreSQL with PostGIS, ClickHouse and S3-compatible SeaweedFS storage, then dispatches the alerts.

  4. Review with context

    A bilingual React web app behind Keycloak sign-in covers live view, event review, camera, mask, zone, shift and rule setup, reports and administration. Aggregate workforce reporting is the default, with individual views restricted by policy and permission, and live viewing is separately permissioned and audited.

Engineering insights

The work is split between a per-store edge agent and cloud services, and one Pydantic contracts package defines every message, rule and configuration that crosses that boundary.

Stack by layer

Frontend
  • React
  • TypeScript
  • Vite
  • React Router
  • TanStack Query
  • i18next
  • Recharts
  • oidc-client-ts
Backend
  • Python
  • FastAPI
  • Uvicorn
  • Pydantic
  • SQLAlchemy
  • Alembic
  • APScheduler
  • aiohttp
  • PyJWT
  • GoRules ZEN
Data
  • PostgreSQL
  • PostGIS
  • ClickHouse
  • SQLite
  • SeaweedFS
  • NATS JetStream
AI
  • OpenCV
  • ONNX Runtime
  • RF-DETR
  • ByteTrack
  • RTMPose
  • SigLIP 2
  • OSNet
  • YuNet
  • PyTorch
  • Gemini
  • LiteLLM
  • MLflow
Infrastructure
  • Docker Compose
  • NVIDIA CUDA
  • MediaMTX
  • Keycloak
  • nginx
  • FFmpeg
  • Prometheus client
  • pytest
  • Vitest
  1. Privacy masks applied before any model

    Masked polygons are filled black before detection, health checks, the clip buffer, snapshots or live view use a frame, and people whose foot point falls inside a mask are dropped from analysis. Snapshots and clips are then over-blurred in memory, from head keypoints plus an optional YuNet face detector, before any file is written

  2. An outbox that survives outages in order

    Every outgoing message is first written to a WAL-mode SQLite outbox under a unique id, and an event's opened, media, updated and closed messages leave strictly in that order. JetStream de-duplicates on that id and the backend never lets a closed event regress, so a retry after an outage cannot duplicate or reopen an event

  3. One rule contract for cloud and edge

    The backend validates rules with the same Pydantic models the edge agent evaluates every second, so validation and comparison semantics cannot drift. Duration, grace and cooldown turn flickering detections into one event per episode

  4. ByteTrack adapted to low frame rates

    Cameras are sampled at 5 to 10 frames per second, so the in-house tracker predicts with real elapsed time, confirms a track only after two matched frames and recovers a walking person whose boxes no longer overlap. A clothing-colour appearance gate keeps an occluded person's anonymous ID from jumping to someone passing in front

  5. The language model sees aggregates, never frames

    Every Gemini call through LiteLLM passes a privacy gate that refuses bytes, data URLs, base64 blobs and image parts, then a cache, a daily budget and a rate limiter. Gemini only explains and drafts; it never decides alerts, and deterministic templates take over when it is unavailable

Design system

Warm-neutral operations console is a compact interface for store managers who must see what needs attention now and area managers comparing stores. It is Indonesian first, with English kept in parity.

Colour palette

  • Warm paper#f6f6f3Light-theme page background under white cards
  • Ink#141413Primary text and headings
  • Signal blue#2a78d6The single accent: primary buttons, focus outline, meter fills, info toasts and the first chart series
  • Status green#0ca30cSuccess toasts and meters and the realtime-connected indicator
  • Amber#fab219Warning toasts and meters and the realtime-offline indicator; medium-severity badges use its soft tint
  • Alert red#d03b3bCritical states, error toasts and destructive buttons; critical badges use its soft tint
  • Colour

    Warm neutral surfaces and one signal blue accent leave green, amber and red free for a reserved status scale. Every status pairs a tint with an icon and a text label, and one hand-written token file drives the light and dark themes

  • Typography

    No web fonts: the system UI stack sets a compact 14 px base on a 12 to 40 px token scale with 650-weight headings. A monospace stack serves IDs and copyable tokens, and numeric cells use tabular numerals

  • Components

    In-house primitives over CSS custom properties, including modals and drawers with a focus trap, popovers, toasts, form fields and KPI tiles, plus a hand-drawn icon set, Recharts charts with a table-view toggle and an SVG editor for zones and privacy masks

  • Accessibility

    Colour never stands alone, every chart can switch to a table with series in a fixed colour order, zone shapes can be edited from the keyboard, and the interface keeps visible focus, a skip link and reduced motion

Where this fits

Retail and hospitality operators can turn relevant camera events into a review workflow and aggregate operational insight. Explore our computer vision, analytics dashboards and retail solutions, or discuss your camera workflow.

discuss your camera workflow

Let’s connect the dots

Let's put these ideas to work.

Share a process, product, or problem you want to improve. We will work through the possibilities together.

Discuss your project