# agodoi/m04-semana05 architecture

> Architecture diagram of the GitHub repository agodoi/m04-semana05, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/agodoi/m04-semana05
- Repository: https://github.com/agodoi/m04-semana05

## Overview

This repository is a Portuguese teaching resource about communicating sensor data over MQTT in a local IoT setup. Its principal example follows sensor readings from an ESP32, through Mosquitto topic-based delivery, into Node-RED and a browser dashboard; the lesson also explains MQTT connection, subscription, authorization, matching, and QoS concepts. The graph represents the documented example, not inspected implementation code. The README excerpt ends during the Node-RED processing discussion, so later processing details are not inferred.

Main entry points: [`README.md`](https://github.com/agodoi/m04-semana05/blob/main/README.md) (Topic matching), [`perguntas.md`](https://github.com/agodoi/m04-semana05/blob/main/perguntas.md) (Group questions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning materials"]
  node_lesson["MQTT lesson<br/>[README.md]"]
  node_questions["Group questions<br/>[perguntas.md]"]
end

subgraph group_devices["IoT endpoints"]
  node_esp32["ESP32 publisher"]
end

subgraph group_infrastructure["Local infrastructure"]
  node_broker["Mosquitto broker"]
  node_topic_matching["Topic matching<br/>[README.md]"]
  node_node_red["Node-RED subscriber"]
end

node_sensor(("Sensor"))
node_dashboard["Browser dashboard"]
node_notebook(("Notebook user"))

node_sensor -->|"provides readings"| node_esp32
node_esp32 -->|"publishes MQTT"| node_broker
node_node_red -->|"subscribes to topic"| node_broker
node_broker -->|"matches subscriptions"| node_topic_matching
node_topic_matching -->|"routes publication"| node_node_red
node_node_red -->|"visualizes data"| node_dashboard
node_notebook -->|"accesses"| node_dashboard
node_lesson -->|"links to"| node_questions

click node_lesson "https://github.com/agodoi/m04-semana05/blob/main/README.md"
click node_questions "https://github.com/agodoi/m04-semana05/blob/main/perguntas.md"
click node_topic_matching "https://github.com/agodoi/m04-semana05/blob/main/README.md"

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_lesson,node_questions,node_dashboard,node_notebook toneBlue
class node_esp32 toneAmber
class node_broker,node_topic_matching,node_node_red toneMint
class node_sensor toneIndigo
```

## Components

### Learning materials

- [MQTT lesson](https://github.com/agodoi/m04-semana05/blob/main/README.md): `README.md`
- [Group questions](https://github.com/agodoi/m04-semana05/blob/main/perguntas.md): `perguntas.md`

### IoT endpoints

- **ESP32 publisher**

### Local infrastructure

- **Mosquitto broker**
- [Topic matching](https://github.com/agodoi/m04-semana05/blob/main/README.md): `README.md`
- **Node-RED subscriber**

### Other components

- **Sensor**
- **Browser dashboard**
- **Notebook user**

## Connections

- Sensor → ESP32 publisher: provides readings (evidence: `README.md`)
- ESP32 publisher → Mosquitto broker: publishes MQTT (evidence: `README.md`)
- Node-RED subscriber → Mosquitto broker: subscribes to topic (evidence: `README.md`)
- Mosquitto broker → Topic matching: matches subscriptions (evidence: `README.md`)
- Topic matching → Node-RED subscriber: routes publication (evidence: `README.md`)
- Node-RED subscriber → Browser dashboard: visualizes data (evidence: `README.md`)
- Notebook user → Browser dashboard: accesses (evidence: `README.md`)
- MQTT lesson → Group questions: links to (evidence: `README.md`)
