RepRight: AI-Powered Rehabilitation at Home Inspiration Physical therapy is expensive, time-consuming, and inaccessible for most people recovering from injury. Patients need consistent guidance to regain strength after surgery or stroke, but PT appointments are costly and infrequent. We realized modern smartphones already have the sensor hardware to track movement precisely. The missing piece was intelligent software to turn accelerometer data into personalized, adaptive exercises. That's RepRight.

What We Built RepRight uses your iPhone's accelerometer to monitor exercise form and automatically customize difficulty in real time. You strap your phone to your forearm, and the app streams accelerometer data to perform intelligent calibration of your range of motion. A backend AI system analyzes your form, detects errors, and adjusts game difficulty to keep you at the optimal challenge level. The key insight is that rehabilitation isn't one-size-fits-all. RepRight generates custom exercises and continuously adapts them based on real-time performance.

How We Built It The frontend is a React/Vite application that runs game logic at 60fps using Canvas rendering for low-latency visual feedback. The core is a custom signal processing hook that auto-detects movement direction, tracks range of motion during calibration, and computes normalized progress values. We use exponential moving average smoothing for bicep curls to create a smooth feel, and instant response for tricep extensions to prevent lag.

The backend API streams form metrics and rep data from the frontend, analyzes patterns in real time, and sends back customized game parameters. If the user is crushing the difficulty, the backend increases it. If they struggle, it backs off.

Key Challenges Auto-detecting sensor calibration direction regardless of phone orientation took iteration. We solved it by measuring which axis deviates most from rest on the first rep.

Latency was critical. A 200ms delay between movement and visual feedback feels unresponsive. We optimized the entire pipeline to stay under 100ms end-to-end.

Making games useful for rehab while engaging was the third challenge. We designed mechanics that naturally encourage proper form—in the corridor game, you stay between lines by maintaining correct range of motion.

What We Learned Form quality matters more than rep count. By making form the primary feedback and using AI to generate exercises that challenge proper technique, users improve faster with fewer compensatory patterns.

People respond to immediate, specific feedback. Telling someone their range was 89% of calibrated capacity actually changes behavior.

Next Steps Production requires clinical validation comparing RepRight against traditional PT. The backend AI would predict re-injury risk and adjust programs accordingly. Expansion to other body parts would scale the system to hundreds of therapeutic exercises.

RepRight represents a shift from clinic visits to a continuous, adaptive system that evolves as you heal.

    • Built with What languages, frameworks, platforms, cloud services, databases, APIs, or other technologies did you use?
  1. "Try it out" links Add links where people can try your project or see your code.

Built With Frontend:

React + Vite Tailwind CSS + custom CSS variables Canvas (60fps game rendering) JavaScript (signal processing & real-time motion tracking) Backend:

REST API (real-time game customization & exercise generation) AI-powered adaptive difficulty system Real-time performance analysis & form quality scoring Sensor & Data Pipeline:

phyphox Remote Access (accelerometer data via WiFi) iPhone accelerometer (accX, accY, accZ) Exponential moving average smoothing (signal processing) Deployment:

Vite dev server Browser-based (no native app required) Same WiFi or direct IP connection to phone Try It Out GitHub Repository: https://github.com/sidhantsinghvi/RepRight

Prerequisites to Run Locally:

Clone the repo Install phyphox on iPhone: https://phyphox.org/ Run npm install && npm run dev in the frontend directory Connect phone via phyphox Remote Access Open localhost:5173 in your browser

Form tracking visualization: Built into the calibration screen Real-time game adaptation: Watch difficulty adjust as you exercise

Built With

Share this project:

Updates