I built a free, privacy-first MVP called StanceLoop: a live, browser-based AI coach that watches you train via webcam and gives real-time form feedback, rep counts, and spoken cues—100% locally on your device.The Motivation
Most fitness tech either requires expensive hardware or uploads your private camera feed to external servers. I wanted to solve a simple problem: Could a browser and an on-device pose model act as an honest, real-time coach without sending a single frame to a server? StanceLoop was built to prove that private, accurate form feedback can run frame-by-frame on any standard browser.What It Does: Zero Backend, 100% Private
StanceLoop turns your webcam into an active coaching tool with no accounts, no server uploads, and no tracking:Core Drills: Detects and counts push-up reps, times handstand holds, and tracks extension-and-return for jab-cross shadowboxing combinations.Real-Time Guidance: Provides spoken cues, skeleton overlays, and haptic feedback during your sets.Honest Scoring: If your full body isn’t in frame or camera alignment is lost, the app explicitly tells you instead of guessing or faking reps.Async Ghost Duels: Share a simple URL containing drill rules to challenge friends—no central server or database required.Local AI Coach: Optionally connects to a local LLM server (like Ollama running on localhost) for personalized coaching advice.How We Built ItFrontend: React 19 and TypeScript, bundled with Vite 6 and deployed as a static site to GitHub Pages.Computer Vision: MediaPipe Pose Landmarker (@mediapipe/tasks-vision) with custom landmark smoothing, confidence gating, and rule-based state machines.Testing: 340+ unit tests with Vitest and 11 end-to-end tests with Playwright running in CI.Challenges & LearningsThe Subpath Blank Screen: The initial deploy showed a blank page due to absolute asset paths resolving incorrectly on GitHub Pages. Fixed by configuring relative base path handling in Vite.Jitter vs. Latency: Raw camera pose points jitter constantly. Balancing instant audio feedback with noisy pose data required landmark smoothing and cue cooldowns so feedback stays useful instead of chaotic.Honesty Over Everything: CV coaching state machines are hard because pose models love to guess. Engineering the app to recognize when it can’t see you properly was key to making the feedback feel real.What We’re Proud OfA complete, real-time computer vision app running offline-capable in the browser with zero backend costs.A robust testing suite (350+ combined tests) ensuring the state machine rules stay reliable across updates.Built-in versioned consent and privacy disclosures directly in the UI.Try it out:Live App: https://hustlenix.github.io/stance-loop/Source Code: https://github.com/Hustlenix/stance-loopTech Stack: React 19, TypeScript, MediaPipe Pose, Vite 6, Vitest, Playwright, GitHub Pages.