# Project export: Cognivi — Quick, Accurate Stroke Detection Under $10

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: TreeHacks 2026
- Tagline: Cognivi is a privacy-first, multimodal AI system that transforms a simple 60-second smartphone video into an objective stroke triage signal.
- Devpost: https://devpost.com/software/cognivi-quick-accurate-stroke-detection-under-10
- GitHub: https://github.com/laurie-png/cognivi
- Team: 4 GitHub contributor(s) — basanthpr11 (8 commits), Laurie (4 commits), Devi Aditya Varma Dantuluri (2 commits), Cursor (1 commits)

## Devpost submission (written by the team)

### Inspiration

Stroke is a leading cause of death and disability worldwide, despite its distinct early symptoms. Each year, stroke kills 7 million people, with a 60+% disability rate for survivors. If a stroke goes untreated for 60+ minutes, approximately 2 million brain cells die per minute, and the brain ages by over three years. Even if traditional screening tools like FAST are already in place, these protocols still rely on subjective human judgment, resulting in delays in seeking care when every minute counts. We saw an opportunity to leverage widely accessible technology, smartphone cameras and open clinical data, to make stroke screening objective, rapid, and accessible. Cognivi was built with a simple mission: turn a 60-second video into a reliable neurologic triage signal that empowers patients, families, and telehealth providers.

### What it does

Cognivi is an AI-assisted screening tool that analyzes a short video recorded on a smartphone to identify signs of acute stroke. It specifically targets objective correlates of neurologic dysfunction, based on established FAST stroke criteria. Hand motion impairment via computer vision to detect the inability to raise both hands at the same time. Facial asymmetry quantification using computer vision to detect lip droop, eyebrow shift, or midline deviation. Speech abnormality detection using acoustic feature analysis and pretrained audio models to identify slurring or irregular prosody. A stroke risk score that combines visual and audio signals into an interpretable risk estimate. Clear, actionable output with visual overlays (e.g., asymmetry heatmaps) and speech abnormality summaries to help users understand why risk was flagged. Rather than diagnosing stroke, Cognivi provides a quantified triage indication that complements clinical workflows and encourages timely care escalation when appropriate.

### How we built it

We designed StrokePager around three core principles: clinical grounding, technical rigor, and privacy by design. Robust Video Ingestion ("Sanitizer" Pipeline) Browser-recorded videos (WebM) frequently upload with corrupted headers (e.g., missing moov atom), which causes Python video libraries to crash. To ensure reliability, we implemented a raw FFmpeg ingestion layer: Every uploaded file is immediately re-encoded into a clean H.264 MP4. Codecs and container formats are normalized before any model touches the file. This prevents crashes from malformed uploads and ensures consistent downstream processing. This sanitizer layer makes the backend resilient to real-world browser variability and large (~2-minute) uploads. Computer Vision: Arm Drift & Facial Droop Tools: MediaPipe + OpenCV We perform frame-by-frame skeletal landmark tracking to quantify motor asymmetry. The system computes: Arm drift detection: Vertical displacement differences between left and right wrists during bilateral raise tasks. Facial asymmetry detection: Positional differences between eye corners, mouth corners, and midline landmarks to quantify facial droop. These measurements are transformed into structured risk percentages rather than binary flags. To improve interpretability, we render an annotated output video with skeletal overlays. Clinicians can visually confirm the exact movement that triggered the score. This mirrors objective NIHSS components rather than relying on black-box classification. Speech & Cognitive Assessment Tools: FFmpeg (audio extraction), NVIDIA NeMo (automatic speech recognition), Claude 3 (LLM-based neurologic grading), Retrieval-Augmented Generation (PubMed-grounded prompting). First, we extract audio using FFmpeg and transcribe it with NVIDIA NeMo to obtain a high-fidelity transcript. Rather than using keyword detection, we implement a structured grading pipeline: Relevant stroke literature and diagnostic criteria are retrieved from PubMed-indexed sources and other peer reviewed medical databases. These evidence snippets are injected into Claude’s prompt context. Claude is instructed to act as a neurologist and evaluate: Dysarthria (slurring) Aphasia (word-finding difficulty) Deviations from the expected phrase (“The quick brown fox…”) Cognitive coherence and prosody This is a retrieval-augmented neurologic grading system, not simple LLM classification. The output includes a structured speech impairment score, a medical summary, and evidence-grounded reasoning. By grounding the LLM with peer-reviewed criteria at inference time, we increase interpretability and reduce hallucination risk. Multimodal Risk Fusion The system generates separate scores for: Arm motor impairment Facial asymmetry Speech and language dysfunction These components are fused into a unified stroke risk estimate returned as structured JSON. This approach preserves transparency: clinicians can see which neurologic domain contributed most to risk. Privacy-First Architecture StrokePager is deployed across three separated layers: Frontend (Next.js on Vercel) Secure backend (FastAPI on Render) AI inference engine (Modal deployment) Uploads are processed transiently, and only necessary artifacts and derived scores are retained. The architecture minimizes exposure of raw biometric data while preserving clinical utility. We intentionally separated inference from core application logic to reduce risk surface and support HIPAA-conscious deployment models.

### Challenges we ran into

Balancing sensitivity and specificity: Reducing false positives while capturing subtle neurologic abnormalities required iterative tuning and validation. Multi-deploy coordination: Vercel + Render + Modal requires disciplined project roots, env vars, and endpoint hygiene. Privacy vs. usability: video exams are sensitive, so we intentionally separated services and made AI inference its own deploy path. Hackathon reliability: building a smooth end-to-end experience under time pressure meant keeping interfaces stable and minimizing moving parts.

### Accomplishments we're proud of

A fully functional prototype that converts a 60-second video into a clinically relevant risk estimate for stroke detection. It contains three distinct layers (web app, secure backend, AI inference backend). Clinical-inspired and accurate scoring that approximates elements of standardized neurologic screening. A deployment architecture that runs on standard consumer devices without requiring wearables or specialized hardware.

### What we learned

Real-world clinical signal extraction and the challenges of translating clinician heuristics into machine-usable features. How to responsibly leverage public clinical datasets to train models that generalize to diverse populations. Building privacy-preserving pipelines where sensitive input remains local to the device.

### What's next

We’re excited to expand the project in several directions: Clinical validation studies with partners to benchmark sensitivity against real stroke presentations. We are working with researchers from Stanford School of Medicine to expand this project to clinical settings. Integration with telehealth platforms to offer on-demand screening during virtual visits. Expanded language support for broader global accessibility outside of mainstream languages like English. Automated accessibility enhancements (e.g., prompts in local languages, low-bandwidth modes). Our vision is to make objective neurologic triage available to everyone with a smartphone, reducing disparities in stroke recognition and care.

## README (from the GitHub repository)

# StrokePager / Cognivi

A cloud-connected, privacy-first stroke triage system.

## Deploy roots (important)

- **Vercel (frontend)**  
  Use the **`frontend`** folder as the project root. All frontend code lives under `frontend/`.

- **Render (backend)**  
  Use the **`backend`** folder as the project root. The FastAPI app (auth, checkups, patients) is self-contained under `backend/`.

- **Modal (AI backend)**  
  The AI modeling API (full video exam, doctor dashboard) is deployed separately to Modal. Live endpoint:  
  `https://ddavarma2609--strokepager-backend-fastapi-app.modal.run`  
  (Defined in `backend/stroke_backend.py`; deploy with Modal, not Render.)

## Architecture

- **Frontend** (`frontend/`): Next.js app. Talks to:
  - **Render backend** (`NEXT_PUBLIC_API_URL`): auth, checkups, patients, dashboard.
  - **Modal AI** (`NEXT_PUBLIC_AI_API_URL`): `/submit_exam`, `/doctor_dashboard`, `/video/{filename}`.
- **Backend** (`backend/`): FastAPI app for Render — auth, checkups, patients, DB.
- **Patient agent** (`patient-agent/`): Local/optional FastAPI for real-time inference (`/infer`, `/red_trigger`).
- **Cloud** (`cloud/modal_api/`): Modal app for events, presign, agents (separate from the main AI deploy above).

## Setup

### Frontend (Vercel root: `frontend/`)

```bash
cd frontend
cp .env.example .env
# Set NEXT_PUBLIC_API_URL to your Render backend URL
# NEXT_PUBLIC_AI_API_URL is pre-set to the Modal AI endpoint
npm install
npm run dev
```

### Backend (Render root: `backend/`)

```bash
cd backend
pip install -r requirements.txt
# Configure DB and env; then:
uvicorn app.main:app --host 0.0.0.0 --port 8000
```

### Modal AI

The main AI modeling endpoint is deployed from `backend/stroke_backend.py` (submit_exam, doctor_dashboard, video). Deploy with Modal CLI from the repo root or from `backend/` as needed by your Modal config.

## Privacy & safety

See `docs/safety.md` and `docs/threat_model.md`.


## Detected evidence (automated analysis)

Indexed codebase: 136 recognized source files, 437 KB.
- CSS (language) — detected in the code
- FastAPI (technology) — detected in the code
- HTML (language) — detected in the code
- JavaScript (language) — detected in the code
- Next.js (technology) — detected in the code
- Python (language) — detected in the code
- React (technology) — detected in the code
- Tailwind CSS (technology) — detected in the code
- TypeScript (language) — detected in the code
- Vercel (technology) — claimed on Devpost, not found in the code
- AI coding agent: Cursor — evidence: commit authorship or trailers

## Codebase structure (from repository index)

### Files (120 of 178)

```
.env.production.template
.gitignore
agents/.env.example
agents/common/http_client.py
agents/common/schemas.py
agents/common/state_store.py
agents/escalation_agent.py
agents/EXPLANATION.md
agents/mock_cloud.py
agents/notifier_agent.py
agents/README.md
agents/requirements.txt
agents/scheduler_agent.py
apps/web/.gitignore
apps/web/eslint.config.mjs
apps/web/jsconfig.json
apps/web/next.config.mjs
apps/web/package.json
apps/web/postcss.config.mjs
apps/web/README.md
apps/web/src/app/doctor/page.js
apps/web/src/app/globals.css
apps/web/src/app/layout.js
apps/web/src/app/page.js
apps/web/src/app/patient/page.js
apps/web/src/components/AudioRecorder.jsx
apps/web/src/components/CameraCapture.jsx
apps/web/src/services/api.js
AUDIT_REPORT.md
backend/app/__init__.py
backend/app/api/deps.py
backend/app/api/v1/endpoints/__init__.py
backend/app/api/v1/endpoints/auth.py
backend/app/api/v1/endpoints/checkups.py
backend/app/api/v1/endpoints/patients.py
backend/app/core/config.py
backend/app/core/database.py
backend/app/core/security.py
backend/app/main.py
backend/app/models/__init__.py
backend/app/models/all_models.py
backend/app/schemas/__init__.py
backend/app/schemas/all_schemas.py
backend/app/services/__init__.py
backend/app/services/ai_service.py
backend/app/services/audio_analysis.py
backend/app/services/face_analysis.py
backend/app/services/notification_service.py
backend/requirements.txt
backend/server.log
backend/stroke_backend.py
backend/strokepager.db
backend/tests/test_ai_integration.py
backend/tests/test_audio.py
backend/tests/test_auth.py
cloud/modal_api/escalation.py
cloud/modal_api/evidence.py
cloud/modal_api/genai.py
cloud/modal_api/main.py
deploy.txt
docs/safety.md
docs/threat_model.md
frontend/.gitignore
frontend/eslint.config.js
frontend/eslint.config.mjs
frontend/index.html
frontend/jsconfig.json
frontend/next.config.mjs
frontend/package.json
frontend/postcss.config.mjs
frontend/README.md
frontend/src/App.jsx
frontend/src/app/doctor/page.js
frontend/src/app/globals.css
frontend/src/app/layout.js
frontend/src/app/login/page.js
frontend/src/app/page.js
frontend/src/app/patient/page.js
frontend/src/app/signup/page.js
frontend/src/components/AudioRecorder.jsx
frontend/src/components/CameraCapture.jsx
frontend/src/components/MultimodalAnalysisFeed.jsx
frontend/src/index.css
frontend/src/main.jsx
frontend/src/services/api.js
frontend/tailwind.config.js
frontend/vite.config.js
patient-agent/app.py
patient-agent/inference/arm_pose.py
patient-agent/inference/face.py
patient-agent/inference/fuse.py
patient-agent/inference/speech.py
patient-agent/models/face_landmarker.task
patient-agent/models/pose_landmarker_lite.task
patient-agent/requirements.txt
patient-agent/test_mediapipe_2.py
patient-agent/test_mediapipe.py
project_docs.txt
README.md
SETUP_PRODUCTION.md
stroke-fast/.env.production.template
stroke-fast/.gitignore
stroke-fast/agents/.env.example
stroke-fast/agents/common/http_client.py
stroke-fast/agents/common/schemas.py
stroke-fast/agents/common/state_store.py
stroke-fast/agents/escalation_agent.py
stroke-fast/agents/EXPLANATION.md
stroke-fast/agents/mock_cloud.py
stroke-fast/agents/notifier_agent.py
stroke-fast/agents/README.md
stroke-fast/agents/requirements.txt
stroke-fast/agents/scheduler_agent.py
stroke-fast/apps/web/.gitignore
stroke-fast/apps/web/eslint.config.mjs
stroke-fast/apps/web/jsconfig.json
stroke-fast/apps/web/next.config.mjs
stroke-fast/apps/web/package.json
stroke-fast/apps/web/postcss.config.mjs
stroke-fast/apps/web/README.md
[58 more files omitted for size]
```

### Dependencies

- agents/requirements.txt: pydantic, python-dotenv, requests, uagents
- apps/web/package.json: @tailwindcss/postcss@^4, axios@^1.13.5, eslint@^9, eslint-config-next@16.1.6, lucide-react@^0.564.0, next@16.1.6, react@19.2.3, react-dom@19.2.3, react-webcam@^7.2.0, tailwindcss@^4
- backend/requirements.txt: absl-py@==2.4.0, aiohappyeyeballs@==2.6.1, aiohttp@==3.13.3, aiohttp-retry@==2.9.1, aiosignal@==1.4.0, aiosqlite@==0.22.1, annotated-doc@==0.0.4, annotated-types@==0.7.0, anyio@==4.12.1, argon2-cffi@==25.1.0, argon2-cffi-bindings@==25.1.0, attrs@==25.4.0, audioop-lts@==0.2.2, audioread@==3.1.0, bcrypt@==5.0.0, certifi@==2026.1.4, cffi@==2.0.0, charset-normalizer@==3.4.4, click@==8.3.1, contourpy@==1.3.3, cryptography@==46.0.5, cycler@==0.12.1, decorator@==5.2.1, dnspython@==2.8.0, ecdsa@==0.19.1, email-validator@==2.3.0, fastapi@==0.129.0, flatbuffers@==25.12.19, fonttools@==4.61.1, frozenlist@==1.8.0, greenlet@==3.3.1, h11@==0.16.0, idna@==3.11, joblib@==1.5.3, kiwisolver@==1.4.9, lazy_loader@==0.4, librosa@==0.11.0, llvmlite@==0.46.0, matplotlib@==3.10.8, mediapipe@==0.10.32, msgpack@==1.1.2, multidict@==6.7.1, numba@==0.63.1, numpy@==2.3.5, opencv-contrib-python@==4.13.0.92, packaging@==26.0, passlib@==1.7.4, pillow@==12.1.1, platformdirs@==4.9.0, pooch@==1.9.0, propcache@==0.4.1, pyasn1@==0.6.2, pycparser@==3.0, pydantic@==2.12.5, pydantic_core@==2.41.5, PyJWT@==2.11.0, pyparsing@==3.3.2, python-dateutil@==2.9.0.post0, python-dotenv@==1.2.1, python-jose@==3.5.0, python-multipart@==0.0.22, requests@==2.32.5, rsa@==4.9.1, scikit-learn@==1.8.0, scipy@==1.17.0, six@==1.17.0, sounddevice@==0.5.5, soundfile@==0.13.1, soxr@==1.0.0, SQLAlchemy@==2.0.46, standard-aifc@==3.13.0, standard-chunk@==3.13.0, standard-sunau@==3.13.0, starlette@==0.52.1, threadpoolctl@==3.6.0, twilio@==9.10.1, typing_extensions@==4.15.0, typing-inspection@==0.4.2, urllib3@==2.6.3, uvicorn@==0.40.0, yarl@==1.22.0
- frontend/package.json: autoprefixer@^10.4.24, axios@^1.13.5, eslint@^9, eslint-config-next@16.1.6, lucide-react@^0.564.0, next@16.1.6, postcss@^8.5.6, react@19.2.3, react-dom@19.2.3, react-webcam@^7.2.0, tailwindcss@^3.4.19
- patient-agent/requirements.txt: fastapi, librosa, mediapipe, numpy, opencv-python-headless, protobuf@>=3.20,<4, pydantic, python-multipart, soundfile, uvicorn
- stroke-fast/agents/requirements.txt: pydantic, python-dotenv, requests, uagents
- stroke-fast/apps/web/package.json: @tailwindcss/postcss@^4, axios@^1.13.5, eslint@^9, eslint-config-next@16.1.6, lucide-react@^0.564.0, next@16.1.6, react@19.2.3, react-dom@19.2.3, react-webcam@^7.2.0, tailwindcss@^4
- stroke-fast/patient-agent/requirements.txt: fastapi, librosa, mediapipe, numpy, opencv-python-headless, protobuf@>=3.20,<4, pydantic, python-multipart, soundfile, uvicorn
- web/package.json: @types/node@^20.11.5, @types/react@^18.2.48, @types/react-dom@^18.2.18, @types/uuid@^9.0.7, autoprefixer@^10.4.17, cross-env@^7.0.3, eslint@^8.56.0, eslint-config-next@^14.1.0, next@^14.1.0, postcss@^8.4.33, react@^18.2.0, react-dom@^18.2.0, socket.io@^4.6.1, socket.io-client@^4.6.1, tailwindcss@^3.4.1, ts-node@^10.9.2, typescript@^5.3.3, uuid@^9.0.1, zod@^3.22.4

### Recent commits (newest first)

- Merge branch 'main' of https://github.com/laurie-png/cognivi
- More frontend edits
- Add StrokePager backend logic v2
- Remove legacy pages that use react-router-dom (fix Vercel build)
- API Connect and Frontend Edits
- feat: Remove all fake data — real camera + microphone + patient-agent inference only
- feat: Merge colleague branches - Andrew's web/ frontend (Next.js+Socket.io) + Devi's stroke_backend + endpoint integration
- Add StrokePager backend logic
- feat: Restore backend & frontend source code, add project docs
- feat: Add stroke-fast module (Patient Agent, Agents, Cloud API, Frontend Workflow, Docs)
- chore: add .gitignore, remove cached files from tracking
- feat: Phase 10 - Production Integration (Un-mocked Backend/Frontend/Cloud)
- feat: Phase 8 & 9 - Agents, Structured Assessment, Real Cloud Logic
- feat: All Phases 0-7 Implemented (Face, Arm, Speech, Fusion, Cloud, GenAI)

## Key source files (fetched from GitHub, selected and truncated for size)

### SETUP_PRODUCTION.md

```markdown
# 🚀 StrokePager Production Setup

To move from "Mock Mode" to "Production Mode", follow these steps:

## 1. Configure Secrets
Copy `.env.production.template` to `.env`:
```bash
cp .env.production.template .env
```
Fill in the values. **R2 is critical** for video uploads. **OpenAI** is critical for summaries.

## 2. Deploy Cloud Backend (Modal)
You must deploy the cloud API to get a real public URL.
```bash
# Install Modal if needed
pip install modal
modal setup

# Deploy
modal deploy cloud/modal_api/main.py
```
**Copy the URL** provided by Modal (e.g., `https://algo-expert--strokepager-cloud-event.modal.run`) and paste it into `.env` as `CLOUD_API_URL`.

## 3. Configure Patient Agent & Frontend
The system is designed to read from `.env` or Environment Variables.

### Patient Agent (Python)
It will read `CLOUD_API_URL` from the `.env` file in the root `stroke-fast/` directory (or you can export it).

### Frontend (Next.js)
You need to create `apps/web/.env.local` with:
```
NEXT_PUBLIC_CLOUD_API_URL=https://<YOUR_MODAL_URL_HERE>
```

## 4. Run Everything
```bash
# 1. Start Patient Agent (now connects to Cloud)
cd patient-agent
uvicorn app:app --port 8000

# 2. Start Frontend
cd apps/web
npm run dev

# 3. Start Workflow Agents
cd agents
python scheduler_agent.py &
```

```

### AUDIT_REPORT.md

```markdown
# 🕵️‍♂️ StrokePager Technical Audit Report

**Date:** Feb 14, 2026  
**Auditor:** Antigravity (Senior Agent Engineer)  
**Target:** TreeHacks Implementation Compliance

---

## 1. Executive Summary

**Ready to Demo?** ⚠️ **NO (Requires Integ Fixes)**
While the **Patient Agent** (Inference) and **Frontend Workflow** (Strict 29s) are solid, the **End-to-End Integration** is broken because the Frontend and Patient Agent are currently hitting **Hardcoded Mocks** instead of the actual Modal Cloud API.

**Top 3 Risks:**
1.  **Doctor Dashboard is Fake**: `apps/web/src/services/api.js` returns hardcoded static patients. It does *not* fetch from the Cloud DB.
2.  **Red Trigger is Mocked**: `patient-agent/app.py` prints "Uploading to R2" but does *not* actually make the HTTP request to the Cloud to get the URL or upload the file.
3.  **Missing Sponsors**: NVIDIA (Speech) and Browserbase (Evidence) are completely missing from the codebase.

---

## 2. Feature Compliance Checklist

| Feature | Status | Evidence / Notes | Fix Rec |
| :--- | :--- | :--- | :--- |
| **Patient UI (Webcam/Mic)** | ✅ **PASS** | `apps/web/src/app/patient/page.js` implements strict 29s workflow. | N/A |
| **Local Inference (FastAPI)** | ✅ **PASS** | `patient-agent/app.py` runs MediaPipe/Librosa. | N/A |
| **Cloud Endpoints (Modal)** | ✅ **PASS** | `cloud/modal_api/main.py` has all required routes. | N/A |
| **R2 Storage Integration** | ⚠️ **PARTIAL** | logic exists in `main.py` (lines 17-27) but `patient-agent` mocks the call. | Connect `patient-agent` to Cloud URL. |
| **Doctor Dashboard** | ❌ **FAIL** | `services/api.js` lines 28-45 return static JSON array. | Fetch from `CLOUD_URL/patients`. |
| **Agents (Fetch.ai)** | ✅ **PASS** | `agents/` folder has 3 running agents. | N/A |
| **Safety/Disclaimers** | ⚠️ **PARTIAL** | UI mentions "Risk Score", needs clearer "Not Medical Advice" footer. | Add Footer. |

---

## 3. Sponsor Compliance Checklist

| Sponsor | Claimed Usage | Status | Gap Analysis & Fix |
| :--- | :--- | :--- | :--- |
| **Modal** | Web Endpoints | ✅ **PASS** | `main.py` is a valid Modal app. |
| **Fetch.ai** | Workflow Agents | ✅ **PASS** | `agents/` implements Scheduler/Escalation. |
| **Cloudflare R2** | Video Storage | ⚠️ **PARTIAL** | Code exists but is bypassed by mocks in `app.py`. |
| **NVIDIA** | Speech AI (NeMo/Riva) | ❌ **FAIL** | Using `librosa` (CPU). **Fix:** Use NVIDIA API or documented fallback. |
| **Browserbase** | Evidence Scraping | ❌ **FAIL** | No code found. **Fix:** Add a minimal scraper for "Stroke Guidance". |
| **OpenAI** | Summaries | ⚠️ **PARTIAL** | `genai.py` has template fallback. Needs API Key integration. |
| **Vercel** | Hosting | ⚠️ **PARTIAL** | `next.config.mjs` exists, but no `vercel.json` or deploy script seen. |

---

## 4. Verification Commands

To verify the current (mocked) state:

**1. Start Cloud (Mock or Real)**
```bash
# Terminal 1
modal serve cloud/modal_api/main.py
# OR
python agents/mock_cloud.py # (Port 8001)
```

**
[truncated — 1203 more characters]
```

### agents/requirements.txt

```
uagents
requests
pydantic
python-dotenv

```

### patient-agent/requirements.txt

```
mediapipe
protobuf>=3.20,<4
fastapi
uvicorn
pydantic
numpy
opencv-python-headless
python-multipart
librosa
soundfile

```

### frontend/package.json

```
{
  "name": "frontend",
  "version": "0.1.0",
  "private": true,
  "type": "module",
  "scripts": {
    "dev": "next dev",
    "dev:turbo": "next dev --turbopack",
    "build": "next build",
    "start": "next start",
    "lint": "eslint"
  },
  "dependencies": {
    "axios": "^1.13.5",
    "lucide-react": "^0.564.0",
    "next": "16.1.6",
    "react": "19.2.3",
    "react-dom": "19.2.3",
    "react-webcam": "^7.2.0"
  },
  "devDependencies": {
    "autoprefixer": "^10.4.24",
    "eslint": "^9",
    "eslint-config-next": "16.1.6",
    "postcss": "^8.5.6",
    "tailwindcss": "^3.4.19"
  }
}

```

### web/package.json

```
{
  "name": "strokepager-web",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "ts-node --transpile-only server.ts",
    "build": "next build && tsc -p tsconfig.server.json",
    "start": "cross-env NODE_ENV=production node dist/server.js",
    "lint": "next lint"
  },
  "dependencies": {
    "next": "^14.1.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "socket.io": "^4.6.1",
    "socket.io-client": "^4.6.1",
    "zod": "^3.22.4",
    "uuid": "^9.0.1"
  },
  "devDependencies": {
    "@types/node": "^20.11.5",
    "@types/react": "^18.2.48",
    "@types/react-dom": "^18.2.18",
    "@types/uuid": "^9.0.7",
    "autoprefixer": "^10.4.17",
    "cross-env": "^7.0.3",
    "eslint": "^8.56.0",
    "eslint-config-next": "^14.1.0",
    "postcss": "^8.4.33",
    "tailwindcss": "^3.4.1",
    "ts-node": "^10.9.2",
    "typescript": "^5.3.3"
  }
}

```

### backend/requirements.txt

```
absl-py==2.4.0
aiohappyeyeballs==2.6.1
aiohttp==3.13.3
aiohttp-retry==2.9.1
aiosignal==1.4.0
aiosqlite==0.22.1
annotated-doc==0.0.4
annotated-types==0.7.0
anyio==4.12.1
argon2-cffi==25.1.0
argon2-cffi-bindings==25.1.0
attrs==25.4.0
audioop-lts==0.2.2
audioread==3.1.0
bcrypt==5.0.0
certifi==2026.1.4
cffi==2.0.0
charset-normalizer==3.4.4
click==8.3.1
contourpy==1.3.3
cryptography==46.0.5
cycler==0.12.1
decorator==5.2.1
dnspython==2.8.0
ecdsa==0.19.1
email-validator==2.3.0
fastapi==0.129.0
flatbuffers==25.12.19
fonttools==4.61.1
frozenlist==1.8.0
greenlet==3.3.1
h11==0.16.0
idna==3.11
joblib==1.5.3
kiwisolver==1.4.9
lazy_loader==0.4
librosa==0.11.0
llvmlite==0.46.0
matplotlib==3.10.8
mediapipe==0.10.32
msgpack==1.1.2
multidict==6.7.1
numba==0.63.1
numpy==2.3.5
opencv-contrib-python==4.13.0.92
packaging==26.0
passlib==1.7.4
pillow==12.1.1
platformdirs==4.9.0
pooch==1.9.0
propcache==0.4.1
pyasn1==0.6.2
pycparser==3.0
pydantic==2.12.5
pydantic_core==2.41.5
PyJWT==2.11.0
pyparsing==3.3.2
python-dateutil==2.9.0.post0
python-dotenv==1.2.1
python-jose==3.5.0
python-multipart==0.0.22
requests==2.32.5
rsa==4.9.1
scikit-learn==1.8.0
scipy==1.17.0
six==1.17.0
sounddevice==0.5.5
soundfile==0.13.1
soxr==1.0.0
SQLAlchemy==2.0.46
standard-aifc==3.13.0
standard-chunk==3.13.0
standard-sunau==3.13.0
starlette==0.52.1
threadpoolctl==3.6.0
twilio==9.10.1
typing-inspection==0.4.2
typing_extensions==4.15.0
urllib3==2.6.3
uvicorn==0.40.0
yarl==1.22.0

```

### stroke-fast/agents/requirements.txt

```
uagents
requests
pydantic
python-dotenv

```

### stroke-fast/patient-agent/requirements.txt

```
mediapipe
protobuf>=3.20,<4
fastapi
uvicorn
pydantic
numpy
opencv-python-headless
python-multipart
librosa
soundfile

```

### apps/web/package.json

```
{
  "name": "frontend",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "eslint"
  },
  "dependencies": {
    "axios": "^1.13.5",
    "lucide-react": "^0.564.0",
    "next": "16.1.6",
    "react": "19.2.3",
    "react-dom": "19.2.3",
    "react-webcam": "^7.2.0"
  },
  "devDependencies": {
    "@tailwindcss/postcss": "^4",
    "eslint": "^9",
    "eslint-config-next": "16.1.6",
    "tailwindcss": "^4"
  }
}

```

[126 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]