Inspiration
Muay Thai is taught in group classes. A kru has twenty students and maybe forty seconds of attention for each. You leave knowing you did something wrong, without knowing what. The gap between what you do and what you think you do is invisible without an outside eye — the scarcest thing in the sport.
What it does
Upload a round — shadow boxing, bag work, pads, sparring. You get your strengths with the moment each appeared, and your problems as issue → why it matters → how to fix it → drills. Underneath sits a fourteen-dimension table — guard, chin position, hip rotation, timing, power generation — each marked observed or not observed with a reason, ending in what the footage stopped it seeing.
Three systems run off that: Coach Chat, grounded in your history and citing the analysis it draws on; Training Camps that regenerate when your technique or feedback changes; and the Academy — 3 courses, 29 lessons — where you film a technique and the AI rules competent or needs work.
How we built it
Next.js 16 and React 19 on Vercel, Postgres on Neon through Drizzle, Trigger.dev workers.
The pipeline is the interesting part. Video goes straight to Cloudflare R2, never touching the
app server. A worker validates it, normalises it with ffmpeg, extracts frames at 2 fps, runs
MediaPipe pose estimation on each, then sends six evenly-spaced frames plus a
pose-visibility summary to gemini-2.5-flash. Zod validates the result before anything is
written — a missing section is a failed generation, never a half-rendered page.
Challenges we ran into
Stopping the model describing what it couldn't see. Prompting never fixed it; structure did.
Code decides which dimensions a kind of footage can even be asked about, and observed: false
requires a written reason the schema enforces.
Multi-person footage was worse — it would confidently coach the wrong person. The run now suspends up to four hours, emails "which one is you?", and resumes on your answer.
The expensive one: for two days the production worker ran against the development database, silently completing every analysis as a no-op.
Accomplishments that we're proud of
The loop closes without me. A clip lands and the analysis, the profile synthesis, the plan regeneration and its changelog all run unattended.
And privacy by architecture: video never leaves as video, no third-party JavaScript runs on any page, and a paid Google Cloud project keeps footage out of training data.
What we learned
Building it was never the hard part. The engineering was tractable; distribution isn't.
What's next for KruCoach
Real profit on the site — the only gate still open. Then the blind test: my analysis against a placebo of generic advice, scored by krus who don't know which is which. If it can't beat the placebo, it doesn't deserve the money.
Built With
- auth.js
- cloudflare-r2
- drizzle-orm
- ffmpeg
- google-ai-studio
- google-cloud
- google-gemini
- mediapipe
- neon
- nextjs
- playwright
- postgresql
- posthog
- python
- react
- resend
- sentry
- stripe
- tailwindcss
- trigger.dev
- typescript
- upstash-redis
- vercel-ai-sdk
- vitest
- zod
Log in or sign up for Devpost to join the conversation.