# ch-mengsrun/iot-section-1-group-8 architecture

> Architecture diagram of the GitHub repository ch-mengsrun/iot-section-1-group-8, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ch-mengsrun/iot-section-1-group-8
- Repository: https://github.com/ch-mengsrun/iot-section-1-group-8

## Overview

This repository is a collection of ESP32/MicroPython IoT lab projects rather than one integrated application. Its main workflows are sensor monitoring and remote control, package-box handling, parking management, and motor control. The graph keeps these independent projects separate and includes the shared LCD-driver implementations. README contents were not provided, and several tree-listed flow/configuration files were not sampled, so their runtime connections are omitted.

Main entry points: [`Mini_Project_1/main.py`](https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Mini_Project_1/main.py) (Parking dashboard), [`Lab_2/web.py`](https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Lab_2/web.py) (Sensor web monitor), [`Final Group Project/main.py`](https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Final%20Group%20Project/main.py) (Package-box controller), [`Lab_1/IOT_Lab1.py`](https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Lab_1/IOT_Lab1.py) (Telegram commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_monitoring["Monitoring and alerts"]
  node_sensors["DHT22 and relay<br/>[IOT_Lab1.py]"]
  node_telegram_commands["Telegram commands<br/>[IOT_Lab1.py]"]
  node_lab2_monitor["Sensor web monitor<br/>[web.py]"]
end

subgraph group_package["Smart package box"]
  node_package_controller["Package-box controller<br/>[main.py]"]
  node_package_state[("Package and door state<br/>[main.py]")]
end

subgraph group_parking["Parking system"]
  node_parking_app["Parking controller<br/>[main.py]"]
  node_parking_state[("Slots and tickets<br/>[main.py]")]
  node_parking_dashboard["Parking dashboard<br/>[main.py]"]
end

subgraph group_motor["Motor control"]
  node_motor_app["Motor controller<br/>[main.py]"]
  node_motor_http["Motor web interface<br/>[main.py]"]
end

subgraph group_lcd["LCD drivers"]
  node_lab2_lcd["I2C LCD driver<br/>[machine_i2c_lcd.py]"]
  node_lcd_api["LCD command API<br/>[lcd_api.py]"]
end

node_person(("User"))
node_telegram_user(("Telegram user"))
node_mqtt_broker{{"MQTT broker"}}
node_telegram_service{{"Telegram API"}}
node_web_client(("Web client"))

node_sensors -->|"handles commands"| node_telegram_commands
node_telegram_commands -->|"sends and polls"| node_telegram_service
node_lab2_monitor -->|"drives display"| node_lab2_lcd
node_lab2_monitor -->|"serves monitor"| node_web_client
node_package_controller -->|"updates state"| node_package_state
node_package_controller -->|"publishes and checks"| node_mqtt_broker
node_person -->|"views status"| node_parking_dashboard
node_parking_dashboard -->|"renders status"| node_parking_state
node_parking_app -->|"manages tickets"| node_parking_state
node_parking_app -->|"serves dashboard"| node_parking_dashboard
node_motor_http -->|"routes commands"| node_motor_app
node_motor_app -->|"publishes events"| node_mqtt_broker
node_web_client -->|"sends requests"| node_motor_http
node_lab2_lcd -->|"extends API"| node_lcd_api

click node_sensors "https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Lab_1/IOT_Lab1.py"
click node_telegram_commands "https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Lab_1/IOT_Lab1.py"
click node_lab2_monitor "https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Lab_2/web.py"
click node_lab2_lcd "https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Lab_2/machine_i2c_lcd.py"
click node_lcd_api "https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Mini_Project_1/lcd_api.py"
click node_package_controller "https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Final%20Group%20Project/main.py"
click node_package_state "https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Final%20Group%20Project/main.py"
click node_parking_app "https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Mini_Project_1/main.py"
click node_parking_state "https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Mini_Project_1/main.py"
click node_parking_dashboard "https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Mini_Project_1/main.py"
click node_motor_app "https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Lab_5/main.py"
click node_motor_http "https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Lab_5/main.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_sensors,node_telegram_commands,node_lab2_monitor,node_person,node_telegram_user,node_web_client toneBlue
class node_package_controller,node_package_state toneAmber
class node_parking_app,node_parking_state,node_parking_dashboard,node_telegram_service toneMint
class node_motor_app,node_motor_http toneRose
class node_lab2_lcd,node_lcd_api,node_mqtt_broker toneIndigo
```

## Components

### Monitoring and alerts

- [DHT22 and relay](https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Lab_1/IOT_Lab1.py): `Lab_1/IOT_Lab1.py`
- [Telegram commands](https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Lab_1/IOT_Lab1.py): `Lab_1/IOT_Lab1.py`
- [Sensor web monitor](https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Lab_2/web.py): `Lab_2/web.py`

### Smart package box

- [Package-box controller](https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Final%20Group%20Project/main.py): `Final Group Project/main.py`
- [Package and door state](https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Final%20Group%20Project/main.py): `Final Group Project/main.py`

### Parking system

- [Parking controller](https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Mini_Project_1/main.py): `Mini_Project_1/main.py`
- [Slots and tickets](https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Mini_Project_1/main.py): `Mini_Project_1/main.py`
- [Parking dashboard](https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Mini_Project_1/main.py): `Mini_Project_1/main.py`

### Motor control

- [Motor controller](https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Lab_5/main.py): `Lab_5/main.py`
- [Motor web interface](https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Lab_5/main.py): `Lab_5/main.py`

### LCD drivers

- [I2C LCD driver](https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Lab_2/machine_i2c_lcd.py): `Lab_2/machine_i2c_lcd.py`
- [LCD command API](https://github.com/ch-mengsrun/iot-section-1-group-8/blob/main/Mini_Project_1/lcd_api.py): `Mini_Project_1/lcd_api.py`

### Other components

- **User**
- **Telegram user**
- **MQTT broker**
- **Telegram API**
- **Web client**

## Connections

- DHT22 and relay → Telegram commands: handles commands (evidence: `Lab_1/IOT_Lab1.py`)
- Telegram commands → Telegram API: sends and polls (evidence: `Lab_1/IOT_Lab1.py`)
- Sensor web monitor → I2C LCD driver: drives display (evidence: `Lab_2/web.py`)
- Sensor web monitor → Web client: serves monitor (evidence: `Lab_2/web.py`)
- Package-box controller → Package and door state: updates state (evidence: `Final Group Project/main.py`)
- Package-box controller → MQTT broker: publishes and checks (evidence: `Final Group Project/main.py`)
- User → Parking dashboard: views status (evidence: `Mini_Project_1/main.py`)
- Parking dashboard → Slots and tickets: renders status (evidence: `Mini_Project_1/main.py`)
- Parking controller → Slots and tickets: manages tickets (evidence: `Mini_Project_1/main.py`)
- Parking controller → Parking dashboard: serves dashboard (evidence: `Mini_Project_1/main.py`)
- Motor web interface → Motor controller: routes commands (evidence: `Lab_5/main.py`)
- Motor controller → MQTT broker: publishes events (evidence: `Lab_5/main.py`)
- Web client → Motor web interface: sends requests (evidence: `Lab_5/main.py`)
- I2C LCD driver → LCD command API: extends API (evidence: `Lab_2/machine_i2c_lcd.py`)
