Skip to main content

System Architecture Overview

┌─────────────────────────────────────────────────────────────────┐
│ IoT DMI Cloud Platform │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────┐ ┌──────────────────────┐ │
│ │ IoT Devices │ │ Frontend (Next.js) │ │
│ │ (Sensors/MQTT) │ │ React + TypeScript │ │
│ └────────┬─────────┘ └──────────┬───────────┘ │
│ │ │ │
│ │ MQTT │ HTTP/REST │
│ ▼ ▼ │
│ ┌──────────────────┐ ┌──────────────────────┐ │
│ │ MQTT Broker │ │ FastAPI Backend │ │
│ │ (Mosquitto) │ │ (Python) │ │
│ └──────────────────┘ └──────────┬───────────┘ │
│ │ │
│ ┌──────────────────────┴───────┐ │
│ │ │ │
│ ▼ ▼ │
│ PostgreSQL Services Layer │
│ (Database) - MQTT Service │
│ - Device Status │
│ - Scheduler │
│ - Message Processor │
│ │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ Real-time: WebSocket (/ws/devices) for live updates │ │
│ └────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘