Smart Sentinel Eye is a robust, scalable CCTV management system designed for industrial production facilities that require 24/7 monitoring. The system supports up to 250 cameras with low-latency streaming, dynamic overlays, automated workflows, and comprehensive event processing.
- πΉ Multi-Camera Management: Support for 250+ cameras with RTSP, ONVIF, and proprietary protocols
- π₯ Low-Latency Streaming: < 2s glass-to-glass latency with HLS/WebRTC
- π₯οΈ Flexible Layouts: Configurable display layouts with 1-20+ monitor walls
- π¨ Dynamic Overlays: Real-time text, shapes, and data visualization on streams
- βοΈ Automation: Time-based and event-driven camera switching and actions
- π Event Processing: External event ingestion with timestamp synchronization
- π Security: JWT authentication, RBAC, and encrypted credentials
- π Observability: Prometheus metrics, Grafana dashboards, structured logging
Smart Sentinel Eye follows Domain-Driven Design (DDD) principles with clear bounded contexts:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FRONTEND (React) β
β Operator Client β Display Client β Admin Console β
βββββββββββββ¬ββββββββββββββββββββ¬ββββββββββββββββββββ¬ββββββββββββββ
β β β
ββββ΄ββββββββββββββββββββ΄ββββββββββββββββββββ΄βββ
β API Gateway / Load Balancer β
ββββ¬ββββββββββββββββββββ¬ββββββββββββββββββββ¬βββ
β β β
βββββββββββββ΄βββββββ¬βββββββββββββ΄βββββ¬βββββββββββββββ΄ββββββββββββ
β Camera Mgmt β Streaming β Layout β Overlay β
β Service β Gateway β Service β Service β
ββββββββββββββββββββΌββββββββββββββββββΌβββββββββββΌββββββββββββββββ€
β Automation β Event β Identity β
β Service β Processing β Service β
ββββββββββββββββββββ΄ββββββββββββββββββ΄βββββββββββββββββββββββββββ
β β
βββββββββββββ΄βββββββ¬βββββββββββββ΄βββββ¬βββββββββββββ
β PostgreSQL β Redis β RabbitMQ β
β (TimescaleDB) β (Cache/PubSub) β (Events) β
ββββββββββββββββββββ΄ββββββββββββββββββ΄βββββββββββββ
β
βββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββ
β Stream Keeper Pool (20-50 cameras each) β
β βββββββββββ βββββββββββ βββββββββββ β
β β Keeper 1β β Keeper 2β β Keeper Nβ β
β ββββββ¬βββββ ββββββ¬βββββ ββββββ¬βββββ β
βββββββββΌβββββββββββββΌβββββββββββββΌβββββββββββββββββββ
β β β
π· Cameras (RTSP/ONVIF) 1-250
- Camera Management: Device registration, configuration, PTZ control, health monitoring
- Streaming: Stream keeper services, format conversion (RTSP β HLS), distribution
- Layout Management: Display configuration, monitor walls, cell management
- Overlay: Dynamic content rendering, system variables, templates
- Automation: Scheduled actions, camera sequences, event-triggered workflows
- Event Processing: External event ingestion, validation, history (Event Sourcing)
- Identity & Access: Authentication, authorization, user management
For detailed architecture documentation, see docs/ARCHITECTURE.md.
The Operator Client is a feature-rich React application providing comprehensive camera management and monitoring capabilities:
- Real-time system statistics (total cameras, online/offline status, PTZ cameras)
- Active streams count with live updates
- System health overview with visual indicators
- Responsive stat cards with dynamic colors
- Complete CRUD operations for camera devices
- RTSP connection configuration and testing
- PTZ (Pan-Tilt-Zoom) control for supported cameras
- Camera status monitoring (online/offline, enabled/disabled)
- ONVIF protocol support with capability detection
- Bulk operations and filtering
- Customizable grid layouts (1x1 to 5x5 and beyond)
- Layout templates with persistent camera assignments
- Quick layout switching with keyboard shortcuts (Alt+1-5)
- Individual camera view enlargement with fullscreen mode
- Camera switching within grid cells
- Recent layouts tracking
- Pre-configured multi-camera layouts
- 1-20+ monitor wall support
- Cell-based camera assignment
- Layout sharing across operators
- Dynamic grid columns (1-10 columns)
- Text overlays with custom fonts, colors, and positioning
- Shape overlays (rectangles, circles) with styling
- Line overlays with dash patterns
- Image overlays with opacity control
- Real-time visibility toggling
- Position and content updates
- Typed variables (Text, Number, Boolean, DateTime, JSON)
- Variable substitution in overlay text using
{{variableName}}syntax - Live preview of text templates
- Variable history tracking with timestamps
- Default values and descriptions
- Real-time event stream with auto-refresh
- Event filtering by source, severity, and time range
- External event ingestion display
- Timestamp-based synchronization with video streams
- Acknowledged/unacknowledged status tracking
- SignalR WebSocket integration for live data
- Automatic UI updates on backend changes
- Optimistic UI updates with rollback on errors
- Efficient cache invalidation with React Query
- Material-UI v7 - Modern, responsive design
- Dark/Light themes - Automatic system preference detection
- Keyboard shortcuts - Fast navigation and actions
- Loading states - Clear feedback during operations
- Error handling - User-friendly error messages
- Form validation - Client-side validation before submission
- Architecture Overview - System design, technology stack, scalability
- Domain Model - Value objects, entities, aggregates
- User Stories - 40+ detailed requirements and acceptance criteria
- Deployment Guide - Production deployment instructions, Docker Compose, Kubernetes
- Service Ports - Service port mapping and Docker build instructions
- Docker Optimization - Alpine and Chiseled image optimization
- API Documentation - Complete REST API reference for all 7 microservices
New to testing? Start here: GET_STARTED.md β
Essential Reading:
- Get Started Guide - Your first 5 minutes β START HERE
- Testing Best Practices - Must-read guidelines β
- Quick Reference Card - Commands & patterns cheat sheet
Detailed Guides:
- Complete Test Summary - Full inventory (225+ tests, 46 examples)
- Testing Guide - Comprehensive documentation
- Test Setup Checklist - Step-by-step verification
Reference:
- Changelog - v1.0.0 release notes
- Final Status - Implementation details
- Automation Tests - Service-specific details
- Docker & Docker Compose (24.0+)
- .NET 9 SDK (for local development)
- Node.js 18+ (for frontend development)
# Clone the repository
git clone https://github.com/smartsolutionslab/smart-sentinel-eye.git
cd smart-sentinel-eye
# Start everything (all 7 microservices + infrastructure)
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose downServices available at:
- Camera Management: http://localhost:5001
- Streaming: http://localhost:5002
- Layout: http://localhost:5003
- Overlay: http://localhost:5004
- Automation: http://localhost:5005
- Event Processing: http://localhost:5006
- Identity: http://localhost:5007
Infrastructure services:
- PostgreSQL: localhost:5432
- RabbitMQ Management: http://localhost:15672 (smartsentinel/dev_password_123)
- Keycloak: http://localhost:8080 (admin/admin)
- Seq Logs: http://localhost:5341
- Start infrastructure only:
docker-compose up -d postgres rabbitmq keycloak seq- Run a service locally:
cd src/backend/Services/Automation/Api
dotnet run- Access Swagger UI:
# Each service has Swagger documentation
http://localhost:5005/swagger # Automation
http://localhost:5001/swagger # Camera Management
# ... etc# Build optimized images (60% smaller)
./scripts/build-all-chiseled.sh
# Deploy with production configuration
cp .env.example .env
# Edit .env with production credentials
docker-compose -f docker-compose.prod.yml up -dSee DEPLOYMENT.md for complete deployment guide.
All services are available in 3 optimized variants:
| Variant | Size per Service | Total (7 Services) | Security | Use Case |
|---|---|---|---|---|
| Standard | ~220MB | ~1.54GB | β Good | Development |
| Alpine | ~110MB | ~770MB | β β Better | Staging |
| Chiseled | ~90MB | ~630MB | β β β Best | Production |
Chiseled Images (recommended for production):
- No shell, no package manager
- Minimal attack surface
- 60% size reduction
- Ubuntu-based distroless
See DOCKER_OPTIMIZATION.md for details.
Automated GitHub Actions workflows:
Build & Test (on every push):
- β Build .NET solution
- β Run 31 unit tests (85%+ coverage)
- β Code quality checks
- β Build Docker images (Alpine & Chiseled)
- β Integration tests
Deploy (on release):
- β Build production images
- β Push to Docker Hub
- β Deploy to Kubernetes
- β Smoke tests
- β Auto-rollback on failure
- ASP.NET Core 9.0 - Web API framework
- Entity Framework Core 9.0 - ORM with PostgreSQL
- MediatR - CQRS pattern implementation
- FluentValidation - Request validation
- MassTransit - Message bus abstraction (RabbitMQ)
- SignalR - Real-time WebSocket communication
- FFmpeg - Stream processing and conversion
- OpenTelemetry - Distributed tracing and metrics
- React 19 with TypeScript 5.x
- Vite 6 - Next-generation build tool
- TanStack Query v5 - Data fetching, caching, and real-time invalidation
- React Router v7 - Type-safe navigation
- Material-UI v7 - Modern component library with emotion styling
- SignalR Client - Real-time WebSocket updates
- HLS.js - Adaptive HLS video playback
- Axios - HTTP client with interceptors
- PostgreSQL 16 with TimescaleDB - Primary database + time-series
- Redis 7 - Caching and pub/sub
- RabbitMQ 3 - Message broker
- Prometheus - Metrics collection
- Grafana - Visualization dashboards
- Seq / ELK - Structured logging
- Docker & Kubernetes - Containerization and orchestration
- NGINX / Traefik - Reverse proxy and load balancing
| Capability | Specification |
|---|---|
| Maximum Cameras | 250 (horizontally scalable) |
| Concurrent Streams | 250+ (with multiple Stream Keepers) |
| Stream Latency | < 2 seconds (target < 1s with WebRTC) |
| Supported Protocols | RTSP, ONVIF, HTTP, Proprietary SDKs |
| Video Formats | H.264, H.265, MJPEG |
| Output Formats | HLS, WebRTC (optional) |
| Max Resolution | Up to 4K (3840x2160) |
| Availability | 24/7 operation, 99.5%+ uptime target |
| Event Throughput | 1000+ events/second |
# Build Chiseled images (60% smaller, maximum security)
./scripts/build-all-chiseled.sh
# Configure environment
cp .env.example .env
nano .env # Set POSTGRES_PASSWORD, RABBITMQ_PASSWORD, KEYCLOAK_AUTHORITY
# Deploy
docker-compose -f docker-compose.prod.yml up -d
# Verify
curl http://localhost:5001/health# Create namespace and secrets
kubectl create namespace smartsentinel-prod
kubectl create secret generic smartsentinel-secrets \
--from-literal=postgres-password=<password> \
--from-literal=rabbitmq-password=<password> \
-n smartsentinel-prod
# Deploy services
kubectl apply -f k8s/ -n smartsentinel-prod
# Scale services
kubectl scale deployment camera-management --replicas=3 -n smartsentinel-prod
kubectl scale deployment automation --replicas=2 -n smartsentinel-prodAll services expose /health endpoints:
# Check all services
for port in 5001 5002 5003 5004 5005 5006 5007; do
echo "Port $port: $(curl -s -o /dev/null -w "%{http_code}" http://localhost:$port/health)"
done
# Individual service
curl http://localhost:5005/health # AutomationFor detailed deployment instructions, see DEPLOYMENT.md.
# Run all tests
cd src/backend
dotnet test SmartSentinelEye.sln
# Run specific service tests
cd Services/Automation
dotnet testTest Coverage:
- 31 comprehensive unit tests for Automation service
- 85%+ coverage on critical paths
- xUnit + Moq + Shouldly framework
- See TEST_SUMMARY.md for details
Test Categories:
- CameraSequenceExecutor (12 tests)
- EventBasedRuleExecutor (11 tests)
- CameraRegisteredEventConsumer (5 tests)
- CameraDeletedEventConsumer (3 tests)
# Run with Docker Compose
docker-compose up -d
dotnet test --filter Category=IntegrationSee AUTOMATION_TESTING.md for comprehensive manual testing guide with curl examples.
- Authentication: JWT tokens with refresh token rotation
- Authorization: Role-based (Admin, Operator, Display) + policy-based
- Encryption: TLS for all external communication, encrypted credentials at rest
- API Keys: For external system integration
- Rate Limiting: Prevents API abuse
- Audit Logging: All actions tracked with user context
- Stream latency and frame rate per camera
- Service health and resource usage (CPU, memory, network)
- Message queue depth
- Database connection pool status
- Custom business metrics (camera switches, automation executions)
Pre-configured dashboards for:
- System overview
- Camera health status
- Streaming performance
- Event processing throughput
- Service-specific metrics
- Centralized log aggregation
- Correlation IDs for distributed tracing
- Log levels: Debug, Information, Warning, Error, Fatal
- Search and filtering by service, timestamp, context
Contributions are welcome! Please read our CONTRIBUTING.md for guidelines.
- Create a feature branch:
git checkout -b feature/your-feature - Make changes and commit:
git commit -m "Add your feature" - Push to branch:
git push origin feature/your-feature - Open a Pull Request
- Backend: Follow C# coding conventions, use nullable reference types
- Frontend: Use TypeScript strict mode, follow React best practices
- Testing: Maintain 80%+ code coverage for business logic
- Documentation: Update docs with significant changes
This project is licensed under the MIT License - see the LICENSE file for details.
- Smart Solutions Lab - Initial architecture and development
- FFmpeg for stream processing
- TimescaleDB for time-series data
- .NET Community for excellent tooling
- React Community for frontend libraries
For issues, questions, or feature requests:
- GitHub Issues: https://github.com/smartsolutionslab/smart-sentinel-eye/issues
- Email: [email protected]
- Documentation: docs/
Built with β€οΈ for industrial monitoring