Skip to main content

Global Architecture

FirstBreath is a modular, high-performance monitoring platform distributed across multiple repositories and services.

Overview

Hosting Choices

CriterionChoiceJustification
Cloud ProviderOVH VPS (France)Data sovereignty (GDPR), low latency, cost-effective. NVIDIA GPU available for AI inference.
PaaSDokploy (open-source, self-hosted)Heroku/Vercel alternative without vendor lock-in. Deployment managed via Git + Docker Compose.
Reverse ProxyTraefik (via Dokploy)Dynamic routing via Docker labels, automatic TLS termination (Let's Encrypt), API replica load balancing.
ContainerizationDocker & Docker ComposeReproducibility, service isolation, resource management (CPU/RAM/GPU).

Client Constraint Justification

ConstraintSolution Provided
BudgetOVH VPS with monthly commitment. Exclusively open-source tools (Dokploy, Traefik, Grafana, SonarQube). No licensing costs.
SecurityMandatory TLS (Let's Encrypt), non-root containers, isolated Docker networks (internal, monitor-net), dependency audits in CI. See Security.
ScalabilityAPI in 2 replicas with Traefik load balancing. Independent Vision services with configurable resource limits. Microservices architecture enables horizontal scaling.
Quality of ServiceDocker healthchecks on every service, automatic restart (unless-stopped / always), Grafana monitoring with alerts.

Repositories and Technologies

RepositoryRoleTech Stack
FirstBreath-PlatformMonorepo (Web, Mobile, Docs)TurboRepo, Next.js, Expo, Docusaurus
Control-Hub-BackREST API + WebSocketAdonisJS (Node.js), MySQL 8, Redis
firstbreath-visionAI / Vision SystemPython, YOLO, OpenCV CUDA, TensorRT
Firstbreath ShowcaseShowcase website (legacy → product dashboard)Next.js, Prisma, MariaDB

Service Sizing

Each service is sized via Docker Compose resource limits:

ServiceCPU LimitRAM LimitGPUReplicas
REST API1.0512 MB2
WebSocket0.5512 MB1
MySQL 81 GB1
Redis300 MB1
Camera Manager4.02 GB1× NVIDIA1
Batch Inference2.04 GB1× NVIDIA1
Redis Worker0.5256 MB1
CloudBeaver0.5512 MB1
Showcase (Web)1.01 GB1

Docker Networks

NetworkTypeRole
dokploy-networkExternalExposes services to the Traefik reverse proxy
monitor-netExternalInter-service communication (Vision ↔ Backend) without public exposure
internalBridgePrivate network for the Control-Hub stack
control-hub-networkBridgeLocal development network