CCTV TechStack TeamRoles BuildGuide
CCTV TechStack TeamRoles BuildGuide
This document is the complete engineering reference for building the Smart CCTV Monitoring application. It
covers system hardware requirements, every software component in the stack, AI models and training data,
the development environment, where to host and deploy, a step-by-step build guide, and the full team
structure with individual roles and responsibilities.
1. System Requirements
CPU 8-core (Intel i7 / Ryzen 7) 16-core (Intel i9 / Ryzen 9) For running Docker + AI model locally
GPU None (CPU inference) NVIDIA RTX 3060 (12 GB VRAM) AI engineer must have GPU for model training
Storage 512 GB SSD 1 TB NVMe SSD Video samples + Docker images + node_modules
Network 100 Mbps 1 Gbps Pulling large Docker images + video test streams
App Server 16-core 32 GB None 500 GB NVMe 3 (LB) FastAPI, Celery workers, WebSocket hub
Smart CCTV Monitoring — Tech Stack · Build Guide · Team Roles v1.0 Page 1
Node CPU RAM GPU Storage Count Purpose
Database 16-core 64 GB None 2 TB NVMe SSD 2 (HA) PostgreSQL primary + standby replica
Edge Node 8-core 16 GB None 500 GB SSD 6-10 Per-floor RTSP ingestion + pre-processing
Docker Compose 2.24+ Bundled with Docker Desktop Local multi-service orchestration
VS Code / PyCharm
Latest [Link] Primary IDEs
Smart CCTV Monitoring — Tech Stack · Build Guide · Team Roles v1.0 Page 2
2.1 Frontend — Web Operations Dashboard
Library / Tool Version Role in App
Vite 5.2 Build tool — fast HMR dev server, optimised production bundles
React Query (TanStack) 5.x Server state, API caching, background refetch
React Hook Form 7.51 Alert acknowledge forms, camera config forms
React Native 0.74 Cross-platform iOS + Android app from single codebase
Smart CCTV Monitoring — Tech Stack · Build Guide · Team Roles v1.0 Page 3
2.3 Backend — API & Services
Library / Framework Version Role in App
FastAPI 0.111 Main REST API server — async, auto-generates OpenAPI docs
Redis (via redis-py) 5.0 Celery broker, cache layer, alert dedup store
httpx 0.27 Async HTTP client for third-party API calls (Twilio etc.)
. AI / ML Stack
Smart CCTV Monitoring — Tech Stack · Build Guide · Team Roles v1.0 Page 4
2.4 AI Engine — Models & Libraries
Library / Model Version Role in App
YOLOv8 (Ultralytics) 8.2 Primary fault classifier — detects blur, obstruction, tamper
Weights & Biases (wandb) 0.17 Experiment tracking — loss curves, mAP metrics
Label Studio 1.10 Data annotation tool for labelling training images
Redis 7.2 Alert dedup cache, session store, Celery message broker
MinIO RELEASE.2024
S3-compatible object store — snapshots, video clips, reports
Apache Kafka 3.7 Durable event log for all stream health events
Smart CCTV Monitoring — Tech Stack · Build Guide · Team Roles v1.0 Page 5
2.6 Deployment & Infrastructure
Tool / Platform Version Role in App
NGINX Ingress Controller 1.10 Reverse proxy, TLS termination, WebSocket upgrade
GitHub Actions N/A CI pipeline — lint, test, build Docker images, push to registry
Grafana 10.4 Dashboards for system health, alert rates, stream status
Alertmanager 0.27 Infra alerts (pod crash, disk full, GPU OOM) to on-call
HashiCorp Vault 1.16 Secrets management — DB passwords, API keys, TLS certs
Network Disconnect RTSP stream timeout > 10s 99% Auto-detected (no ML)
Smart CCTV Monitoring — Tech Stack · Build Guide · Team Roles v1.0 Page 6
3.2 Training Dataset Sources
Dataset Source Size Use Case
UCF-Crime Dataset UCF, public research 1,900 videos Anomaly and scene change detection
CCTV-Fault Synthetic Self-generated (script) 15,000+ frames Primary fault class training data
Mall CCTV Footage Captured on-site (client) 30+ days rolling Domain-specific fine-tuning
ImageNet (subset) [Link] 100K images Transfer learning base for YOLOv8
Blur Apply Gaussian blur ([Link]) with random kernel sizes 5-51 to clean frames
Obstruction Overlay random solid rectangles / circles of varying colours on clean frames
Overexposed Increase frame brightness by adding random values 180-255 to all channels
Frozen Frame Duplicate frames with added micro Gaussian noise to simulate compression artifacts
Smart CCTV Monitoring — Tech Stack · Build Guide · Team Roles v1.0 Page 7
Step 7 — Export
Export to ONNX and TensorRT .engine format for production inference. Validate inference speed: target <
50ms per frame on A10G GPU.
Step 8 — Registry
Register model in MLflow with version tag. Deploy via model hot-swap API endpoint without service restart.
React Dashboard node:20 (custom) 5173 Vite dev server with HMR
develop Integration branch — all features merge here first. Any dev via PR + review
feature/<ticket-id> Individual feature work. Branched from develop. Developer self-merges to develop
hotfix/<issue> Critical production bug fix. Branched from main. Tech Lead
• Repository structure: monorepo with /frontend, /backend, /ai-engine, /mobile, /infra/helm, /infra/terraform,
/docs
• All PRs require: 1 peer review + CI green (lint + tests pass) before merge
• Commit convention: Conventional Commits (feat:, fix:, chore:, docs:) for auto-changelog
Smart CCTV Monitoring — Tech Stack · Build Guide · Team Roles v1.0 Page 8
4.3 Hosting Options — Staging & Production
Environment Infrastructure Location Cost Tier
DR Site Passive K8s standby cluster Secondary data centre / AWS Medium
RECOMMENDATION: Deploy edge compute nodes and NVR storage fully on-premise (inside the mall) to
avoid sending raw 750-stream video over the internet. Deploy the application tier (API, dashboard, alerting)
on-premise first; use AWS ap-south-1 as a DR target and for sending notifications via cloud gateways.
Task What to Do
Create monorepo mkdir cctv-monitor && cd cctv-monitor && git init; create /frontend /backend /ai-engine /mobile /infra directo
Backend scaffold cd backend && python -m venv venv && pip install fastapi uvicorn sqlalchemy alembic pydantic celery redis
Frontend scaffold cd frontend && npm create vite@latest . -- --template react-ts && npm install tailwindcss zustand react-que
Docker Compose Write [Link] with all dev services. Run: docker compose up -d
Database init alembic init alembic; write first migration for cameras + users tables; alembic upgrade head
CI pipeline Create .github/workflows/[Link] — runs: ruff lint, pytest, vitest on every push to develop/main
Task What to Do
Auth system Implement /auth/login, /auth/refresh, /auth/logout endpoints with JWT. Add RBAC middleware.
Camera CRUD API POST /cameras, GET /cameras, PUT /cameras/{id}, DELETE /cameras/{id} with Pydantic schemas
Database models SQLAlchemy models: Camera, User, Role, FloorMap. Run alembic migration.
Floor map upload POST /floormaps — accept PNG/SVG upload, store in MinIO, return URL
Basic dashboard React: login page, camera list table with status badges, add-camera modal
Unit tests pytest: test all camera CRUD endpoints with test DB fixture. Target 85% coverage.
Smart CCTV Monitoring — Tech Stack · Build Guide · Team Roles v1.0 Page 9
Phase 2 — Stream Ingestion (Weeks 4-6)
Task What to Do
RTSP ingestion service Python service using GStreamer/FFmpeg to pull RTSP streams. One worker process per edge node.
Heartbeat monitor Every 30s: check stream is alive, write last_heartbeat to DB. Flag cameras with no heartbeat > 60s as OFF
Kafka producer Publish camera health events as JSON to Kafka topic camera-health-events on every check
Frame extractor Save one JPEG frame per camera every 30s to MinIO at path snapshots/{camera_id}/{timestamp}.jpg
Kafka consumer FastAPI background service consuming camera-health-events and updating [Link] in DB
Load test Use k6 to simulate 750 concurrent RTSP streams. Verify no dropped frames or memory leaks.
Task What to Do
Collect training data Run synthetic data generator script. Label 2,000+ real frames in Label Studio.
Train base model Fine-tune YOLOv8-cls on training dataset. Track in Weights & Biases. Achieve mAP >= 0.92.
Export model Export to ONNX + TensorRT. Benchmark: must process 1 frame in < 50ms on target GPU.
Inference service FastAPI microservice: POST /analyse-frame accepts JPEG, returns {fault_type, confidence, timestamp}
Register in MLflow mlflow models register. Tag version, environment, and accuracy metrics.
Integration Ingestion service calls inference endpoint for every extracted frame. Publish fault events to Kafka.
Task What to Do
Alert model Create Alert DB table. Celery task: consume fault events from Kafka, apply dedup (Redis), create Alert rec
Severity classifier Rule engine: map fault_type + camera_zone -> P1/P2/P3. Configure via JSON file (hot-reloadable).
Notification tasks Celery tasks: send_sms (Twilio), send_email (SendGrid), send_push (Firebase), send_whatsapp (WhatsAp
Escalation logic Celery beat scheduled task: every 60s, check unacknowledged P1 alerts older than 5 min, escalate.
WebSocket hub FastAPI WebSocket endpoint: on new alert, broadcast to all connected dashboard clients instantly.
Smart CCTV Monitoring — Tech Stack · Build Guide · Team Roles v1.0 Page 10
Phase 5 — Dashboard & Ticketing (Weeks 14-20)
Task What to Do
Real-time grid React: camera grid with live status colour badges. useWebSocket hook updates state on alert events.
Floor map view React-Leaflet: load floor map PNG as tile layer. Render camera markers with health colour from state.
Alert feed panel Side panel: live list of active faults. Click to view snapshot, camera details, acknowledge button.
Jira integration POST to Jira REST API v3 on P1/P2 alert creation. Store returned ticket ID in Alert record.
Technician mobile React Native: ticket list, camera detail, QR scanner, photo capture, resolve ticket screen.
QR code resolution Scan camera QR (contains camera_id). Call PATCH /alerts/{id}/resolve with photo + notes.
Task What to Do
Reporting module Celery beat: daily/weekly report generation. ReportLab PDF + CSV export. Store in MinIO.
Predictive maintenance scikit-learn: train failure-risk scorer on fault_history per camera. Surface top-10 at-risk cameras.
Load & chaos tests k6: 750 streams + 50 concurrent users. Litmus chaos: kill DB pod, kill Kafka broker, network partition.
Security audit Run OWASP ZAP against staging. Run Trivy on all Docker images. Fix all CRITICAL/HIGH findings.
Penetration test Engage third-party security firm for black-box pentest. Remediate all findings before go-live.
UAT & training Demo to Security Manager, IT Lead, Guards. Capture feedback. Final sign-off. Production deploy.
The following team of 11 people covers all disciplines required to build, deploy, and operate the Smart CCTV
Monitoring application from kickoff to production go-live within the 26-week roadmap.
Responsibilities Own the project roadmap and 26-week delivery plan. Run daily standups, weekly sprint
reviews, retrospectives. Manage budget, risks, and stakeholder communication. Coordinate
between engineering team and mall operations. Track sprint velocity and flag blockers.
Produce weekly status report for management.
Deliverables Sprint plans, risk register, weekly status reports, go-live checklist
Smart CCTV Monitoring — Tech Stack · Build Guide · Team Roles v1.0 Page 11
SOLUTION ARCHITECT 1 person
Responsibilities Design the overall system architecture across all 6 layers. Define API contracts (OpenAPI
spec). Select and justify every technology in the stack. Write Architecture Decision Records
(ADRs). Review all high-level technical designs. Ensure non-functional requirements
(performance, scalability, security) are met by design. Guide the team on architectural
patterns.
Must know Distributed systems, microservices, Kafka, K8s, RTSP video pipelines, security architecture
Deliverables System architecture diagram, ADRs, API spec (OpenAPI YAML), infrastructure topology
Responsibilities Build and own the core FastAPI application: all REST API endpoints, authentication/RBAC,
database models and migrations (Alembic), Celery task definitions, WebSocket hub, and
Kafka consumer services. Write integration tests for all API endpoints. Optimise slow DB
queries. Review backend PRs.
Must know Python 3.11, FastAPI, PostgreSQL, Redis, Kafka, Docker, REST API design, JWT, async
programming
Responsibilities Build the alert engine: Celery tasks for multi-channel notifications (SMS, email, WhatsApp,
push). Implement alert dedup logic in Redis, escalation scheduler (Celery beat), and ITSM
integration (Jira/ServiceNow REST API). Write unit tests for all alert flows.
Must know Python, Celery, Redis, REST APIs, Twilio SDK, SendGrid, Firebase Admin SDK
Deliverables Alert engine services, notification tasks, escalation logic, ITSM integration
Smart CCTV Monitoring — Tech Stack · Build Guide · Team Roles v1.0 Page 12
FRONTEND ENGINEER (SENIOR) 1 person
Responsibilities Build the entire web operations dashboard: camera grid view, floor map with Leaflet, real-time
alert feed, report download UI, user management screens. Implement WebSocket integration
for live updates. Ensure responsive layout, accessibility (WCAG 2.1 AA), and browser
compatibility. Review frontend PRs.
Must know React 18, TypeScript, Zustand, React Query, [Link], Leaflet, Tailwind, Playwright
Deliverables Full dashboard SPA, WebSocket integration, E2E Playwright tests, Storybook component
library
Responsibilities Build the technician mobile app for iOS and Android: ticket list, camera detail, QR code
scanner, photo capture, and resolution workflow. Integrate push notifications (Expo
Notifications). Submit builds to App Store and Google Play. Manage OTA updates via Expo
EAS.
Must know React Native, Expo, TypeScript, REST APIs, push notifications, App Store / Google Play
publishing
Deliverables iOS + Android technician app, EAS build pipeline, App Store listing
AI / ML ENGINEER 1 person
Primary tool Python, PyTorch, YOLOv8, OpenCV, Label Studio, Weights & Biases, MLflow
Responsibilities Own the entire AI pipeline: collect and annotate training data, write synthetic data generation
scripts, train and evaluate YOLOv8 fault classification model, export to ONNX/TensorRT,
build the inference microservice, integrate with NVIDIA DeepStream for multi-stream GPU
inference, monitor model performance in production, retrain on new data quarterly.
Must know PyTorch, YOLOv8/Ultralytics, OpenCV, CUDA, TensorRT, ONNX, scikit-learn, data
annotation
Deliverables Trained + validated fault classifier, inference microservice, model cards, retraining pipeline
Smart CCTV Monitoring — Tech Stack · Build Guide · Team Roles v1.0 Page 13
DEVOPS / INFRASTRUCTURE ENGINEER 1 person
Primary tool Kubernetes, Helm, Terraform, GitHub Actions, ArgoCD, Prometheus, Grafana
Responsibilities Design and manage the entire infrastructure: write Helm charts for all services, build GitHub
Actions CI/CD pipelines, set up ArgoCD GitOps, configure NGINX ingress with TLS, deploy
Prometheus + Grafana + Loki observability stack, manage HashiCorp Vault for secrets,
configure K8s auto-scaling policies, perform disaster recovery drills.
Must know Kubernetes, Docker, Helm, Terraform, GitHub Actions, Prometheus, Grafana, Vault, Linux
sysadmin
Deliverables Helm charts, CI/CD pipelines, K8s cluster config, monitoring dashboards, DR runbooks
Responsibilities Own test strategy across all layers: write and maintain Playwright E2E test suite for
dashboard, write k6 load test scripts for 750-stream and 50-user scenarios, perform manual
exploratory testing each sprint, execute OWASP ZAP security scans against staging,
coordinate UAT sessions with mall operations team, manage defect triage in Jira.
Must know Playwright, k6/Locust, OWASP ZAP, Postman/Newman, test case writing, bug reporting, API
testing
Deliverables E2E test suite, load test scripts, security scan reports, UAT test scripts, defect log
Responsibilities Design and maintain the PostgreSQL schema. Optimise slow queries with EXPLAIN
ANALYZE. Set up TimescaleDB hypertables for camera health time-series. Configure
PostgreSQL HA with streaming replication. Manage Redis sentinel cluster. Define backup
schedules (WAL archiving to MinIO). Set up pgBouncer connection pooler for 750-stream
workload.
Must know PostgreSQL 16, TimescaleDB, Redis, pgBouncer, query optimisation, replication,
backup/restore
Deliverables Optimised DB schema, index strategy, HA replication config, backup runbook, query
performance report
Smart CCTV Monitoring — Tech Stack · Build Guide · Team Roles v1.0 Page 14
SECURITY ENGINEER (PART-TIME / CONSULTANT) 1 person
Primary tool OWASP ZAP, Burp Suite, Trivy, HashiCorp Vault, Falco
Responsibilities Review architecture for security gaps. Implement and configure HashiCorp Vault. Enforce
TLS policies on all services. Run OWASP ZAP automated scans. Review container images
with Trivy. Configure Falco for runtime threat detection in K8s. Coordinate third-party
penetration test. Produce final security sign-off report.
Must know OWASP Top 10, K8s security, Vault, Trivy, Burp Suite, network security, pentest methodology
Deliverables Vault config, Trivy scan reports, pentest brief, security sign-off report
TOTAL 11 — —
Smart CCTV Monitoring — Tech Stack, Build Guide & Team Roles v1.0 | Generated 03 May 2026 | Confidential — authorised
project personnel only.
Smart CCTV Monitoring — Tech Stack · Build Guide · Team Roles v1.0 Page 15