# coderyasa089/smedikit architecture

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

- Interactive diagram: https://gitdiagram.com/coderyasa089/smedikit
- Repository: https://github.com/coderyasa089/smedikit

## Overview

SmediKit is a local-fog telemedicine prototype: a patient activates an ESP32-based scan, the edge node collects and publishes vitals over MQTT, and a Python dashboard displays live readings and rule-based triage. The launcher checks broker and device telemetry before starting the dashboard. Firmware internals and the broker are described in the README rather than sampled source, so those links reflect documented behavior; the dashboard and launcher links are supported by their excerpts.

Main entry points: [`Firmware/Smedikit_Node/Smedikit_Node.ino`](https://github.com/coderyasa089/smedikit/blob/main/Firmware/Smedikit_Node/Smedikit_Node.ino) (ESP32 Firmware), [`start_smedikit.py`](https://github.com/coderyasa089/smedikit/blob/main/start_smedikit.py) (System Launcher), [`Dashboard/smedikit_dashboard.py`](https://github.com/coderyasa089/smedikit/blob/main/Dashboard/smedikit_dashboard.py) (MQTT Telemetry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_edge["Edge Monitoring"]
  node_acoustic["Acoustic Trigger<br/>[Smedikit_Node.ino]"]
  node_sensors["Vital Sensors<br/>[Smedikit_Node.ino]"]
  node_edge_firmware["ESP32 Firmware<br/>[Smedikit_Node.ino]"]
  node_oled["OLED Status<br/>[Smedikit_Node.ino]"]
end

subgraph group_fog["Local Fog Network"]
  node_broker["Mosquitto Broker"]
  node_launcher["System Launcher<br/>[start_smedikit.py]"]
end

subgraph group_dashboard["Triage Dashboard"]
  node_ingest["MQTT Telemetry"]
  node_triage["Rule-Based Triage"]
  node_visualization["Live Dashboard"]
end

node_patient(("Patient"))

node_patient -->|"speaks command"| node_acoustic
node_acoustic -->|"controls scan"| node_edge_firmware
node_edge_firmware -->|"reads vitals"| node_sensors
node_edge_firmware -->|"updates status"| node_oled
node_edge_firmware -->|"publishes telemetry"| node_broker
node_launcher -->|"checks availability"| node_broker
node_launcher -->|"checks telemetry"| node_broker
node_broker -->|"delivers MQTT"| node_ingest
node_launcher -->|"launches dashboard"| node_visualization
node_ingest -->|"updates vitals"| node_triage
node_triage -->|"flags readings"| node_visualization
node_ingest -->|"updates charts"| node_visualization

click node_acoustic "https://github.com/coderyasa089/smedikit/blob/main/Firmware/Smedikit_Node/Smedikit_Node.ino"
click node_sensors "https://github.com/coderyasa089/smedikit/blob/main/Firmware/Smedikit_Node/Smedikit_Node.ino"
click node_edge_firmware "https://github.com/coderyasa089/smedikit/blob/main/Firmware/Smedikit_Node/Smedikit_Node.ino"
click node_oled "https://github.com/coderyasa089/smedikit/blob/main/Firmware/Smedikit_Node/Smedikit_Node.ino"
click node_launcher "https://github.com/coderyasa089/smedikit/blob/main/start_smedikit.py"
click node_ingest "https://github.com/coderyasa089/smedikit/blob/main/Dashboard/smedikit_dashboard.py"
click node_triage "https://github.com/coderyasa089/smedikit/blob/main/Dashboard/smedikit_dashboard.py"
click node_visualization "https://github.com/coderyasa089/smedikit/blob/main/Dashboard/smedikit_dashboard.py"

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_acoustic,node_sensors,node_edge_firmware,node_oled toneBlue
class node_broker,node_launcher toneAmber
class node_ingest,node_triage,node_visualization toneMint
class node_patient toneIndigo
```

## Components

### Edge Monitoring

- [Acoustic Trigger](https://github.com/coderyasa089/smedikit/blob/main/Firmware/Smedikit_Node/Smedikit_Node.ino): `Firmware/Smedikit_Node/Smedikit_Node.ino`
- [Vital Sensors](https://github.com/coderyasa089/smedikit/blob/main/Firmware/Smedikit_Node/Smedikit_Node.ino): `Firmware/Smedikit_Node/Smedikit_Node.ino`
- [ESP32 Firmware](https://github.com/coderyasa089/smedikit/blob/main/Firmware/Smedikit_Node/Smedikit_Node.ino): `Firmware/Smedikit_Node/Smedikit_Node.ino`
- [OLED Status](https://github.com/coderyasa089/smedikit/blob/main/Firmware/Smedikit_Node/Smedikit_Node.ino): `Firmware/Smedikit_Node/Smedikit_Node.ino`

### Local Fog Network

- **Mosquitto Broker**
- [System Launcher](https://github.com/coderyasa089/smedikit/blob/main/start_smedikit.py): `start_smedikit.py`

### Triage Dashboard

- [MQTT Telemetry](https://github.com/coderyasa089/smedikit/blob/main/Dashboard/smedikit_dashboard.py): `Dashboard/smedikit_dashboard.py`
- [Rule-Based Triage](https://github.com/coderyasa089/smedikit/blob/main/Dashboard/smedikit_dashboard.py): `Dashboard/smedikit_dashboard.py`
- [Live Dashboard](https://github.com/coderyasa089/smedikit/blob/main/Dashboard/smedikit_dashboard.py): `Dashboard/smedikit_dashboard.py`

### Other components

- **Patient**

## Connections

- Patient → Acoustic Trigger: speaks command (evidence: `README.md`)
- Acoustic Trigger → ESP32 Firmware: controls scan (evidence: `README.md`)
- ESP32 Firmware → Vital Sensors: reads vitals (evidence: `README.md`)
- ESP32 Firmware → OLED Status: updates status (evidence: `README.md`)
- ESP32 Firmware → Mosquitto Broker: publishes telemetry (evidence: `README.md`)
- System Launcher → Mosquitto Broker: checks availability (evidence: `start_smedikit.py`)
- System Launcher → Mosquitto Broker: checks telemetry (evidence: `start_smedikit.py`)
- Mosquitto Broker → MQTT Telemetry: delivers MQTT (evidence: `Dashboard/smedikit_dashboard.py`)
- System Launcher → Live Dashboard: launches dashboard (evidence: `start_smedikit.py`)
- MQTT Telemetry → Rule-Based Triage: updates vitals (evidence: `Dashboard/smedikit_dashboard.py`)
- Rule-Based Triage → Live Dashboard: flags readings (evidence: `Dashboard/smedikit_dashboard.py`)
- MQTT Telemetry → Live Dashboard: updates charts (evidence: `Dashboard/smedikit_dashboard.py`)
