# jatin17082005/cluster-based-iot-healthcare-encryption architecture

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

- Interactive diagram: https://gitdiagram.com/jatin17082005/cluster-based-iot-healthcare-encryption
- Repository: https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption

## Overview

This local research platform compares uniform AES-256-GCM encryption with sensitivity-adaptive encryption on reproducible synthetic healthcare telemetry. The user-facing workflow generates and classifies records, clusters them, encrypts and verifies transmissions, then computes timing, transmission, and energy results for dashboard comparison and export. The README documents dashboard tracing, tamper demonstrations, power-measurement options, and saved-run access. Several server routes and UI-to-API calls were not excerpted, so those connections are omitted; documented pipeline links use the README as evidence.

Main entry points: [`src/server.py`](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/server.py) (FastAPI Server), [`src/benchmark_runner.py`](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/benchmark_runner.py) (Benchmark Runner), [`src/data_generator.py`](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/data_generator.py) (Synthetic Generator), [`static/index.html`](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/static/index.html) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Dashboard and API"]
  node_dashboard["Dashboard<br/>[index.html]"]
  node_dashboard_logic["Dashboard Logic<br/>[app.js]"]
  node_api["FastAPI Server<br/>[server.py]"]
end

subgraph group_pipeline["Telemetry Pipeline"]
  node_generator["Synthetic Generator<br/>[data_generator.py]"]
  node_classifier["Sensitivity Classifier<br/>[classifier.py]"]
  node_clusters["Cluster Manager<br/>[cluster_manager.py]"]
  node_crypto["Encryption Engine<br/>[crypto.py]"]
  node_receiver["Healthcare Receiver<br/>[receiver.py]"]
  node_models["Domain Models<br/>[models.py]"]
end

subgraph group_benchmark["Benchmark and Measurement"]
  node_runner["Benchmark Runner"]
  node_metrics["Metrics Engine<br/>[metrics.py]"]
  node_power["Power Measurement"]
end

subgraph group_persistence["Results and Storage"]
  node_run_store["Run Store<br/>[run_store.py]"]
  node_sqlite[("SQLite Database<br/>[iot_benchmark.db]")]
  node_exports["CSV and JSON Exports<br/>[server.py]"]
end

node_user(("Researcher"))
node_power_instrument["Lab Power Instrument"]

node_user -->|"uses"| node_dashboard
node_dashboard -->|"renders"| node_dashboard_logic
node_api -->|"serves"| node_dashboard
node_api -->|"requests generation"| node_generator
node_generator -->|"classifies records"| node_classifier
node_generator -->|"forms clusters"| node_clusters
node_classifier -->|"routes by sensitivity"| node_clusters
node_clusters -->|"selects encryption path"| node_crypto
node_crypto -->|"transmits envelopes"| node_receiver
node_runner -->|"encrypts records"| node_crypto
node_runner -->|"evaluates verification"| node_receiver
node_runner -->|"computes results"| node_metrics
node_power -->|"integrates energy"| node_metrics
node_power_instrument -.->|"provides samples"| node_power
node_api -->|"imports power logs"| node_power
node_api -->|"controls benchmarks"| node_runner
node_api -->|"reads saved runs"| node_run_store
node_run_store -->|"reads and writes"| node_sqlite
node_api -->|"serves results"| node_exports

click node_dashboard "https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/static/index.html"
click node_dashboard_logic "https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/static/app.js"
click node_api "https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/server.py"
click node_generator "https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/data_generator.py"
click node_classifier "https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/classifier.py"
click node_clusters "https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/cluster_manager.py"
click node_crypto "https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/crypto.py"
click node_receiver "https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/receiver.py"
click node_models "https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/models.py"
click node_runner "https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/benchmark_runner.py"
click node_metrics "https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/metrics.py"
click node_power "https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/power_measurement.py"
click node_run_store "https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/run_store.py"
click node_sqlite "https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/data/iot_benchmark.db"
click node_exports "https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/server.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_dashboard,node_dashboard_logic,node_api toneBlue
class node_generator,node_classifier,node_clusters,node_crypto,node_receiver,node_models toneAmber
class node_runner,node_metrics,node_power toneMint
class node_run_store,node_sqlite,node_exports toneRose
class node_user,node_power_instrument toneIndigo
```

## Components

### Dashboard and API

- [Dashboard](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/static/index.html): `static/index.html`
- [Dashboard Logic](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/static/app.js): `static/app.js`
- [FastAPI Server](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/server.py): `src/server.py`

### Telemetry Pipeline

- [Synthetic Generator](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/data_generator.py): `src/data_generator.py`
- [Sensitivity Classifier](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/classifier.py): `src/classifier.py`
- [Cluster Manager](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/cluster_manager.py): `src/cluster_manager.py`
- [Encryption Engine](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/crypto.py): `src/crypto.py`
- [Healthcare Receiver](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/receiver.py): `src/receiver.py`
- [Domain Models](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/models.py): `src/models.py`

### Benchmark and Measurement

- [Benchmark Runner](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/benchmark_runner.py): `src/benchmark_runner.py`
- [Metrics Engine](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/metrics.py): `src/metrics.py`
- [Power Measurement](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/power_measurement.py): `src/power_measurement.py`

### Results and Storage

- [Run Store](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/run_store.py): `src/run_store.py`
- [SQLite Database](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/data/iot_benchmark.db): `data/iot_benchmark.db`
- [CSV and JSON Exports](https://github.com/jatin17082005/cluster-based-iot-healthcare-encryption/blob/main/src/server.py): `src/server.py`

### Other components

- **Researcher**
- **Lab Power Instrument**

## Connections

- Researcher → Dashboard: uses (evidence: `README.md`)
- Dashboard → Dashboard Logic: renders (evidence: `README.md`)
- FastAPI Server → Dashboard: serves (evidence: `src/server.py`)
- FastAPI Server → Synthetic Generator: requests generation (evidence: `src/server.py`)
- Synthetic Generator → Sensitivity Classifier: classifies records (evidence: `README.md`)
- Synthetic Generator → Cluster Manager: forms clusters (evidence: `README.md`)
- Sensitivity Classifier → Cluster Manager: routes by sensitivity (evidence: `README.md`)
- Cluster Manager → Encryption Engine: selects encryption path (evidence: `README.md`)
- Encryption Engine → Healthcare Receiver: transmits envelopes (evidence: `README.md`)
- Benchmark Runner → Encryption Engine: encrypts records (evidence: `src/benchmark_runner.py`)
- Benchmark Runner → Healthcare Receiver: evaluates verification (evidence: `src/benchmark_runner.py`)
- Benchmark Runner → Metrics Engine: computes results (evidence: `src/benchmark_runner.py`)
- Power Measurement → Metrics Engine: integrates energy (evidence: `src/power_measurement.py`)
- Lab Power Instrument → Power Measurement: provides samples (evidence: `README.md`)
- FastAPI Server → Power Measurement: imports power logs (evidence: `src/server.py`)
- FastAPI Server → Benchmark Runner: controls benchmarks (evidence: `src/server.py`)
- FastAPI Server → Run Store: reads saved runs (evidence: `src/server.py`)
- Run Store → SQLite Database: reads and writes (evidence: `src/run_store.py`)
- FastAPI Server → CSV and JSON Exports: serves results (evidence: `README.md`)
