Skip to content

Container diagrams (level 2)

1. End-to-End IoT System Architecture

A Container diagram zooms into the systems defined at Level 1 to show the high-level technical architecture. In an Internet of Things (IoT) solution, it captures the whole journey of the data. That runs from the silicon and firmware at the edge, through local networks and cloud microservices, to the user’s phone.

mermaid diagram

End-to-end Container diagram (Level 2) showing the physical device, cloud microservices, and mobile client app.

2. Matching PlantUML C4 Container Diagram

The following PlantUML C4 Container diagram represents the identical architecture using standard C4 elements and custom tags:

Container Diagram: Smart Home Environmental Sensor Solution

PlantUML C4 Container diagram for the Smart Home IoT ecosystem.

3. Container Classifications

A clean Level 2 diagram categorises containers by their functional layer:

Container Category Technology Responsibility
Sensor Microcontroller Edge Compute ESP32-S3 (Xtensa Dual-Core) Runs FreeRTOS, sensor drivers, Wi-Fi stack, and application tasks.
Environmental Sensor IC Edge Sensor Bosch BME688 / I2C Gathers raw analog/digital temperature, humidity, and gas resistance.
Flash Memory Partition Edge Storage SPI NOR Flash (LittleFS) Retains calibration curves, Wi-Fi credentials, and FOTA staging slots.
IoT MQTT Broker Cloud Ingestion EMQX Cluster / Mosquitto Handles hundreds of thousands of concurrent TLS socket connections.
Ingestion Worker Cloud Processing Go / Goroutines High-throughput stream processing validating incoming telemetry.
TimescaleDB Cloud Storage TimescaleDB (PostgreSQL) Hypertables optimised for high-rate append-only time-series data.
Customer API Gateway Cloud API GraphQL / Node.js / Express Serves user dashboard requests, user authentication, and mobile tokens.
Mobile Application Client UI Flutter / Dart Native iOS and Android application displaying real-time graphs and air alerts.

Container definitions and technologies for the Smart Home IoT solution.

4. Tips & Tricks for Level 2 Diagrams

  1. Avoid Over-Splitting Microcontroller Silicon: Treat the microcontroller running the primary firmware as one execution container. Do not create separate containers for internal RAM, internal registers, or internal timers.
  2. Show Storage Containers Clearly: Any component that persists data across reboots (such as external SPI flash, LittleFS partitions, or cloud databases) should be represented using container database shapes (ContainerDb).
  3. Document Data Protocol Formats: State both the transport and the serialisation format on communication lines (for example, [MQTT over TLS / JSON payload] or [HTTPS / GraphQL]).