# kavana917/human architecture

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

- Interactive diagram: https://gitdiagram.com/kavana917/human
- Repository: https://github.com/kavana917/human

## Overview

STRYDE is a shoulder-movement assessment and recovery-progress application. Users authenticate, complete a demographic/injury profile, select a movement test, record IMU-based movement results, and review session and longitudinal comparisons. The backend receives device telemetry and exposes shoulder-test and analysis endpoints; analysis uses stored results, normative targets, and demographic k-NN predictions, with report visualization in the frontend. The file tree and excerpts support the principal routing and selected analysis relationships; several test, dashboard, and persistence interactions are unsampled, so those links are omitted or marked unverified.

Main entry points: [`frontend-react/src/App.tsx`](https://github.com/kavana917/human/blob/main/frontend-react/src/App.tsx) (App routing and auth), [`backend/analysis.py`](https://github.com/kavana917/human/blob/main/backend/analysis.py) (Longitudinal analysis API), [`backend/server.py`](https://github.com/kavana917/human/blob/main/backend/server.py) (Flask API and ingestion), [`frontend-react/src/pages/Dashboard.tsx`](https://github.com/kavana917/human/blob/main/frontend-react/src/pages/Dashboard.tsx) (Progress dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["User application"]
  node_app["App routing and auth<br/>[App.tsx]"]
  node_login["Login and signup<br/>[Login.tsx]"]
  node_onboarding["Profile onboarding<br/>[Onboarding.tsx]"]
  node_home["Home<br/>[Home.tsx]"]
  node_dashboard["Progress dashboard<br/>[Dashboard.tsx]"]
  node_selection["Test selection<br/>[TestSelection.tsx]"]
  node_recordcard["Session record charts<br/>[TestRecordCard.tsx]"]
  node_hero["3D shoulder model<br/>[HeroModel.tsx]"]
end

subgraph group_capture["Movement capture"]
  node_recorder["Movement test pages"]
  node_iotpage["IoT test view<br/>[IotTest.tsx]"]
  node_shoulder["Shoulder test processing<br/>[shoulder_tests.py]"]
end

subgraph group_analysis["Assessment analytics"]
  node_analysis["Longitudinal analysis API<br/>[analysis.py]"]
  node_kinematics["Demographic k-NN predictor"]
  node_normative["Injury-aware targets<br/>[normative.py]"]
  node_comparison["Session comparison<br/>[comparison.py]"]
  node_report["Analysis report<br/>[AnalysisReport.tsx]"]
end

subgraph group_data["Profiles and records"]
  node_supabase[("Supabase auth and data")]
end

subgraph group_device["Device telemetry"]
  node_esp32["ESP32 IMU<br/>[iot.ino]"]
  node_server["Flask API and ingestion<br/>[server.py]"]
end

node_person(("User"))

node_person -->|"uses"| node_app
node_app -->|"routes"| node_login
node_app -->|"routes"| node_onboarding
node_app -->|"routes"| node_home
node_app -->|"routes"| node_dashboard
node_app -->|"routes"| node_selection
node_app -->|"routes"| node_recorder
node_app -->|"routes"| node_report
node_app -->|"checks session"| node_supabase
node_onboarding -->|"writes profile"| node_supabase
node_home -->|"renders"| node_hero
node_recorder -.->|"submits test data"| node_server
node_esp32 -->|"posts IMU data"| node_server
node_server -->|"registers tests"| node_shoulder
node_server -->|"registers API"| node_analysis
node_server -->|"warm-loads"| node_kinematics
node_analysis -->|"reads results and profiles"| node_supabase
node_analysis -->|"uses targets"| node_normative
node_analysis -->|"predicts baseline"| node_kinematics
node_analysis -->|"compares sessions"| node_comparison
node_report -->|"loads report inputs"| node_supabase
node_report -.->|"requests report"| node_analysis
node_dashboard -.->|"loads records"| node_supabase
node_dashboard -.->|"shows sessions"| node_recordcard
node_iotpage -.->|"communicates"| node_server

click node_app "https://github.com/kavana917/human/blob/main/frontend-react/src/App.tsx"
click node_login "https://github.com/kavana917/human/blob/main/frontend-react/src/pages/Login.tsx"
click node_onboarding "https://github.com/kavana917/human/blob/main/frontend-react/src/pages/Onboarding.tsx"
click node_home "https://github.com/kavana917/human/blob/main/frontend-react/src/pages/Home.tsx"
click node_dashboard "https://github.com/kavana917/human/blob/main/frontend-react/src/pages/Dashboard.tsx"
click node_selection "https://github.com/kavana917/human/blob/main/frontend-react/src/pages/TestSelection.tsx"
click node_recorder "https://github.com/kavana917/human/tree/main/frontend-react/src/pages/tests"
click node_iotpage "https://github.com/kavana917/human/blob/main/frontend-react/src/pages/IotTest.tsx"
click node_esp32 "https://github.com/kavana917/human/blob/main/iot/iot.ino"
click node_server "https://github.com/kavana917/human/blob/main/backend/server.py"
click node_shoulder "https://github.com/kavana917/human/blob/main/backend/shoulder_tests.py"
click node_analysis "https://github.com/kavana917/human/blob/main/backend/analysis.py"
click node_kinematics "https://github.com/kavana917/human/blob/main/backend/kinematics_model.py"
click node_normative "https://github.com/kavana917/human/blob/main/backend/normative.py"
click node_comparison "https://github.com/kavana917/human/blob/main/backend/comparison.py"
click node_report "https://github.com/kavana917/human/blob/main/frontend-react/src/pages/AnalysisReport.tsx"
click node_recordcard "https://github.com/kavana917/human/blob/main/frontend-react/src/components/TestRecordCard.tsx"
click node_hero "https://github.com/kavana917/human/blob/main/frontend-react/src/components/HeroModel.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_app,node_login,node_onboarding,node_home,node_dashboard,node_selection,node_recordcard,node_hero,node_person toneBlue
class node_recorder,node_iotpage,node_shoulder toneAmber
class node_analysis,node_kinematics,node_normative,node_comparison,node_report toneMint
class node_supabase toneRose
class node_esp32,node_server toneIndigo
```

## Components

### User application

- [App routing and auth](https://github.com/kavana917/human/blob/main/frontend-react/src/App.tsx): `frontend-react/src/App.tsx`
- [Login and signup](https://github.com/kavana917/human/blob/main/frontend-react/src/pages/Login.tsx): `frontend-react/src/pages/Login.tsx`
- [Profile onboarding](https://github.com/kavana917/human/blob/main/frontend-react/src/pages/Onboarding.tsx): `frontend-react/src/pages/Onboarding.tsx`
- [Home](https://github.com/kavana917/human/blob/main/frontend-react/src/pages/Home.tsx): `frontend-react/src/pages/Home.tsx`
- [Progress dashboard](https://github.com/kavana917/human/blob/main/frontend-react/src/pages/Dashboard.tsx): `frontend-react/src/pages/Dashboard.tsx`
- [Test selection](https://github.com/kavana917/human/blob/main/frontend-react/src/pages/TestSelection.tsx): `frontend-react/src/pages/TestSelection.tsx`
- [Session record charts](https://github.com/kavana917/human/blob/main/frontend-react/src/components/TestRecordCard.tsx): `frontend-react/src/components/TestRecordCard.tsx`
- [3D shoulder model](https://github.com/kavana917/human/blob/main/frontend-react/src/components/HeroModel.tsx): `frontend-react/src/components/HeroModel.tsx`

### Movement capture

- [Movement test pages](https://github.com/kavana917/human/tree/main/frontend-react/src/pages/tests): `frontend-react/src/pages/tests`
- [IoT test view](https://github.com/kavana917/human/blob/main/frontend-react/src/pages/IotTest.tsx): `frontend-react/src/pages/IotTest.tsx`
- [Shoulder test processing](https://github.com/kavana917/human/blob/main/backend/shoulder_tests.py): `backend/shoulder_tests.py`

### Assessment analytics

- [Longitudinal analysis API](https://github.com/kavana917/human/blob/main/backend/analysis.py): `backend/analysis.py`
- [Demographic k-NN predictor](https://github.com/kavana917/human/blob/main/backend/kinematics_model.py): `backend/kinematics_model.py`
- [Injury-aware targets](https://github.com/kavana917/human/blob/main/backend/normative.py): `backend/normative.py`
- [Session comparison](https://github.com/kavana917/human/blob/main/backend/comparison.py): `backend/comparison.py`
- [Analysis report](https://github.com/kavana917/human/blob/main/frontend-react/src/pages/AnalysisReport.tsx): `frontend-react/src/pages/AnalysisReport.tsx`

### Profiles and records

- **Supabase auth and data**

### Device telemetry

- [ESP32 IMU](https://github.com/kavana917/human/blob/main/iot/iot.ino): `iot/iot.ino`
- [Flask API and ingestion](https://github.com/kavana917/human/blob/main/backend/server.py): `backend/server.py`

### Other components

- **User**

## Connections

- User → App routing and auth: uses (evidence: `frontend-react/src/App.tsx`)
- App routing and auth → Login and signup: routes (evidence: `frontend-react/src/App.tsx`)
- App routing and auth → Profile onboarding: routes (evidence: `frontend-react/src/App.tsx`)
- App routing and auth → Home: routes (evidence: `frontend-react/src/App.tsx`)
- App routing and auth → Progress dashboard: routes (evidence: `frontend-react/src/App.tsx`)
- App routing and auth → Test selection: routes (evidence: `frontend-react/src/App.tsx`)
- App routing and auth → Movement test pages: routes (evidence: `frontend-react/src/App.tsx`)
- App routing and auth → Analysis report: routes (evidence: `frontend-react/src/App.tsx`)
- App routing and auth → Supabase auth and data: checks session (evidence: `frontend-react/src/App.tsx`)
- Profile onboarding → Supabase auth and data: writes profile (evidence: `frontend-react/src/pages/Onboarding.tsx`)
- Home → 3D shoulder model: renders (evidence: `frontend-react/src/pages/Home.tsx`)
- Movement test pages → Flask API and ingestion: submits test data
- ESP32 IMU → Flask API and ingestion: posts IMU data (evidence: `backend/server.py`)
- Flask API and ingestion → Shoulder test processing: registers tests (evidence: `backend/server.py`)
- Flask API and ingestion → Longitudinal analysis API: registers API (evidence: `backend/server.py`)
- Flask API and ingestion → Demographic k-NN predictor: warm-loads (evidence: `backend/server.py`)
- Longitudinal analysis API → Supabase auth and data: reads results and profiles (evidence: `backend/analysis.py`)
- Longitudinal analysis API → Injury-aware targets: uses targets (evidence: `backend/analysis.py`)
- Longitudinal analysis API → Demographic k-NN predictor: predicts baseline (evidence: `backend/analysis.py`)
- Longitudinal analysis API → Session comparison: compares sessions (evidence: `backend/analysis.py`)
- Analysis report → Supabase auth and data: loads report inputs (evidence: `frontend-react/src/pages/AnalysisReport.tsx`)
- Analysis report → Longitudinal analysis API: requests report
- Progress dashboard → Supabase auth and data: loads records
- Progress dashboard → Session record charts: shows sessions
- IoT test view → Flask API and ingestion: communicates
