{"id":29531938,"url":"https://github.com/dlesas/home-security","last_synced_at":"2026-04-10T06:32:11.512Z","repository":{"id":299101047,"uuid":"799673216","full_name":"DLesas/home-security","owner":"DLesas","description":"Enterprise-grade IoT home security system with microservices architecture. Features React Native mobile app, Electron admin interface, real-time monitoring, Docker orchestration, and CircuitPython IoT devices, ai powered facial recognition.","archived":false,"fork":false,"pushed_at":"2025-07-15T13:56:45.000Z","size":2049,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-16T07:05:37.236Z","etag":null,"topics":["caddy","circuitpython","docker","electron","iot","microservices","postgresql","react","react-native","redis","security-system","typescript","wireguard"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DLesas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-12T20:34:21.000Z","updated_at":"2025-07-15T13:56:49.000Z","dependencies_parsed_at":"2025-07-16T11:14:25.973Z","dependency_job_id":null,"html_url":"https://github.com/DLesas/home-security","commit_stats":null,"previous_names":["dlesas/home_security","dlesas/home-security"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DLesas/home-security","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DLesas%2Fhome-security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DLesas%2Fhome-security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DLesas%2Fhome-security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DLesas%2Fhome-security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DLesas","download_url":"https://codeload.github.com/DLesas/home-security/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DLesas%2Fhome-security/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265549013,"owners_count":23786315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["caddy","circuitpython","docker","electron","iot","microservices","postgresql","react","react-native","redis","security-system","typescript","wireguard"],"created_at":"2025-07-16T23:01:52.165Z","updated_at":"2025-12-30T19:55:09.461Z","avatar_url":"https://github.com/DLesas.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Home Security System\n\n_A comprehensive, scalable IoT security solution with real-time monitoring and notifications_\n\n[![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\n[![React Native](https://img.shields.io/badge/React_Native-20232A?style=for-the-badge\u0026logo=react\u0026logoColor=61DAFB)](https://reactnative.dev/)\n[![Docker](https://img.shields.io/badge/Docker-2496ED?style=for-the-badge\u0026logo=docker\u0026logoColor=white)](https://www.docker.com/)\n[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-316192?style=for-the-badge\u0026logo=postgresql\u0026logoColor=white)](https://www.postgresql.org/)\n[![Redis](https://img.shields.io/badge/Redis-DC382D?style=for-the-badge\u0026logo=redis\u0026logoColor=white)](https://redis.io/)\n\n## Project Overview\n\nA production-ready, enterprise-grade home security system designed for non-technical users, featuring distributed microservices architecture, real-time monitoring, and cross-platform mobile applications.\nAll achieved locally without heavy dependency on cloud infra (apart from push notifications and remote access where a centralised service needs to be made).\n\n\n\n## System Architecture\n\n### Core Components\n\n```mermaid\ngraph TB\n    A[\"Mobile App - React Native\"] --\u003e L[\"WireGuard VPN\"]\n    L --\u003e B[\"Caddy Reverse Proxy\"]\n    B --\u003e C[\"Backend API - Express.js/TypeScript\"]\n    C --\u003e D[\"PostgreSQL Database\"]\n    C --\u003e E[\"Redis Cache/PubSub\"]\n    E --\u003e F[\"Event Service\"]\n    F --\u003e G[\"Push Notification Service\"]\n    H[\"CircuitPython Devices\"] --\u003e |\"Discovers Backend via UDP\"| J[\"Advertisement Service\"]\n    H --\u003e |\"Sensor data \u0026 Commands\"| B\n    K[\"Camera Streams\"] --\u003e N[\"Video Processing - Python\"]\n    N --\u003e |\"Face Detection \u0026 Recognition\"| D\n    N --\u003e |\"Event Triggers\"| E\n    M[\"Admin Desktop App - Electron\"] --\u003e |\"Launches \u0026 Manages\"| C\n    M --\u003e |\"Launches \u0026 Manages\"| F\n    M --\u003e |\"Launches \u0026 Manages\"| J\n    M --\u003e |\"Launches \u0026 Manages\"| N\n    M --\u003e |\"Launches \u0026 Manages\"| D\n    M --\u003e |\"Launches \u0026 Manages\"| E\n    M --\u003e |\"Launches \u0026 Manages\"| B\n```\n\n### Infrastructure Design\n\n- **Local Server**: Electron-based admin application with Docker orchestration\n- **Microservices**: Containerized services with independent scaling\n  - Node.js API backend for device management and business logic\n  - Python video processing service for AI-powered surveillance\n- **Network Layer**: Caddy reverse proxy with HTTPS/WSS termination and WireGuard VPN for remote devices\n- **Mobile Client**: React Native app with remote connectivity via WireGuard VPN\n- **IoT Devices**: CircuitPython-based sensors, alarms and cameras with local network discovery\n\n\n\n## Project Status\n\n**Note: This is an active development project and is no where near finished**\n\n### Completed Components\n\n- **Node.js Backend API** - Full TypeScript implementation with Express.js\n- **PostgreSQL Database** - Complete schema with Drizzle ORM\n- **Redis Integration** - Caching and pub/sub messaging\n- **CircuitPython IoT Devices** - Sensor and alarm microcontrollers\n\n### In Development\n\n- **Frontend Applications** - React Native mobile app and Electron admin interface need significant work\n- **Admin Application** - Requires complete overhaul for better UX\n- **WireGuard VPN Service** - Not yet implemented\n- **Integration Testing** - Cross-service communication and deployment\n- **Python Video Processing Backend** - implemented a dummy version but not done efficiently\n\n\n\n## Technical Highlights\n\n### Backend \u0026 Infrastructure\n\n- **Express.js API** with TypeScript for type safety and maintainability\n- **Python Video Processing** with YOLO object detection and face recognition\n- **PostgreSQL** with Drizzle ORM for robust data persistence\n- **Redis** for real-time caching and pub/sub messaging\n- **Docker Compose** orchestration for service management\n- **Caddy** reverse proxy with automatic HTTPS and load balancing\n\n### Frontend \u0026 Mobile\n\n- **React Native** cross-platform mobile application\n- **Electron** desktop admin interface\n- **Real-time WebSocket** connections for live updates\n\n### DevOps \u0026 Networking\n\n- **WireGuard VPN** for secure remote access\n- **UDP broadcasting** for automatic device discovery\n- **Containerized deployment** with Docker\n- **HTTPS/WSS** secure communications\n- **Network segmentation** with proper firewall rules\n\n### IoT \u0026 Hardware Integration\n\n- **CircuitPython** microcontroller programming\n- **Local network discovery** via UDP broadcasting\n- **Real-time sensor monitoring** with sub-second response times\n- **Hardware abstraction** for multiple device types\n\n### AI \u0026 Computer Vision\n\n- **YOLO v11** object detection for real-time surveillance\n- **Face detection and recognition** using InceptionResnetV1\n- **Multi-threaded video processing** with dynamic worker scaling\n- **GPU acceleration** with CUDA support and memory optimization\n- **Performance monitoring** with detailed metrics and logging\n\n\n\n## Key Features\n\n### Security \u0026 Monitoring\n\n- Real-time door sensor monitoring\n- Automated alarm triggering\n- AI-powered video surveillance with YOLO object detection\n- Face detection and recognition for person identification\n- Push notifications via Expo/Firebase\n- Secure device authentication\n- End-to-end encryption\n\n### User Experience\n\n- Remote monitoring capabilities\n- Real-time status updates\n- Historical event logging\n\n### System Administration\n\n- Electron-based admin dashboard\n- Docker service management\n- System health monitoring\n- Configuration management\n- Log aggregation and analysis\n\n\n\n## Technology Stack\n\n### Backend Services\n\n```typescript\n// Core Technologies\n- Node.js + Express.js + TypeScript\n- Python + OpenCV + YOLO + PyTorch\n- PostgreSQL + Drizzle ORM + SQLAlchemy\n- Redis (Cache + PubSub)\n- Docker + Docker Compose\n- Caddy (Reverse Proxy)\n```\n\n### Frontend Applications\n\n```typescript\n// Mobile \u0026 Desktop\n- React Native (iOS/Android)\n- Electron (Desktop Admin)\n- WebSocket (Real-time Communication)\n- Expo (Push Notifications)\n```\n\n### Infrastructure \u0026 DevOps\n\n```yaml\n# Deployment Stack\n- Docker Containerization\n- WireGuard VPN\n- HTTPS/TLS Termination\n- UDP Network Discovery\n- Microservices Architecture\n```\n\n### IoT \u0026 Hardware\n\n```python\n# Embedded Systems\n- CircuitPython\n- Microcontroller Programming\n- Sensor Integration\n- Network Communication\n```\n\n\n\n## Performance \u0026 Scalability\n\n- **Sub-second response times** for sensor events\n- **Horizontal scaling** via containerized microservices\n- **Efficient caching** with Redis for frequently accessed data\n- **Optimized database queries** with proper indexing\n- **Real-time event processing** with pub/sub architecture\n\n## Security Implementation\n\n- **Device authentication** with secure API keys\n- **Network segmentation** between IoT devices and internet\n- **VPN-based remote access** for enhanced security\n- **HTTPS/WSS encryption** for all communications\n- **Input validation** and sanitization throughout\n\n\n\n## Business Value\n\n### For End Users\n\n- **Plug-and-play setup** requiring minimal technical knowledge\n- **Cost-effective** alternative to commercial security systems which rely heavily on the cloud\n- **Privacy-focused** with local data processing\n\n### Technical Achievements\n\n- **Microservices architecture** enabling independent service scaling\n- **Cross-platform compatibility** (iOS, Android, Windows, macOS, Linux)\n- **Real-time data processing** with sub-second latency\n- **AI-powered surveillance** with modern computer vision techniques\n\n\n\n\n## Getting Started\n\nNot recommended as it is not finished but\n\n### Quick Start\n\n```bash\n# Clone the repository\ngit clone https://github.com/DLesas/home_security.git\ncd home_security\n\n# Start the admin application\ncd adminApp\nnpm install\nnpm start\n\n# The admin app will handle Docker service orchestration\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlesas%2Fhome-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlesas%2Fhome-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlesas%2Fhome-security/lists"}