# setyawan-dev/gentadash architecture

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

- Interactive diagram: https://gitdiagram.com/setyawan-dev/gentadash
- Repository: https://github.com/setyawan-dev/gentadash

## Overview

GentaAlert is a browser-based GentaDash dashboard for monitoring a connected agricultural site and controlling its hardware. The main workflow is viewing live telemetry and threat status, then sending commands to the device; the app also presents crop-age, weather, and notification features. The runtime is concentrated in one large JavaScript file, so its distinct responsibilities are represented as components sharing that path. The excerpts show MQTT message handling and some UI updates, but do not establish the page’s full wiring, logging destination, or Google Sheets integration.

Main entry points: [`js/app.js`](https://github.com/setyawan-dev/gentadash/blob/main/js/app.js) (Dashboard UI), [`index.html`](https://github.com/setyawan-dev/gentadash/blob/main/index.html) (Dashboard page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Dashboard interface"]
  node_page["Dashboard page<br/>[index.html]"]
  node_dashboard["Dashboard UI<br/>[app.js]"]
  node_navigation["Navigation and theme<br/>[app.js]"]
  node_alerts["Dialogs and toasts<br/>[app.js]"]
end

subgraph group_monitoring["Monitoring and alerts"]
  node_telemetry["Telemetry display<br/>[app.js]"]
  node_defense["Threat status<br/>[app.js]"]
  node_weather["Weather display<br/>[app.js]"]
  node_crop["Crop age<br/>[app.js]"]
end

subgraph group_control["Device control"]
  node_mqtt["MQTT client<br/>[app.js]"]
  node_actuators["Manual controls<br/>[app.js]"]
end

node_user(("Operator"))
node_device{{"Genta device"}}

node_user -.->|"uses"| node_page
node_page -.->|"hosts"| node_dashboard
node_dashboard -->|"updates"| node_telemetry
node_dashboard -->|"updates"| node_defense
node_dashboard -->|"updates"| node_weather
node_dashboard -->|"updates"| node_crop
node_dashboard -->|"configures"| node_navigation
node_dashboard -->|"shows"| node_alerts
node_dashboard -->|"sends messages"| node_mqtt
node_actuators -->|"sends commands"| node_mqtt
node_mqtt -.->|"communicates"| node_device

click node_page "https://github.com/setyawan-dev/gentadash/blob/main/index.html"
click node_dashboard "https://github.com/setyawan-dev/gentadash/blob/main/js/app.js"
click node_navigation "https://github.com/setyawan-dev/gentadash/blob/main/js/app.js"
click node_alerts "https://github.com/setyawan-dev/gentadash/blob/main/js/app.js"
click node_telemetry "https://github.com/setyawan-dev/gentadash/blob/main/js/app.js"
click node_defense "https://github.com/setyawan-dev/gentadash/blob/main/js/app.js"
click node_weather "https://github.com/setyawan-dev/gentadash/blob/main/js/app.js"
click node_crop "https://github.com/setyawan-dev/gentadash/blob/main/js/app.js"
click node_mqtt "https://github.com/setyawan-dev/gentadash/blob/main/js/app.js"
click node_actuators "https://github.com/setyawan-dev/gentadash/blob/main/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_page,node_dashboard,node_navigation,node_alerts toneBlue
class node_telemetry,node_defense,node_weather,node_crop toneAmber
class node_mqtt,node_actuators toneMint
class node_user,node_device toneIndigo
```

## Components

### Dashboard interface

- [Dashboard page](https://github.com/setyawan-dev/gentadash/blob/main/index.html): `index.html`
- [Dashboard UI](https://github.com/setyawan-dev/gentadash/blob/main/js/app.js): `js/app.js`
- [Navigation and theme](https://github.com/setyawan-dev/gentadash/blob/main/js/app.js): `js/app.js`
- [Dialogs and toasts](https://github.com/setyawan-dev/gentadash/blob/main/js/app.js): `js/app.js`

### Monitoring and alerts

- [Telemetry display](https://github.com/setyawan-dev/gentadash/blob/main/js/app.js): `js/app.js`
- [Threat status](https://github.com/setyawan-dev/gentadash/blob/main/js/app.js): `js/app.js`
- [Weather display](https://github.com/setyawan-dev/gentadash/blob/main/js/app.js): `js/app.js`
- [Crop age](https://github.com/setyawan-dev/gentadash/blob/main/js/app.js): `js/app.js`

### Device control

- [MQTT client](https://github.com/setyawan-dev/gentadash/blob/main/js/app.js): `js/app.js`
- [Manual controls](https://github.com/setyawan-dev/gentadash/blob/main/js/app.js): `js/app.js`

### Other components

- **Operator**
- **Genta device**

## Connections

- Operator → Dashboard page: uses
- Dashboard page → Dashboard UI: hosts
- Dashboard UI → Telemetry display: updates (evidence: `js/app.js`)
- Dashboard UI → Threat status: updates (evidence: `js/app.js`)
- Dashboard UI → Weather display: updates (evidence: `js/app.js`)
- Dashboard UI → Crop age: updates (evidence: `js/app.js`)
- Dashboard UI → Navigation and theme: configures (evidence: `js/app.js`)
- Dashboard UI → Dialogs and toasts: shows (evidence: `js/app.js`)
- Dashboard UI → MQTT client: sends messages (evidence: `js/app.js`)
- Manual controls → MQTT client: sends commands (evidence: `js/app.js`)
- MQTT client → Genta device: communicates
