# jomendietad/esp32-s3-emulated-dvp-camera-reading architecture

> Architecture diagram of the GitHub repository jomendietad/esp32-s3-emulated-dvp-camera-reading, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jomendietad/esp32-s3-emulated-dvp-camera-reading
- Repository: https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading

## Overview

This ESP32-S3 firmware receives RGB565 video over TCP, processes frames for facial recognition, and uses PIR presence to validate access. Its principal runtime orchestrator initializes network and hardware services, then reads frames, invokes vision processing, and updates the protected web monitor. The README also documents persistent face templates and LED status feedback. Several internal CV and web details were not excerpted, so those relationships are included only where the README supports them; the reset callback invocation remains unverified.

Main entry points: [`main/app_dvp.c`](https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/app_dvp.c) (Stream orchestrator), [`main/app_cv.c`](https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/app_cv.c) (Face recognition), [`main/bsp_web.c`](https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_web.c) (Protected web monitor), [`main/bsp_tcp.c`](https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_tcp.c) (TCP frame input)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtime"]
  node_startup["Firmware startup<br/>[main.c]"]
  node_orchestrator["Stream orchestrator<br/>[app_dvp.c]"]
end

subgraph group_network["Network services"]
  node_tcp_ingest["TCP frame input<br/>[bsp_tcp.c]"]
  node_wifi["Wi-Fi connectivity<br/>[bsp_wifi.c]"]
  node_web["Protected web monitor<br/>[bsp_web.c]"]
end

subgraph group_vision["Biometric access"]
  node_vision["Face recognition<br/>[app_cv.c]"]
end

subgraph group_board["Board services"]
  node_presence["PIR presence check<br/>[bsp_pir.c]"]
  node_templates[("Face templates<br/>[bsp_storage.c]")]
  node_status_led["Access status LED<br/>[bsp_led.c]"]
  node_psram["Frame buffer memory<br/>[bsp_system.c]"]
  node_system["System services<br/>[bsp_system.c]"]
end

node_video_source(("Video station"))
node_browser(("Web operator"))

node_startup -->|"starts"| node_orchestrator
node_orchestrator -->|"initializes and checks"| node_wifi
node_orchestrator -->|"initializes"| node_web
node_orchestrator -->|"initializes and reads"| node_presence
node_orchestrator -->|"initializes"| node_status_led
node_orchestrator -->|"allocates buffer"| node_psram
node_video_source -->|"sends video"| node_tcp_ingest
node_orchestrator -->|"connects and reads"| node_tcp_ingest
node_orchestrator -->|"processes frames"| node_vision
node_orchestrator -->|"updates stream"| node_web
node_browser -->|"views and controls"| node_web
node_web -.->|"reset callback"| node_vision
node_vision -->|"loads and saves"| node_templates
node_vision -->|"validates presence"| node_presence
node_vision -->|"signals access state"| node_status_led

click node_startup "https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/main.c"
click node_orchestrator "https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/app_dvp.c"
click node_tcp_ingest "https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_tcp.c"
click node_wifi "https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_wifi.c"
click node_web "https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_web.c"
click node_vision "https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/app_cv.c"
click node_presence "https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_pir.c"
click node_templates "https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_storage.c"
click node_status_led "https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_led.c"
click node_psram "https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_system.c"
click node_system "https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_system.c"

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_startup,node_orchestrator toneBlue
class node_tcp_ingest,node_wifi,node_web toneAmber
class node_vision toneMint
class node_presence,node_templates,node_status_led,node_psram,node_system toneRose
class node_video_source,node_browser toneIndigo
```

## Components

### Application runtime

- [Firmware startup](https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/main.c): `main/main.c`
- [Stream orchestrator](https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/app_dvp.c): `main/app_dvp.c`

### Network services

- [TCP frame input](https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_tcp.c): `main/bsp_tcp.c`
- [Wi-Fi connectivity](https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_wifi.c): `main/bsp_wifi.c`
- [Protected web monitor](https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_web.c): `main/bsp_web.c`

### Biometric access

- [Face recognition](https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/app_cv.c): `main/app_cv.c`

### Board services

- [PIR presence check](https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_pir.c): `main/bsp_pir.c`
- [Face templates](https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_storage.c): `main/bsp_storage.c`
- [Access status LED](https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_led.c): `main/bsp_led.c`
- [Frame buffer memory](https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_system.c): `main/bsp_system.c`
- [System services](https://github.com/jomendietad/esp32-s3-emulated-dvp-camera-reading/blob/main/main/bsp_system.c): `main/bsp_system.c`

### Other components

- **Video station**
- **Web operator**

## Connections

- Firmware startup → Stream orchestrator: starts (evidence: `README.md`)
- Stream orchestrator → Wi-Fi connectivity: initializes and checks (evidence: `main/app_dvp.c`)
- Stream orchestrator → Protected web monitor: initializes (evidence: `main/app_dvp.c`)
- Stream orchestrator → PIR presence check: initializes and reads (evidence: `main/app_dvp.c`)
- Stream orchestrator → Access status LED: initializes (evidence: `main/app_dvp.c`)
- Stream orchestrator → Frame buffer memory: allocates buffer (evidence: `main/app_dvp.c`)
- Video station → TCP frame input: sends video (evidence: `README.md`)
- Stream orchestrator → TCP frame input: connects and reads (evidence: `main/app_dvp.c`)
- Stream orchestrator → Face recognition: processes frames (evidence: `main/app_dvp.c`)
- Stream orchestrator → Protected web monitor: updates stream (evidence: `main/app_dvp.c`)
- Web operator → Protected web monitor: views and controls (evidence: `README.md`)
- Protected web monitor → Face recognition: reset callback
- Face recognition → Face templates: loads and saves (evidence: `README.md`)
- Face recognition → PIR presence check: validates presence (evidence: `README.md`)
- Face recognition → Access status LED: signals access state (evidence: `README.md`)
