# vuanhduc201005-svg/esp32 architecture

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

- Interactive diagram: https://gitdiagram.com/vuanhduc201005-svg/esp32
- Repository: https://github.com/vuanhduc201005-svg/esp32

## Overview

This repository implements a temperature-monitoring fish-feeder controller: a web interface requests status or submits an open/close action, while ESP32 firmware reports temperature and door state and receives pending actions. The Spring controller holds the latest values and pending command in memory; the application entry point starts Spring Boot. The controller excerpt documents the web and device HTTP interactions, but the web page and firmware were not sampled, so their internal behavior and any additional capabilities cannot be verified.

Main entry points: [`fishfeeder/src/main/java/com/dducwsjvbe/fishfeeder/controller/DeviceController.java`](https://github.com/vuanhduc201005-svg/esp32/blob/main/fishfeeder/src/main/java/com/dducwsjvbe/fishfeeder/controller/DeviceController.java) (Device API and state), [`fishfeeder/src/main/resources/static/index.html`](https://github.com/vuanhduc201005-svg/esp32/blob/main/fishfeeder/src/main/resources/static/index.html) (Web interface), [`esp32/esp32.ino`](https://github.com/vuanhduc201005-svg/esp32/blob/main/esp32/esp32.ino) (ESP32 firmware)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_web_ui["Web interface<br/>[index.html]"]
end

subgraph group_service["Backend service"]
  node_app["Spring application"]
  node_api_state["Device API and state"]
end

subgraph group_device["ESP32 device"]
  node_device["ESP32 firmware<br/>[esp32.ino]"]
end

node_browser(("User browser"))

node_browser -.->|"uses"| node_web_ui
node_web_ui -->|"requests status"| node_api_state
node_web_ui -->|"submits action"| node_api_state
node_device -->|"reports telemetry"| node_api_state
node_api_state -->|"returns action"| node_device

click node_web_ui "https://github.com/vuanhduc201005-svg/esp32/blob/main/fishfeeder/src/main/resources/static/index.html"
click node_device "https://github.com/vuanhduc201005-svg/esp32/blob/main/esp32/esp32.ino"
click node_app "https://github.com/vuanhduc201005-svg/esp32/blob/main/fishfeeder/src/main/java/com/dducwsjvbe/fishfeeder/FishfeederApplication.java"
click node_api_state "https://github.com/vuanhduc201005-svg/esp32/blob/main/fishfeeder/src/main/java/com/dducwsjvbe/fishfeeder/controller/DeviceController.java"

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_web_ui,node_browser toneBlue
class node_app,node_api_state toneAmber
class node_device toneMint
```

## Components

### Web interface

- [Web interface](https://github.com/vuanhduc201005-svg/esp32/blob/main/fishfeeder/src/main/resources/static/index.html): `fishfeeder/src/main/resources/static/index.html`

### Backend service

- [Spring application](https://github.com/vuanhduc201005-svg/esp32/blob/main/fishfeeder/src/main/java/com/dducwsjvbe/fishfeeder/FishfeederApplication.java): `fishfeeder/src/main/java/com/dducwsjvbe/fishfeeder/FishfeederApplication.java`
- [Device API and state](https://github.com/vuanhduc201005-svg/esp32/blob/main/fishfeeder/src/main/java/com/dducwsjvbe/fishfeeder/controller/DeviceController.java): `fishfeeder/src/main/java/com/dducwsjvbe/fishfeeder/controller/DeviceController.java`

### ESP32 device

- [ESP32 firmware](https://github.com/vuanhduc201005-svg/esp32/blob/main/esp32/esp32.ino): `esp32/esp32.ino`

### Other components

- **User browser**

## Connections

- User browser → Web interface: uses
- Web interface → Device API and state: requests status (evidence: `fishfeeder/src/main/java/com/dducwsjvbe/fishfeeder/controller/DeviceController.java`)
- Web interface → Device API and state: submits action (evidence: `fishfeeder/src/main/java/com/dducwsjvbe/fishfeeder/controller/DeviceController.java`)
- ESP32 firmware → Device API and state: reports telemetry (evidence: `fishfeeder/src/main/java/com/dducwsjvbe/fishfeeder/controller/DeviceController.java`)
- Device API and state → ESP32 firmware: returns action (evidence: `fishfeeder/src/main/java/com/dducwsjvbe/fishfeeder/controller/DeviceController.java`)
