# mandavavasanth/smart-botanix architecture

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

- Interactive diagram: https://gitdiagram.com/mandavavasanth/smart-botanix
- Repository: https://github.com/mandavavasanth/smart-botanix

## Overview

Smart Botanix is an ESP32-based autonomous plant-care system. Its workflow reads temperature and humidity, soil moisture, and ambient light; applies threshold-based irrigation and lighting rules; then drives active-low relays and presents telemetry on a rotating LCD. The diagram separates sensing, control, and local outputs. Only the README was provided as evidence; the Arduino source file is listed but no source excerpts are available, so the internal links shown reflect documented behavior rather than inspected calls.

Main entry points: [`Smart-BotaniX_ArduinoCode.txt`](https://github.com/mandavavasanth/smart-botanix/blob/main/Smart-BotaniX_ArduinoCode.txt) (ESP32 firmware)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensing["Environmental sensing"]
  node_dht(("DHT11 sensor"))
  node_soil(("Soil sensor"))
  node_ldr(("LDR sensor"))
end

subgraph group_control["ESP32 control"]
  node_firmware["ESP32 firmware"]
  node_irrigation["Irrigation logic"]
  node_lighting["Lighting logic"]
end

subgraph group_outputs["Actuation and display"]
  node_lcd["LCD interface"]
  node_relay["Active-low relays"]
  node_pump["Water pump"]
  node_growlight["Grow light"]
end

node_dht -->|"reports readings"| node_firmware
node_soil -->|"reports moisture"| node_firmware
node_ldr -->|"reports light"| node_firmware
node_firmware -->|"checks thresholds"| node_irrigation
node_firmware -->|"checks darkness"| node_lighting
node_firmware -->|"updates screens"| node_lcd
node_irrigation -->|"sets motor relay"| node_relay
node_lighting -->|"sets light relay"| node_relay
node_relay -->|"switches power"| node_pump
node_relay -->|"switches power"| node_growlight

click node_firmware "https://github.com/mandavavasanth/smart-botanix/blob/main/Smart-BotaniX_ArduinoCode.txt"
click node_irrigation "https://github.com/mandavavasanth/smart-botanix/blob/main/Smart-BotaniX_ArduinoCode.txt"
click node_lighting "https://github.com/mandavavasanth/smart-botanix/blob/main/Smart-BotaniX_ArduinoCode.txt"
click node_lcd "https://github.com/mandavavasanth/smart-botanix/blob/main/Smart-BotaniX_ArduinoCode.txt"
click node_relay "https://github.com/mandavavasanth/smart-botanix/blob/main/Smart-BotaniX_ArduinoCode.txt"

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_dht,node_soil,node_ldr toneBlue
class node_firmware,node_irrigation,node_lighting toneAmber
class node_lcd,node_relay,node_pump,node_growlight toneMint
```

## Components

### Environmental sensing

- **DHT11 sensor**
- **Soil sensor**
- **LDR sensor**

### ESP32 control

- [ESP32 firmware](https://github.com/mandavavasanth/smart-botanix/blob/main/Smart-BotaniX_ArduinoCode.txt): `Smart-BotaniX_ArduinoCode.txt`
- [Irrigation logic](https://github.com/mandavavasanth/smart-botanix/blob/main/Smart-BotaniX_ArduinoCode.txt): `Smart-BotaniX_ArduinoCode.txt`
- [Lighting logic](https://github.com/mandavavasanth/smart-botanix/blob/main/Smart-BotaniX_ArduinoCode.txt): `Smart-BotaniX_ArduinoCode.txt`

### Actuation and display

- [LCD interface](https://github.com/mandavavasanth/smart-botanix/blob/main/Smart-BotaniX_ArduinoCode.txt): `Smart-BotaniX_ArduinoCode.txt`
- [Active-low relays](https://github.com/mandavavasanth/smart-botanix/blob/main/Smart-BotaniX_ArduinoCode.txt): `Smart-BotaniX_ArduinoCode.txt`
- **Water pump**
- **Grow light**

## Connections

- DHT11 sensor → ESP32 firmware: reports readings (evidence: `README.md`)
- Soil sensor → ESP32 firmware: reports moisture (evidence: `README.md`)
- LDR sensor → ESP32 firmware: reports light (evidence: `README.md`)
- ESP32 firmware → Irrigation logic: checks thresholds (evidence: `README.md`)
- ESP32 firmware → Lighting logic: checks darkness (evidence: `README.md`)
- ESP32 firmware → LCD interface: updates screens (evidence: `README.md`)
- Irrigation logic → Active-low relays: sets motor relay (evidence: `README.md`)
- Lighting logic → Active-low relays: sets light relay (evidence: `README.md`)
- Active-low relays → Water pump: switches power (evidence: `README.md`)
- Active-low relays → Grow light: switches power (evidence: `README.md`)
