# chromeuniverse/esp32-rgb architecture

> Architecture diagram of the GitHub repository chromeuniverse/esp32-rgb, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chromeuniverse/esp32-rgb
- Repository: https://github.com/chromeuniverse/esp32-rgb

## Overview

##### Project type and purpose
- This is an IoT-style embedded + mobile application.
- Purpose: let a user control an RGB LED strip (or individual RGB LED) wired to an ESP32 over a local Wi-Fi network, via a custom Android app built with MIT App Inventor (the .aia file).

##### File structure
- Top level:
- ESP32_Wi_Fi_Test.aia   → the MIT AI2 Android App project
- esp32_rgb.ino          → Arduino sketch for ESP32 (web server + LED control)
- README.md              → overview and usage notes
- No additional folders: the project separates cleanly into two components (mobile app and firmware).

##### README for additional insights
- Confirms “ESP web server code” and “MIT AI2 App project file” versioning.
- No database, cloud service, or multi-service architecture—just a local Wi-Fi link.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% UI Layer
    subgraph "UI Layer"
        AndroidApp["Android App<br/>(MIT AI2)"]:::ui
    end

    %% Network Layer
    subgraph "Network Layer"
        Router["Wi-Fi Router / AP"]:::network
    end

    %% Embedded Layer
    subgraph "Embedded Layer"
        ESP32["ESP32 Web Server<br/>(esp32_rgb.ino)"]:::embedded
    end

    %% Hardware Layer
    subgraph "Hardware Layer"
        LED["RGB LED<br/>(GPIO PWM)"]:::hardware
    end

    %% Documentation
    subgraph "Documentation"
        README["Project README"]:::doc
    end

    %% Connections
    AndroidApp -->|"HTTP GET/POST"| Router
    Router -->|"Forward HTTP"| ESP32
    ESP32 -->|"Parse commands & set PWM"| LED
    ESP32 -->|"HTTP Response"| Router
    Router -->|"HTTP Response"| AndroidApp

    %% Click Events
    click AndroidApp "https://github.com/chromeuniverse/esp32-rgb/blob/master/ESP32_Wi_Fi_Test.aia"
    click ESP32 "https://github.com/chromeuniverse/esp32-rgb/blob/master/esp32_rgb.ino"
    click README "https://github.com/chromeuniverse/esp32-rgb/blob/master/README.md"

    %% Styles
    classDef ui fill:#ccf,stroke:#333,stroke-width:1px
    classDef network fill:#fc9,stroke:#333,stroke-width:1px
    classDef embedded fill:#cfc,stroke:#333,stroke-width:1px
    classDef hardware fill:#ddd,stroke:#333,stroke-width:1px
    classDef doc fill:#f9f,stroke:#333,stroke-width:1px
```
