Back to landing

Documentation

Sentinel user manual

Phase 1 — local MP4 worker. Use the menu to jump between topics. Traffic analytics and incident screening only — not certified police radar.

01

What Sentinel is

Sentinel turns existing CCTV or recorded video into an operations workflow: detect and track vehicles, estimate speed with calibrated lines, package evidence, and support human review with analytics and audit history.

SystemRoleDefault URL
DashboardAuth, cameras, review, analyticshttp://localhost:8080
AI workerVideo processing & evidencehttp://localhost:8090
Camera / MP4
  → Python AI Worker (detect, track, speed, evidence)
  → Supabase (orgs, cameras, incidents, audit)
  → Dashboard (live, review, analytics)
02

Who should use it

AudienceTypical use
Municipal / corridor teamsScreen speed risk on roads and school zones
Logistics hubs & fleet yardsGate and yard speed policy monitoring
Industrial / warehouse sitesInternal road compliance screening
Campuses & checkpointsEvidence-backed incident review
Operators & reviewersRun jobs and decide on incidents
Org adminsCameras, users, demo seed, audit
03

Roles and permissions

RoleCan do
org_adminCameras, users, demo seed, AI control, review, audit
operatorStart/stop AI jobs; operate monitoring
reviewerApprove / reject / escalate incidents
viewerRead-only operational views
auditorRead-only incidents, audit history and report exports
super_adminFull platform access, including camera and member management

New sign-ups typically become org_admin of their own workspace.

04

Prerequisites

  • Node.js 20+ for the dashboard
  • Python 3.12+ for the AI worker
  • Lovable Cloud / Supabase project connected
  • Service role key for AI worker only (never use VITE_ prefix)
  • Keep the worker private; configure matching server and worker shared secrets
05

First-time installation

Dashboard:

npm install
npm run dev

AI worker:

cd ai-service
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
copy .env.example .env
# Set SUPABASE_URL + SUPABASE_SERVICE_ROLE_KEY
# Place video at data/samples/road.mp4
.venv\Scripts\python.exe -m uvicorn app.main:app --reload --host 0.0.0.0 --port 8090

Get the service role key from Lovable → Cloud → Secrets, or the linked Supabase project → Settings → API → service_role.

06

Daily start checklist

  • Start AI worker on port 8090
  • Start dashboard with npm run dev
  • Confirm authenticated worker health through Backend control
  • Sign in at /auth
  • Select the correct organization if you belong to more than one
07

Dashboard map

PagePathPurpose
Landing/Public product page
Auth/authSign in / sign up
Overview/dashboard24h KPIs; load demo data
Live monitoring/dashboard/liveAnnotated stream + camera tiles
Backend control/dashboard/controlStart / stop AI jobs
Incidents/dashboard/incidentsHuman review queue
Analytics/dashboard/analyticsTrends, ranking, speed bins, CSV export
Validation/dashboard/validationCalibration QA vs reference device
Cameras/dashboard/camerasCamera setup and calibration
Users & roles/dashboard/usersMembers and roles
Audit log/dashboard/auditAction history (admin)
Settings/dashboard/settingsWorkspace + disclaimer
08

End-to-end workflow

  • Sign in and create/open a workspace
  • Overview → Load demo data (org_admin, first time)
  • Cameras → set speed limits and virtual line calibration
  • Backend control → start job with data/samples/road.mp4
  • Live monitoring → watch annotated stream
  • Incidents → approve, reject, or escalate with notes
  • Analytics & Audit → trends and compliance history
09

Speed calibration

Measure the real-world distance between virtual line A and line B. The worker estimates:

speed_kmh = (distance_metres / elapsed_seconds) * 3.6

Incidents are created only after multiple speed samples exceed the limit plus tolerance, with enough track duration and detection confidence.

10

Phase roadmap

PhaseScopeStatus
1Local MP4 + YOLO + ByteTrack + speed + evidenceImplemented
2RTSP live camera supportImplemented
3License plate recognition (OCR)Implemented
4Multi-camera processing (fleet + Live grid)Implemented
5Deeper AI analytics / reporting (CSV export)Implemented
6Calibration validation QA (not legal certification)Implemented
11

Configuration

Dashboard (root .env): VITE_SUPABASE_URL, VITE_SUPABASE_PUBLISHABLE_KEY, AI_SERVICE_URL and AI_WORKER_SECRET (server-only)

AI worker (ai-service/.env): SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY, SUPABASE_STORAGE_BUCKET, WORKER_SHARED_SECRET, YOLO_MODEL, DETECTOR_CONFIDENCE, SPEED_TOLERANCE_KMH

12

Troubleshooting

SymptomFix
AI worker unreachableStart uvicorn on 8090; check server AI_SERVICE_URL and matching worker secret
Jobs run but no DB incidentsSet SUPABASE_SERVICE_ROLE_KEY; restart worker
Video not foundUse data/samples/road.mp4 from ai-service folder
Cannot start jobNeed org_admin or operator role
Cannot reviewNeed reviewer or org_admin role
Speeds look wrongRecalibrate distance_metres and line positions
13

Security notes

  • Do not expose the Phase 1 AI worker to the public internet
  • Never put the service role key in VITE_ variables or Git
  • Treat evidence as sensitive operational data
  • Analytics/screening only — enforcement needs legal approval
  • Avoid force-pushing published Lovable-connected git history
14

First 30 minutes

  • Confirm dashboard + AI health
  • Sign in and open a workspace
  • Load demo data
  • Start a sample job on Backend control
  • Watch Live monitoring
  • Practice one approve and one reject on Incidents
  • Skim Analytics and Audit log