System Live · All Services Operational

Smartbox Full-Stack Infrastructure

IoT Data Pipeline & Web Architecture — Enterprise Overview

7
Services
99.9%
Uptime
3
Network Layers
2
Databases
TLS
Encryption
01 Architecture Diagram
smartbox-arch.mmd · read-only
v2.4.1
graph LR subgraph EdgeLayer ["① Hardware & Edge"] ESP["🖥 ESP32 / Sensors"] end subgraph DockerEnv ["② Ubuntu Server · Docker Network"] MQTT["📡 Mosquitto\nBroker"] subgraph AppLayer ["Application Layer"] FastAPI["⚡ FastAPI\nBackend"] React["⚛ React\nFrontend"] end subgraph DataLayer ["Database Layer"] Influx[("🗄 InfluxDB\nSensor Data")] PG[("🗄 PostgreSQL\nUsers & Config")] end subgraph MonitorLayer ["Monitoring Layer"] Grafana["📊 Grafana\nDashboard"] end Nginx["🔀 Nginx\nReverse Proxy"] end subgraph CloudLayer ["③ Cloud & External Network"] Tunnel{"☁ Cloudflare\nTunnel"} Edge("🌐 Cloudflare\nEdge") User["👤 Users /\nBrowsers"] end ESP -- "MQTT Protocol" --> MQTT MQTT -- "Subscribe" --> FastAPI FastAPI -- "Write Time-Series" --> Influx FastAPI -- "Read/Write Relational" --> PG Grafana -- "Query metrics" --> Influx Grafana -- "Query config" --> PG User -- "HTTPS" --> Edge Edge -- "SSL Termination" --> Tunnel Tunnel -- "Port 80" --> Nginx Nginx -- "Route /" --> React Nginx -- "Route /api" --> FastAPI Nginx -- "Route /grafana" --> Grafana React -. "Fetch JSON" .- FastAPI classDef default fill:#1a2540,stroke:#334a7a,stroke-width:1px,color:#b0c4de,rx:8; classDef proxy fill:#0e4d5c,stroke:#06b6d4,stroke-width:1.5px,color:#a5f3fc; classDef backend fill:#1e3a5f,stroke:#3b82f6,stroke-width:1.5px,color:#93c5fd; classDef frontend fill:#0d3a50,stroke:#0ea5e9,stroke-width:1.5px,color:#7dd3fc; classDef db fill:#3b1c40,stroke:#a855f7,stroke-width:1.5px,color:#d8b4fe; classDef broker fill:#3b2a10,stroke:#f97316,stroke-width:1.5px,color:#fed7aa; classDef edge fill:#0d3324,stroke:#10b981,stroke-width:1.5px,color:#6ee7b7; classDef monitoring fill:#1f2a0e,stroke:#84cc16,stroke-width:1.5px,color:#bef264; class Nginx proxy; class FastAPI backend; class React frontend; class Influx,PG db; class MQTT broker; class Tunnel,Edge edge; class Grafana monitoring;
Component Legend
Reverse Proxy (Nginx)
Backend API (FastAPI)
Frontend (React)
Databases (InfluxDB / PostgreSQL)
MQTT Broker (Mosquitto)
Cloud / Edge (Cloudflare)
Monitoring (Grafana)
02 Grafana Monitoring — Live Preview
MQTT Message Rate
last 1h · 10s
342 msg/s +12%
InfluxDB Write Latency
p95 · real-time
2.4 ms +0.3ms
FastAPI Requests
req/min · 5m avg
1.2k req/min +5%
HTTP Status Distribution
last 24h
2xx OK
92%
3xx Redir
4%
4xx Error
3%
5xx Error
1%
Container Health
Docker status
Nginx
HEALTHY
FastAPI
HEALTHY
Mosquitto
HEALTHY
InfluxDB
HEALTHY
PostgreSQL
HEALTHY
Grafana
STARTING
Server Resource Usage
real-time · 1s
68% CPU
CPU 68%
RAM 45%
Disk 22%
Sensor Data Ingestion
InfluxDB · today
4.7M points +18%
Nginx Throughput
MB/s · 1m window
8.3 MB/s +2%