README.md
$npm run start:workspace_
🎯 Mission: To transform standard CCTV systems into intelligent, AI-powered surveillance platforms with real-time analytics and efficient recording capabilities, deployable on edge devices.
⚠️ Problem: Traditional CCTV systems are passive and lack real-time intelligence. Integrating advanced analytics often requires expensive, dedicated hardware or complex cloud setups, which are not feasible for many small to medium-sized deployments or edge computing scenarios. There's a need for an affordable, self-hosted solution that leverages existing camera infrastructure.
👥 Target Audience: Homeowners, small businesses, security system installers, IoT enthusiasts, developers looking for a scalable edge surveillance solution.
📈 Impact Metrics: Enables real-time people counting density telemetry, provides instantaneous facial recognition alerts, and reduces storage management overhead through automated retention policies.
Streamify is a comprehensive Network Video Recorder (NVR) platform that transforms standard CCTV RTSP streams into an intelligent surveillance system. The backend orchestration seamlessly integrates FFmpeg for live HLS streaming and efficient segment recording, while a dedicated Python microservice processes frames in real-time. Leveraged MobileNet-SSD for live people counting density telemetry and dlib/face_recognition to identify and log known faces against a local SQLite database. Built a sleek, responsive Next.js dashboard featuring Server-Sent Events (SSE) for instantaneous overlay alerts, real-time analytics charts, and a tabbed historical logs viewer. Containerized the entire microservices architecture using Docker for simplified deployment and environment consistency.
Streamify is composed of several decoupled components running in harmony:
1. RTSP Cameras: The source of raw video streams.
2. Recorder Daemon: An FFmpeg-based service that captures RTSP streams, transcodes them into HLS segments, and manages recording files.
3. AI Microservice (Python): Processes video frames for real-time analytics like people counting and facial recognition.
4. Backend API (Node.js/Express.js): Orchestrates camera configurations, user authentication, database interactions (SQLite), and serves HLS streams and analytics data.
5. Frontend Dashboard (Next.js): Provides a user interface for live viewing, analytics, alerts (via SSE), and historical logs.
Data flows from cameras to the recorder, which produces HLS segments. The AI service analyzes frames, sending insights to the backend API. The backend API manages data and communicates with the frontend, which displays live streams, alerts, and analytics.
!Streamify NVR System Architecture
1. Clone the repository:
git clone https://github.com/Aryamgupta/Streamify.git
cd Streamify2. Run the setup script with sudo:
sudo ./scripts/setup-pi.shThis script installs dependencies, builds the project, and configures systemd services.
1. Ensure Docker and Docker Compose are installed.
2. Navigate to the project root.
3. Run the stack:
docker compose up -d --buildThis command builds images and starts the frontend, backend, and recorder containers.
cctv-backend.service, cctv-recorder.service, cctv-frontend.servicescripts/stop-services.sh, scripts/restart-services.shsystemctl status <service_name>, journalctl -u <service_name> -fSystemd service files in scripts/ contain placeholders for User and WorkingDirectory. The setup script dynamically replaces these with the correct values. Manual customization of .service files is also possible.
http://<pi-ip>:3000 or http://localhost:3000admin, Pass: admin123backend/data/nvr.db (SQLite)recordings/ directory.