# trastejantedu/jarwis architecture

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

- Interactive diagram: https://gitdiagram.com/trastejantedu/jarwis
- Repository: https://github.com/trastejantedu/jarwis

## Overview

Jarwis is a low-cost, Wi-Fi home-monitoring and control system built around NodeMCU modules and a Raspberry Pi. Its main flow is environmental sensing on a module, transmission over Wi-Fi/HTTP, server-side recording, and web-based monitoring of readings. The repository also contains firmware for device control, a garden-monitoring system, and related circuit and enclosure designs. The README identifies humidity, temperature, and light as monitored parameters; some subsystem wiring is inferred only from filenames because their source was not sampled.

Main entry points: [`Modulos/Firmware/moduloFriday/sensores.h`](https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/moduloFriday/sensores.h) (Sensor module), [`Modulos/Firmware/moduloFriday/moduloFriday.ino`](https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/moduloFriday/moduloFriday.ino) (Friday module), [`Modulos/Firmware/GardenGuardian/gardenGuardian/gardenGuardian.ino`](https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/GardenGuardian/gardenGuardian/gardenGuardian.ino) (Garden Guardian), [`Modulos/Firmware/moduloFriday/web.h`](https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/moduloFriday/web.h) (Module web control)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_devices["Device Firmware"]
  node_sensors["Sensor module<br/>[sensores.h]"]
  node_friday["Friday module<br/>[moduloFriday.ino]"]
  node_sensorac["AC sensor<br/>[sensorAC.ino]"]
  node_garden["Garden Guardian<br/>[gardenGuardian.ino]"]
  node_garden_slave["Garden slave<br/>[slave.ino]"]
  node_switch["Switch module"]
  node_module_web["Module web control<br/>[web.h]"]
end

subgraph group_transport["Network Transport"]
  node_wifi["Wi-Fi setup<br/>[conexion.h]"]
  node_sender["Reading sender<br/>[saveData.h]"]
end

subgraph group_server["Server Monitoring"]
  node_ingest["Reading intake<br/>[registrador.php]"]
  node_database[("Reading database")]
  node_dashboard["Monitoring pages<br/>[datos.php]"]
  node_module_list["Module overview<br/>[index.php]"]
  node_materials["Materials listing<br/>[materiales.php]"]
end

subgraph group_designs["Hardware Designs"]
  node_pcb["Circuit designs"]
  node_enclosures["Module enclosures"]
end

node_operator(("Home user"))
node_ambient(("Environment"))
node_http{{"HTTP service"}}

node_ambient -->|"provides conditions"| node_sensors
node_sensors -->|"supplies readings"| node_friday
node_friday -->|"sends readings"| node_sender
node_sender -->|"HTTP GET"| node_http
node_http -->|"delivers request"| node_ingest
node_ingest -->|"records readings"| node_database
node_dashboard -->|"queries readings"| node_database
node_module_list -->|"queries modules"| node_database
node_operator -->|"views readings"| node_dashboard
node_operator -->|"views modules"| node_module_list
node_operator -->|"views materials"| node_materials
node_wifi -->|"connects device"| node_http
node_operator -->|"controls module"| node_module_web
node_module_web -->|"dispatches control"| node_switch
node_operator -->|"monitors garden"| node_garden
node_garden -->|"coordinates"| node_garden_slave

click node_sensors "https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/moduloFriday/sensores.h"
click node_friday "https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/moduloFriday/moduloFriday.ino"
click node_sensorac "https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/sensorAC/sensorAC.ino"
click node_garden "https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/GardenGuardian/gardenGuardian/gardenGuardian.ino"
click node_garden_slave "https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/GardenGuardian/slave/slave.ino"
click node_switch "https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/moduloInterruptor/moduloInterruptor.ino"
click node_module_web "https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/moduloFriday/web.h"
click node_wifi "https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/moduloInterruptor/conexion.h"
click node_sender "https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/Exterior_Jarvis/saveData.h"
click node_ingest "https://github.com/trastejantedu/jarwis/blob/master/Servidor/registrador.php"
click node_dashboard "https://github.com/trastejantedu/jarwis/blob/master/Servidor/datos.php"
click node_module_list "https://github.com/trastejantedu/jarwis/blob/master/Servidor/var/www/html/FRIDAY/index.php"
click node_materials "https://github.com/trastejantedu/jarwis/blob/master/Servidor/materiales.php"
click node_pcb "https://github.com/trastejantedu/jarwis/blob/master/Hardware/Garden_Guardian_Little/Garden_Guardian.kicad_pcb"
click node_enclosures "https://github.com/trastejantedu/jarwis/tree/master/Modulos/Carcasas/ModulosJarvis"

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_friday,node_sensorac,node_garden,node_garden_slave,node_switch,node_module_web,node_operator toneBlue
class node_wifi,node_sender toneAmber
class node_ingest,node_database,node_dashboard,node_module_list,node_materials toneMint
class node_pcb,node_enclosures toneRose
class node_ambient,node_http toneIndigo
```

## Components

### Device Firmware

- [Sensor module](https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/moduloFriday/sensores.h): `Modulos/Firmware/moduloFriday/sensores.h`
- [Friday module](https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/moduloFriday/moduloFriday.ino): `Modulos/Firmware/moduloFriday/moduloFriday.ino`
- [AC sensor](https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/sensorAC/sensorAC.ino): `Modulos/Firmware/sensorAC/sensorAC.ino`
- [Garden Guardian](https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/GardenGuardian/gardenGuardian/gardenGuardian.ino): `Modulos/Firmware/GardenGuardian/gardenGuardian/gardenGuardian.ino`
- [Garden slave](https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/GardenGuardian/slave/slave.ino): `Modulos/Firmware/GardenGuardian/slave/slave.ino`
- [Switch module](https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/moduloInterruptor/moduloInterruptor.ino): `Modulos/Firmware/moduloInterruptor/moduloInterruptor.ino`
- [Module web control](https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/moduloFriday/web.h): `Modulos/Firmware/moduloFriday/web.h`

### Network Transport

- [Wi-Fi setup](https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/moduloInterruptor/conexion.h): `Modulos/Firmware/moduloInterruptor/conexion.h`
- [Reading sender](https://github.com/trastejantedu/jarwis/blob/master/Modulos/Firmware/Exterior_Jarvis/saveData.h): `Modulos/Firmware/Exterior_Jarvis/saveData.h`

### Server Monitoring

- [Reading intake](https://github.com/trastejantedu/jarwis/blob/master/Servidor/registrador.php): `Servidor/registrador.php`
- **Reading database**
- [Monitoring pages](https://github.com/trastejantedu/jarwis/blob/master/Servidor/datos.php): `Servidor/datos.php`
- [Module overview](https://github.com/trastejantedu/jarwis/blob/master/Servidor/var/www/html/FRIDAY/index.php): `Servidor/var/www/html/FRIDAY/index.php`
- [Materials listing](https://github.com/trastejantedu/jarwis/blob/master/Servidor/materiales.php): `Servidor/materiales.php`

### Hardware Designs

- [Circuit designs](https://github.com/trastejantedu/jarwis/blob/master/Hardware/Garden_Guardian_Little/Garden_Guardian.kicad_pcb): `Hardware/Garden_Guardian_Little/Garden_Guardian.kicad_pcb`
- [Module enclosures](https://github.com/trastejantedu/jarwis/tree/master/Modulos/Carcasas/ModulosJarvis): `Modulos/Carcasas/ModulosJarvis`

### Other components

- **Home user**
- **Environment**
- **HTTP service**

## Connections

- Environment → Sensor module: provides conditions
- Sensor module → Friday module: supplies readings
- Friday module → Reading sender: sends readings
- Reading sender → HTTP service: HTTP GET
- HTTP service → Reading intake: delivers request
- Reading intake → Reading database: records readings
- Monitoring pages → Reading database: queries readings
- Module overview → Reading database: queries modules
- Home user → Monitoring pages: views readings
- Home user → Module overview: views modules
- Home user → Materials listing: views materials
- Wi-Fi setup → HTTP service: connects device
- Home user → Module web control: controls module
- Module web control → Switch module: dispatches control
- Home user → Garden Guardian: monitors garden
- Garden Guardian → Garden slave: coordinates
