# shreya2338/quell architecture

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

- Interactive diagram: https://gitdiagram.com/shreya2338/quell
- Repository: https://github.com/shreya2338/quell
- Video tour (about a minute): https://gitdiagram.com/shreya2338/quell/video

## Overview

Quell combines a wearable tremor-therapy concept, a Python sensing/analytics backend, and a patient-and-clinician web app. The documented workflow is wrist sensing, tremor measurement, therapy, and shared clinical insights; the sampled runtime code shows pieces of that flow, but not a single confirmed end-to-end deployment. The graph preserves the separately visible ESP32 receiver, signal-processing and analytics services, and app capabilities. Some product links are documented only at a high level or are unsampled, so those links are dashed and marked unverified.

Main entry points: [`frontend/src/App.tsx`](https://github.com/shreya2338/quell/blob/main/frontend/src/App.tsx) (Patient and clinician app), [`tremor-engine/server_manager.py`](https://github.com/shreya2338/quell/blob/main/tremor-engine/server_manager.py) (Process manager), [`tremor-engine/analytics/server.py`](https://github.com/shreya2338/quell/blob/main/tremor-engine/analytics/server.py) (Analytics API), [`firmware/main/mpu6050Driver.h`](https://github.com/shreya2338/quell/blob/main/firmware/main/mpu6050Driver.h) (Wristband sensors)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_wearable["Wearable device"]
  node_wristband["Wristband sensors<br/>[mpu6050Driver.h]"]
  node_haptic["Haptic therapy<br/>[TremorHaptic.h]"]
  node_laptoplink["Device link<br/>[LaptopLink.h]"]
end

subgraph group_engine["Tremor engine"]
  node_receiver["ESP32 receiver<br/>[receiver.py]"]
  node_manager["Process manager<br/>[server_manager.py]"]
  node_dsp["Signal processing<br/>[dsp_pipeline.py]"]
  node_classifier["Tremor classifier"]
  node_actuator["Actuator control<br/>[tass_actuator.py]"]
  node_persistence[("Episode persistence<br/>[db.py]")]
end

subgraph group_clinical["Clinical services"]
  node_analytics_api["Analytics API<br/>[server.py]"]
  node_reports["Clinical reports"]
  node_alerts["Caregiver alerts<br/>[alerts_service.py]"]
end

subgraph group_app["Care application"]
  node_webapp["Patient and clinician app<br/>[App.tsx]"]
  node_safety["Safety experience<br/>[CareSafety.tsx]"]
  node_heatmap["Tremor heatmap<br/>[TremorHeatmap.jsx]"]
  node_viewer["Wristband viewer"]
end

node_patient(("Patient"))
node_gemini["Gemini service"]
node_caregiver(("Caregiver"))

node_patient -.->|"wears"| node_wristband
node_wristband -.->|"sends telemetry"| node_receiver
node_receiver -.->|"provides samples"| node_manager
node_manager -.->|"processes samples"| node_dsp
node_dsp -.->|"provides features"| node_classifier
node_manager -.->|"dispatches commands"| node_actuator
node_actuator -.->|"commands vibration"| node_haptic
node_manager -.->|"stores episodes"| node_persistence
node_analytics_api -->|"generates reports"| node_reports
node_analytics_api -->|"manages alerts"| node_alerts
node_reports -->|"requests generation"| node_gemini
node_analytics_api -.->|"reads metrics"| node_persistence
node_patient -.->|"uses"| node_webapp
node_webapp -->|"renders"| node_safety
node_webapp -->|"renders"| node_heatmap
node_webapp -->|"renders"| node_viewer
node_caregiver -.->|"receives updates"| node_alerts
node_webapp -.->|"requests insights"| node_analytics_api

click node_wristband "https://github.com/shreya2338/quell/blob/main/firmware/main/mpu6050Driver.h"
click node_haptic "https://github.com/shreya2338/quell/blob/main/firmware/main/TremorHaptic.h"
click node_laptoplink "https://github.com/shreya2338/quell/blob/main/firmware/main/LaptopLink.h"
click node_receiver "https://github.com/shreya2338/quell/blob/main/backend/esp32Talker/receiver.py"
click node_manager "https://github.com/shreya2338/quell/blob/main/tremor-engine/server_manager.py"
click node_dsp "https://github.com/shreya2338/quell/blob/main/tremor-engine/niya/dsp_pipeline.py"
click node_classifier "https://github.com/shreya2338/quell/blob/main/tremor-engine/niya/tremor_classifier.py"
click node_actuator "https://github.com/shreya2338/quell/blob/main/tremor-engine/niya/tass_actuator.py"
click node_persistence "https://github.com/shreya2338/quell/blob/main/tremor-engine/minna/db.py"
click node_analytics_api "https://github.com/shreya2338/quell/blob/main/tremor-engine/analytics/server.py"
click node_reports "https://github.com/shreya2338/quell/blob/main/tremor-engine/analytics/ai_report_service.py"
click node_alerts "https://github.com/shreya2338/quell/blob/main/tremor-engine/analytics/alerts_service.py"
click node_webapp "https://github.com/shreya2338/quell/blob/main/frontend/src/App.tsx"
click node_safety "https://github.com/shreya2338/quell/blob/main/frontend/src/CareSafety.tsx"
click node_heatmap "https://github.com/shreya2338/quell/blob/main/frontend/src/TremorHeatmap.jsx"
click node_viewer "https://github.com/shreya2338/quell/blob/main/frontend/src/WristbandViewer.tsx"

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_wristband,node_haptic,node_laptoplink toneBlue
class node_receiver,node_manager,node_dsp,node_classifier,node_actuator,node_persistence toneAmber
class node_analytics_api,node_reports,node_alerts toneMint
class node_webapp,node_safety,node_heatmap,node_viewer toneRose
class node_patient,node_gemini,node_caregiver toneIndigo
```

## Components

### Wearable device

- [Wristband sensors](https://github.com/shreya2338/quell/blob/main/firmware/main/mpu6050Driver.h): `firmware/main/mpu6050Driver.h`
- [Haptic therapy](https://github.com/shreya2338/quell/blob/main/firmware/main/TremorHaptic.h): `firmware/main/TremorHaptic.h`
- [Device link](https://github.com/shreya2338/quell/blob/main/firmware/main/LaptopLink.h): `firmware/main/LaptopLink.h`

### Tremor engine

- [ESP32 receiver](https://github.com/shreya2338/quell/blob/main/backend/esp32Talker/receiver.py): `backend/esp32Talker/receiver.py`
- [Process manager](https://github.com/shreya2338/quell/blob/main/tremor-engine/server_manager.py): `tremor-engine/server_manager.py`
- [Signal processing](https://github.com/shreya2338/quell/blob/main/tremor-engine/niya/dsp_pipeline.py): `tremor-engine/niya/dsp_pipeline.py`
- [Tremor classifier](https://github.com/shreya2338/quell/blob/main/tremor-engine/niya/tremor_classifier.py): `tremor-engine/niya/tremor_classifier.py`
- [Actuator control](https://github.com/shreya2338/quell/blob/main/tremor-engine/niya/tass_actuator.py): `tremor-engine/niya/tass_actuator.py`
- [Episode persistence](https://github.com/shreya2338/quell/blob/main/tremor-engine/minna/db.py): `tremor-engine/minna/db.py`

### Clinical services

- [Analytics API](https://github.com/shreya2338/quell/blob/main/tremor-engine/analytics/server.py): `tremor-engine/analytics/server.py`
- [Clinical reports](https://github.com/shreya2338/quell/blob/main/tremor-engine/analytics/ai_report_service.py): `tremor-engine/analytics/ai_report_service.py`
- [Caregiver alerts](https://github.com/shreya2338/quell/blob/main/tremor-engine/analytics/alerts_service.py): `tremor-engine/analytics/alerts_service.py`

### Care application

- [Patient and clinician app](https://github.com/shreya2338/quell/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Safety experience](https://github.com/shreya2338/quell/blob/main/frontend/src/CareSafety.tsx): `frontend/src/CareSafety.tsx`
- [Tremor heatmap](https://github.com/shreya2338/quell/blob/main/frontend/src/TremorHeatmap.jsx): `frontend/src/TremorHeatmap.jsx`
- [Wristband viewer](https://github.com/shreya2338/quell/blob/main/frontend/src/WristbandViewer.tsx): `frontend/src/WristbandViewer.tsx`

### Other components

- **Patient**
- **Gemini service**
- **Caregiver**

## Connections

- Patient → Wristband sensors: wears (evidence: `README.md`)
- Wristband sensors → ESP32 receiver: sends telemetry
- ESP32 receiver → Process manager: provides samples
- Process manager → Signal processing: processes samples
- Signal processing → Tremor classifier: provides features (evidence: `tremor-engine/niya/realtime_bridge.py`)
- Process manager → Actuator control: dispatches commands
- Actuator control → Haptic therapy: commands vibration
- Process manager → Episode persistence: stores episodes (evidence: `tremor-engine/server_manager.py`)
- Analytics API → Clinical reports: generates reports (evidence: `tremor-engine/analytics/server.py`)
- Analytics API → Caregiver alerts: manages alerts (evidence: `tremor-engine/analytics/server.py`)
- Clinical reports → Gemini service: requests generation (evidence: `tremor-engine/analytics/ai_report_service.py`)
- Analytics API → Episode persistence: reads metrics
- Patient → Patient and clinician app: uses (evidence: `README.md`)
- Patient and clinician app → Safety experience: renders (evidence: `frontend/src/App.tsx`)
- Patient and clinician app → Tremor heatmap: renders (evidence: `frontend/src/App.tsx`)
- Patient and clinician app → Wristband viewer: renders (evidence: `frontend/src/App.tsx`)
- Caregiver → Caregiver alerts: receives updates
- Patient and clinician app → Analytics API: requests insights
