# hackingstan/smart_wifi_photo_frame architecture

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

- Interactive diagram: https://gitdiagram.com/hackingstan/smart_wifi_photo_frame
- Repository: https://github.com/hackingstan/smart_wifi_photo_frame

## Overview

This is a single-sketch ESP8266 photo-frame application. A user connects a phone or PC browser to the frame’s WiFi web app, uploads a photo, and can adjust display brightness. The browser resizes images to 240×320 before upload; the frame stores uploaded images on the SD card and uses JPEGDEC to render them on the TFT. The brightness slider controls display PWM. The README documents these capabilities, but no source excerpts were provided, so the graph does not assert internal handler or call structure beyond those documented relationships.

Main entry points: [`SMARTFRAMEWITHWIFI.ino`](https://github.com/hackingstan/smart_wifi_photo_frame/blob/main/SMARTFRAMEWITHWIFI.ino) (Photo upload)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Web interaction"]
  node_wifi["WiFi access point"]
  node_webapp["Smart web app"]
end

subgraph group_images["Image handling"]
  node_resizer["Canvas image resize"]
  node_upload["Photo upload"]
  node_sdcard[("MicroSD card")]
end

subgraph group_display["Display output"]
  node_jpegdec["JPEG decoding"]
  node_tft["ST7789 display"]
  node_brightness["Brightness PWM"]
end

node_user(("Photo user"))
node_browser["Phone / PC browser"]

node_user -->|"uses"| node_browser
node_browser -->|"connects to"| node_wifi
node_wifi -->|"provides"| node_webapp
node_browser -->|"accesses"| node_webapp
node_browser -->|"resizes image"| node_resizer
node_resizer -->|"prepares for"| node_upload
node_browser -->|"uploads photo"| node_upload
node_upload -->|"stores image"| node_sdcard
node_sdcard -->|"provides image"| node_jpegdec
node_jpegdec -->|"renders image"| node_tft
node_browser -->|"sets brightness"| node_brightness
node_brightness -->|"controls PWM"| node_tft

click node_wifi "https://github.com/hackingstan/smart_wifi_photo_frame/blob/main/SMARTFRAMEWITHWIFI.ino"
click node_webapp "https://github.com/hackingstan/smart_wifi_photo_frame/blob/main/SMARTFRAMEWITHWIFI.ino"
click node_resizer "https://github.com/hackingstan/smart_wifi_photo_frame/blob/main/SMARTFRAMEWITHWIFI.ino"
click node_upload "https://github.com/hackingstan/smart_wifi_photo_frame/blob/main/SMARTFRAMEWITHWIFI.ino"
click node_jpegdec "https://github.com/hackingstan/smart_wifi_photo_frame/blob/main/SMARTFRAMEWITHWIFI.ino"
click node_brightness "https://github.com/hackingstan/smart_wifi_photo_frame/blob/main/SMARTFRAMEWITHWIFI.ino"

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_wifi,node_webapp,node_user,node_browser toneBlue
class node_resizer,node_upload,node_sdcard toneAmber
class node_jpegdec,node_tft,node_brightness toneMint
```

## Components

### Web interaction

- [WiFi access point](https://github.com/hackingstan/smart_wifi_photo_frame/blob/main/SMARTFRAMEWITHWIFI.ino): `SMARTFRAMEWITHWIFI.ino`
- [Smart web app](https://github.com/hackingstan/smart_wifi_photo_frame/blob/main/SMARTFRAMEWITHWIFI.ino): `SMARTFRAMEWITHWIFI.ino`

### Image handling

- [Canvas image resize](https://github.com/hackingstan/smart_wifi_photo_frame/blob/main/SMARTFRAMEWITHWIFI.ino): `SMARTFRAMEWITHWIFI.ino`
- [Photo upload](https://github.com/hackingstan/smart_wifi_photo_frame/blob/main/SMARTFRAMEWITHWIFI.ino): `SMARTFRAMEWITHWIFI.ino`
- **MicroSD card**

### Display output

- [JPEG decoding](https://github.com/hackingstan/smart_wifi_photo_frame/blob/main/SMARTFRAMEWITHWIFI.ino): `SMARTFRAMEWITHWIFI.ino`
- **ST7789 display**
- [Brightness PWM](https://github.com/hackingstan/smart_wifi_photo_frame/blob/main/SMARTFRAMEWITHWIFI.ino): `SMARTFRAMEWITHWIFI.ino`

### Other components

- **Photo user**
- **Phone / PC browser**

## Connections

- Photo user → Phone / PC browser: uses (evidence: `README.md`)
- Phone / PC browser → WiFi access point: connects to (evidence: `README.md`)
- WiFi access point → Smart web app: provides (evidence: `README.md`)
- Phone / PC browser → Smart web app: accesses (evidence: `README.md`)
- Phone / PC browser → Canvas image resize: resizes image (evidence: `README.md`)
- Canvas image resize → Photo upload: prepares for (evidence: `README.md`)
- Phone / PC browser → Photo upload: uploads photo (evidence: `README.md`)
- Photo upload → MicroSD card: stores image (evidence: `README.md`)
- MicroSD card → JPEG decoding: provides image (evidence: `README.md`)
- JPEG decoding → ST7789 display: renders image (evidence: `README.md`)
- Phone / PC browser → Brightness PWM: sets brightness (evidence: `README.md`)
- Brightness PWM → ST7789 display: controls PWM (evidence: `README.md`)
