
01 / 02Computer vision / Telehealth / Full-stack
Swasthya
A camera-assisted rehabilitation coach. Patients do prescribed exercises at home while pose tracking runs in the browser and gives form feedback and repetition counts. Therapists prescribe plans, review sessions, chat and hold video consultations.
The problem
Patients recovering at home often exercise without supervision, which leads to incorrect movement and slower recovery.
- Landmarks
- 33, in 3D
- Exercises tracked
- 7
- Video leaves the device
- No
- Test suites
- movement, rehab, realtime
Per the repository README: seven exercises are tracked today, and thresholds are defaults tuned on synthetic geometry that still need on-camera tuning and a physiotherapist's review.
Engineering notes (5)
- 01
Pose runs on the device
MediaPipe's WebAssembly models turn every camera frame into 33 3D body landmarks inside the browser. No video is sent to the server.
- 02
Templates define correct; an engine judges
Each exercise is a template: the joints that must be visible, the shape of a repetition, the form rules and the wording of every correction. A repetition counts only when its angle thresholds are met. If a joint can't be seen clearly, nothing is judged and the person is told how to reposition.
- 03
The language model never judges
A Groq model is optional and can only reword confirmed facts or rewrite a session summary. The app works identically without it, and summaries are labelled automatic, never diagnostic.
- 04
A realtime care loop
Chat and WebRTC signalling run over native WebSockets inside the Next.js app, on a MongoDB-backed signal bus so users on different serverless instances still reach each other. Video is peer-to-peer; the server only relays signalling.
- 05
Idempotent by design
Prescriptions are versioned and immutable. A set is saved in chunks, and the chunking logic ignores a chunk id it has already counted, so retries and double submits never double count.
- Next.js
- TypeScript
- React
- Tailwind CSS
- MediaPipe
- Computer Vision
- MongoDB
- Mongoose
- Clerk
- WebSockets
- WebRTC
- Shadcn UI



