Problem
Most gym-goers get injured not because they have bad form, but because they start out good and break form as they get tired. Existing fitness apps treat form as a static snapshot: they won't tell you that rep 7 is where you started pressuring your joints. That's how injuries happen.
Our Solution
FormGuard tracks form breakdown in real time across a set. Using MediaPipe's pose estimation in the browser, the app analyses every rep as it happens, measuring joint angles, depth, and movement consistency. When the set ends, users see exactly which rep their form collapsed, by how much, and what injury risk that creates. An AI coach then gives specific recommendations tied to what actually happened in their data.
How we built it
The frontend is built in Next.js and React, with MediaPipe running client-side for pose detection. We calculate angles between body landmarks to detect rep state, depth, and form quality for squats, bicep curls, and deadlifts. The backend is Python FastAPI handling session management, fatigue analysis, and AI coaching via Gemini 2.5 Flash. Supabase handles auth and storage.
Challenges and Accomplishments
The hardest problem was accurate rep detection. Distinguishing partial reps from full reps and building a baseline that reflects genuine good form took significant iteration. Mobile detection also required tuning since MediaPipe thresholds that work on laptops are too strict for phones in gym lighting. One team member's laptop couldn't run the project, losing us manpower mid-hackathon.
We're proud of getting fatigue detection genuinely working. The form score graph shows a real downward trend as reps get sloppier. We also shipped multiple exercises, a leaderboard, session history, and AI coaching within the hackathon window.
Next steps are more exercises, a trained ML model, and a social layer with friend systems and direct challenges.
Log in or sign up for Devpost to join the conversation.