System Overview Hub¶
This hub provides high-level architecture understanding of the Home Security Intelligence system.
Component Architecture¶

Backend Layer Organization¶

flowchart TB
subgraph Frontend["Frontend Layer"]
FE["React + TypeScript<br/>Vite + Tailwind + Tremor<br/>:5173 (dev) / :8080 (prod)"]
end
subgraph Backend["Backend Layer"]
BE["FastAPI<br/>Python 3.14+<br/>:8000"]
WS["WebSocket<br/>/ws/events, /ws/system"]
end
subgraph AI["AI Services Layer"]
DET["YOLO26<br/>Object Detection<br/>:8095"]
LLM["Nemotron 30B<br/>Risk Analysis<br/>:8091"]
FLO["Florence-2<br/>Vision Extraction<br/>:8092"]
CLIP["CLIP ViT-L<br/>Re-identification<br/>:8093"]
ENR["Enrichment API<br/>Multi-Model Hub<br/>:8094"]
end
subgraph Data["Data Layer"]
PG[(PostgreSQL<br/>:5432)]
RD[(Redis<br/>:6379)]
FS[("/export/foscam/<br/>Camera Storage")]
end
FE <-->|REST API| BE
FE <-->|WebSocket| WS
BE --> DET
BE --> LLM
BE --> FLO
BE --> CLIP
BE --> ENR
BE <--> PG
BE <--> RD
BE --> FS Service Inventory¶

| Service | Port | Container | Source | Description |
|---|---|---|---|---|
| Frontend | 5173 (dev), 8080 (prod) | frontend | frontend/ | React dashboard with real-time updates |
| Backend | 8000 | backend | backend/main.py:992 | FastAPI server with WebSocket support |
| PostgreSQL | 5432 | postgres | docker-compose.prod.yml:41 | Primary database for events, detections |
| Redis | 6379 | redis | docker-compose.prod.yml:403 | Queues, pub/sub, batch state |
| YOLO26 | 8095 | ai-yolo26 | ai/yolo26/ | Real-time object detection |
| Nemotron LLM | 8091 | ai-llm | ai/nemotron/ | Risk analysis via llama.cpp |
| Florence-2 | 8092 | ai-florence | ai/florence/ | Vision-language extraction |
| CLIP | 8093 | ai-clip | ai/clip/ | Entity re-identification |
| Enrichment | 8094 | ai-enrichment | ai/enrichment/ | Multi-model enrichment hub |
| Prometheus | 9090 | prometheus | docker-compose.prod.yml:534 | Metrics collection |
| Grafana | 3002 | grafana | docker-compose.prod.yml:564 | Monitoring dashboards |
| Jaeger | 16686 | jaeger | docker-compose.prod.yml:507 | Distributed tracing |
| Alertmanager | 9093 | alertmanager | docker-compose.prod.yml:656 | Alert routing |
Technology Stack¶
flowchart TB
subgraph Stack["Technology Stack"]
direction TB
subgraph FE["Frontend"]
React["React 19"]
TS["TypeScript 5.3"]
Tailwind["Tailwind CSS 3.4"]
Tremor["Tremor 3.17"]
Vite["Vite 5.0"]
end
subgraph BE["Backend"]
Python["Python 3.14+"]
FastAPI["FastAPI 0.104+"]
SQLAlchemy["SQLAlchemy 2.0"]
Pydantic["Pydantic 2.0"]
end
subgraph DB["Database"]
PG["PostgreSQL 15+"]
Redis["Redis 7.x"]
end
subgraph ML["AI/ML"]
PyTorch["PyTorch 2.x"]
YOLO26["YOLO26"]
Nemotron["Nemotron-3-Nano-30B"]
LlamaCpp["llama.cpp"]
end
subgraph Infra["Infrastructure"]
Docker["Docker/Podman"]
NVIDIA["NVIDIA Container Toolkit"]
Prom["Prometheus"]
Graf["Grafana"]
end
end Quick Links¶
| Document | Description |
|---|---|
| Design Decisions | ADR-format architectural decisions with rationale |
| Deployment Topology | Container architecture, GPU passthrough, networking |
| Configuration | Settings architecture, environment variables |
Data Flow Summary¶
- Image Capture: Foscam cameras FTP upload images to
/export/foscam/{camera}/ - Detection: FileWatcher queues images, YOLO26 performs object detection
- Batching: BatchAggregator groups detections (90s window, 30s idle timeout)
- Analysis: Nemotron LLM analyzes batches, assigns risk scores
- Broadcast: Events pushed via Redis pub/sub to WebSocket clients
- Display: React dashboard updates in real-time
Script Dependencies¶

The project includes various scripts for development, testing, and deployment. This dependency graph illustrates how scripts relate to each other and their execution order.
Related Documentation¶
| Document | Purpose |
|---|---|
/docs/architecture/overview.md | Comprehensive architecture overview |
/docs/architecture/decisions.md | Full ADR collection |
/docs/architecture/ai-pipeline.md | AI processing pipeline details |
/docs/architecture/real-time.md | WebSocket and pub/sub patterns |
/AGENTS.md | Project navigation guide |