Inspiration Fitness and digital media have a weird relationship: it's almost entirely passive. You scroll past workout videos you'll never do, or you half-count your own reps and quietly lie to yourself. Meanwhile, random video chat — Omegle, Chatroulette — proved people love spontaneous, face-to-face connection, but it never had a point.

The hackathon theme — Disrupt, Display, Discover — gave us the frame. What if the camera wasn't a screen you watch, but the game itself? We set out to disrupt passive fitness media by making your body the controller, use computer vision to display your form in real time, and let people discover opponents, friends, and their own weaknesses. That's Mogisthenics: Omegle, for calisthenics.

What it does Mogisthenics matches you one-on-one with an athlete anywhere in the world for a live, head-to-head fitness battle — all in the browser, no install.

Two game modes: a 60-second Pushup Rep-Off, and a Pose Hold where you match a calisthenics skill pose (L-sit, elbow lever, plank…) as closely as you can. Live AI form tracking (Display): MediaPipe tracks 33 body points ~30x/second. We render a real-time overlay — a coaching cue (GO DOWN / PUSH UP), a depth bar, your elbow angle, and a skeleton that turns green only when the rep is real. It's also the referee: half-reps, jitter, and arm-waving don't count. Global ELO leaderboard + rank tiers: win to climb from Iron to Diamond. Social (Discover): add friends by username and send them live challenge invites anytime — real peer-to-peer video, real-time rep sync. AI coaching: when a round ends, Google Gemini gives each player a personalized tip on what to fix next. Train Solo mode: practice with the full form overlay, no opponent, no ranking. How we built it Frontend: React + TypeScript + Vite + Tailwind, deployed on Vercel. Computer vision: Google MediaPipe Tasks (Pose Landmarker) running fully client-side; we compute joint angles and a custom form score per frame. Real-time video: WebRTC peer-to-peer via PeerJS, with a self-hosted signaling server and dynamic TURN credentials for NAT traversal. Matchmaking & game state: a Node + Socket.io server managing per-mode queues, rooms, live score broadcasts, presence, and the friend-challenge handshake. Auth, leaderboard & social: Supabase — username/password auth plus Postgres tables and SECURITY DEFINER RPCs for ELO (standard K=32) and friendships. AI coaching: Google Gemini generates the post-round tips. Challenges we ran into MediaPipe gave us no visibility data. Our anti-cheat gated reps on landmark visibility — but tasks-vision returns visibility: 0 for every joint on some versions, so suddenly zero reps counted. We had to make the gate only fire when the model actually reports confidence. Tuning anti-cheat without punishing real reps. Our first pass (orientation + hands-on-floor checks) rejected legit camera-facing pushups. We pared it back to a lightweight sanity check plus a timing debounce as the real defense. WebRTC hates strict networks. Peer video would silently fail behind firewalls, so we decoupled the game from the video: reps sync over the socket even when peer video is blocked, and we added TURN relays + a self-hosted signaling server. Never trust the client. The leaderboard was getting spammed with fake names, so we moved to server-side verification of the Supabase auth token — the username now comes from the signed JWT, not the client. Ghost players in matchmaking. Disconnected sockets lingered in queues; we added liveness checks and a periodic sweep so you never "match" with a ghost. Accomplishments that we're proud of Real-time computer vision in the browser with zero install — and it actually scores form, not just draws a skeleton. An anti-cheat that works: the rep counter genuinely won't reward fake movement. A complete real-time multiplayer stack — matchmaking, peer-to-peer video, presence, friend challenges, and a verified ELO leaderboard — built in a hackathon timeframe. Resilience: the match keeps working even when peer video is firewalled. A genuinely fun, on-theme product that turns a passive medium into an interactive one. What we learned The quirks of running MediaPipe in production — frame timing, mirrored-canvas overlays, and that visibility data can't be relied on. WebRTC NAT traversal is hard; STUN isn't enough, and TURN + a fallback path are non-negotiable. Client-side scores are suggestions, not facts — anything that touches a leaderboard has to be verified server-side. Throttling 30fps detection into React state without tanking performance. How to design ELO and a matchmaking/presence system from scratch. What's next for Mogisthenics More exercises: squats, mountain climbers, plank-for-time — our angle-based detector framework makes each one a small addition. Voice coaching: speak the form cues aloud for a hands-free AI trainer. Async "ghost" mode: race a top player's recorded rep pace so the lobby is never empty. Tournaments & best-of-3 matches between friends. Mobile-first layout and a PWA install. Lock down the leaderboard further with a service-role key on the server. Shareable highlight clips of your rounds.

Built With

Share this project:

Updates

Submission history