# kleberasilva/projeto-integrador-ii architecture

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

- Interactive diagram: https://gitdiagram.com/kleberasilva/projeto-integrador-ii
- Repository: https://github.com/kleberasilva/projeto-integrador-ii

## Overview

This is an in-development proposal for an embedded driver-fatigue monitor, not a repository with implemented runtime code. Its principal workflow is local camera capture, facial-landmark and fatigue-indicator analysis, threshold detection, then a local alert and minimal text telemetry. The README also describes experimental physiological sensing and later telemetry/ground-truth analysis. All relationships below are documented in README.md; the tree contains no implementation paths, so component paths are null.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_vision["Vision analysis"]
  node_face["Face landmarks"]
  node_ear["EAR indicator"]
  node_mar["MAR indicator"]
  node_pose["Head pose"]
  node_fatigue["Fatigue detection"]
end

subgraph group_device["Embedded device"]
  node_camera["Camera"]
  node_esp["ESP device"]
  node_actuators["Buzzer and LEDs"]
end

subgraph group_telemetry["Telemetry and analysis"]
  node_wifi["Wi-Fi telemetry"]
  node_server["Server services"]
  node_nodered["Node-RED"]
  node_influx[("InfluxDB")]
  node_grafana["Grafana"]
  node_recordings["Validation recordings"]
  node_groundtruth["Ground-truth analysis"]
end

subgraph group_experimental["Experimental sensing"]
  node_physio["Contact sensors"]
  node_signal["Signal analysis"]
end

node_driver(("Driver"))

node_driver -->|"captured by"| node_camera
node_camera -->|"image input"| node_esp
node_esp -->|"processes locally"| node_face
node_face -->|"derive"| node_ear
node_face -->|"derive"| node_mar
node_face -->|"estimate"| node_pose
node_esp -->|"evaluate indicators"| node_fatigue
node_ear -->|"indicator input"| node_fatigue
node_mar -->|"indicator input"| node_fatigue
node_pose -->|"indicator input"| node_fatigue
node_fatigue -->|"trigger alert"| node_actuators
node_fatigue -->|"send event text"| node_wifi
node_wifi -->|"send telemetry"| node_server
node_server -->|"integrate services"| node_nodered
node_nodered -->|"store telemetry"| node_influx
node_influx -->|"visualize data"| node_grafana
node_physio -.->|"provide signals"| node_signal
node_influx -->|"analyze collected data"| node_groundtruth
node_recordings -->|"cross-reference"| node_groundtruth

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_face,node_ear,node_mar,node_pose,node_fatigue toneBlue
class node_camera,node_esp,node_actuators toneAmber
class node_wifi,node_server,node_nodered,node_influx,node_grafana,node_recordings,node_groundtruth toneMint
class node_physio,node_signal toneRose
class node_driver toneIndigo
```

## Components

### Vision analysis

- **Face landmarks**
- **EAR indicator**
- **MAR indicator**
- **Head pose**
- **Fatigue detection**

### Embedded device

- **Camera**
- **ESP device**
- **Buzzer and LEDs**

### Telemetry and analysis

- **Wi-Fi telemetry**
- **Server services**
- **Node-RED**
- **InfluxDB**
- **Grafana**
- **Validation recordings**
- **Ground-truth analysis**

### Experimental sensing

- **Contact sensors**
- **Signal analysis**

### Other components

- **Driver**

## Connections

- Driver → Camera: captured by (evidence: `README.md`)
- Camera → ESP device: image input (evidence: `README.md`)
- ESP device → Face landmarks: processes locally (evidence: `README.md`)
- Face landmarks → EAR indicator: derive (evidence: `README.md`)
- Face landmarks → MAR indicator: derive (evidence: `README.md`)
- Face landmarks → Head pose: estimate (evidence: `README.md`)
- ESP device → Fatigue detection: evaluate indicators (evidence: `README.md`)
- EAR indicator → Fatigue detection: indicator input (evidence: `README.md`)
- MAR indicator → Fatigue detection: indicator input (evidence: `README.md`)
- Head pose → Fatigue detection: indicator input (evidence: `README.md`)
- Fatigue detection → Buzzer and LEDs: trigger alert (evidence: `README.md`)
- Fatigue detection → Wi-Fi telemetry: send event text (evidence: `README.md`)
- Wi-Fi telemetry → Server services: send telemetry (evidence: `README.md`)
- Server services → Node-RED: integrate services (evidence: `README.md`)
- Node-RED → InfluxDB: store telemetry (evidence: `README.md`)
- InfluxDB → Grafana: visualize data (evidence: `README.md`)
- Contact sensors → Signal analysis: provide signals (evidence: `README.md`)
- InfluxDB → Ground-truth analysis: analyze collected data (evidence: `README.md`)
- Validation recordings → Ground-truth analysis: cross-reference (evidence: `README.md`)
