# aless725/laboratotio-devops architecture

> Architecture diagram of the GitHub repository aless725/laboratotio-devops, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aless725/laboratotio-devops
- Repository: https://github.com/aless725/laboratotio-devops

## Overview

This IoT greenhouse-lighting PoC simulates readings, sends them through an MQTT broker, and displays them in a live web dashboard with a critical-reading alert. The principal flow is simulated sensor → broker → dashboard processing → visual display/alert. The dashboard’s connection, subscription, rendering, and threshold logic are shown in source; broker deployment and the dashboard’s documented purpose are described in the README. Other deployment details were not inspected.

Main entry points: [`dashboard/js/app.js`](https://github.com/aless725/laboratotio-devops/blob/main/dashboard/js/app.js) (Dashboard MQTT client), [`docker-compose.yml`](https://github.com/aless725/laboratotio-devops/blob/main/docker-compose.yml) (MQTT broker), [`dashboard/index.html`](https://github.com/aless725/laboratotio-devops/blob/main/dashboard/index.html) (Live light display), [`simulador/sensor.js`](https://github.com/aless725/laboratotio-devops/blob/main/simulador/sensor.js) (Simulated sensor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensing["Sensing"]
  node_sensor["Simulated sensor<br/>[sensor.js]"]
end

subgraph group_messaging["Messaging"]
  node_broker[("MQTT broker<br/>[docker-compose.yml]")]
end

subgraph group_dashboard["Dashboard"]
  node_mqtt_client["Dashboard MQTT client<br/>[app.js]"]
  node_display["Live light display<br/>[index.html]"]
  node_alert["Critical alert rule<br/>[app.js]"]
end

node_viewer(("Dashboard viewer"))

node_sensor -->|"publishes readings"| node_broker
node_mqtt_client -->|"subscribes to topic"| node_broker
node_broker -->|"delivers messages"| node_mqtt_client
node_mqtt_client -->|"updates display"| node_display
node_mqtt_client -->|"checks threshold"| node_alert
node_display -->|"shows readings"| node_viewer
node_alert -->|"signals critical state"| node_viewer

click node_sensor "https://github.com/aless725/laboratotio-devops/blob/main/simulador/sensor.js"
click node_broker "https://github.com/aless725/laboratotio-devops/blob/main/docker-compose.yml"
click node_mqtt_client "https://github.com/aless725/laboratotio-devops/blob/main/dashboard/js/app.js"
click node_display "https://github.com/aless725/laboratotio-devops/blob/main/dashboard/index.html"
click node_alert "https://github.com/aless725/laboratotio-devops/blob/main/dashboard/js/app.js"

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_sensor,node_viewer toneBlue
class node_broker toneAmber
class node_mqtt_client,node_display,node_alert toneMint
```

## Components

### Sensing

- [Simulated sensor](https://github.com/aless725/laboratotio-devops/blob/main/simulador/sensor.js): `simulador/sensor.js`

### Messaging

- [MQTT broker](https://github.com/aless725/laboratotio-devops/blob/main/docker-compose.yml): `docker-compose.yml`

### Dashboard

- [Dashboard MQTT client](https://github.com/aless725/laboratotio-devops/blob/main/dashboard/js/app.js): `dashboard/js/app.js`
- [Live light display](https://github.com/aless725/laboratotio-devops/blob/main/dashboard/index.html): `dashboard/index.html`
- [Critical alert rule](https://github.com/aless725/laboratotio-devops/blob/main/dashboard/js/app.js): `dashboard/js/app.js`

### Other components

- **Dashboard viewer**

## Connections

- Simulated sensor → MQTT broker: publishes readings (evidence: `simulador/sensor.js`)
- Dashboard MQTT client → MQTT broker: subscribes to topic (evidence: `dashboard/js/app.js`)
- MQTT broker → Dashboard MQTT client: delivers messages (evidence: `dashboard/js/app.js`)
- Dashboard MQTT client → Live light display: updates display (evidence: `dashboard/js/app.js`)
- Dashboard MQTT client → Critical alert rule: checks threshold (evidence: `dashboard/js/app.js`)
- Live light display → Dashboard viewer: shows readings (evidence: `README.md`)
- Critical alert rule → Dashboard viewer: signals critical state (evidence: `README.md`)
