# avnithin2005/solar-panel-tracking-system architecture

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

- Interactive diagram: https://gitdiagram.com/avnithin2005/solar-panel-tracking-system
- Repository: https://github.com/avnithin2005/solar-panel-tracking-system

## Overview

The repository describes two parallel product workflows: Arduino-based solar tracking and Wi-Fi relay switching. The README documents the components and their interactions, but no source excerpts are available, so the graph uses directory-level implementation nodes and only documented relationships. The README calls the relay controller an ESP8266, while its directory is named `code.ESP32`; that discrepancy is preserved rather than resolved.

Main entry points: [`code.ESP32`](https://github.com/avnithin2005/solar-panel-tracking-system/blob/main/code.ESP32) (Relay firmware), [`code.Arduino`](https://github.com/avnithin2005/solar-panel-tracking-system/blob/main/code.Arduino) (Tracking firmware)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_tracking["Solar tracking"]
  node_ldr["LDR sensors"]
  node_arduino["Tracking firmware<br/>[code.Arduino]"]
  node_motor["Motor and driver"]
end

subgraph group_relay["IoT relay control"]
  node_relay_firmware["Relay firmware<br/>[code.ESP32]"]
  node_wifi(("Wi-Fi network"))
  node_web_app["Web server or app"]
  node_relay["Relay and appliance"]
end

node_sun(("Sunlight"))
node_user(("Remote user"))

node_sun -->|"provides light"| node_ldr
node_ldr -->|"sends readings"| node_arduino
node_arduino -->|"moves panel"| node_motor
node_user -->|"requests switching"| node_web_app
node_web_app -->|"controls remotely"| node_relay_firmware
node_relay_firmware -->|"connects to"| node_wifi
node_relay_firmware -->|"switches"| node_relay

click node_arduino "https://github.com/avnithin2005/solar-panel-tracking-system/blob/main/code.Arduino"
click node_relay_firmware "https://github.com/avnithin2005/solar-panel-tracking-system/blob/main/code.ESP32"

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_ldr,node_arduino,node_motor,node_user toneBlue
class node_relay_firmware,node_wifi,node_web_app,node_relay toneAmber
class node_sun toneIndigo
```

## Components

### Solar tracking

- **LDR sensors**
- [Tracking firmware](https://github.com/avnithin2005/solar-panel-tracking-system/blob/main/code.Arduino): `code.Arduino`
- **Motor and driver**

### IoT relay control

- [Relay firmware](https://github.com/avnithin2005/solar-panel-tracking-system/blob/main/code.ESP32): `code.ESP32`
- **Wi-Fi network**
- **Web server or app**
- **Relay and appliance**

### Other components

- **Sunlight**
- **Remote user**

## Connections

- Sunlight → LDR sensors: provides light (evidence: `README.md`)
- LDR sensors → Tracking firmware: sends readings (evidence: `README.md`)
- Tracking firmware → Motor and driver: moves panel (evidence: `README.md`)
- Remote user → Web server or app: requests switching (evidence: `README.md`)
- Web server or app → Relay firmware: controls remotely (evidence: `README.md`)
- Relay firmware → Wi-Fi network: connects to (evidence: `README.md`)
- Relay firmware → Relay and appliance: switches (evidence: `README.md`)
