Turn a dance-class video into a chunked, slow-able, mirror-able practice tool — pose tracking in your browser, optional AI coaching on Vertex AI.
I take dance classes and I'm terrible at remembering choreography. My teacher sends a video of the full routine, but a flat clip is hard to learn from: it's too fast, it's not mirrored, and there's no way to drill one piece at a time. So I built the tool I wanted.
Step by Step runs body-pose tracking on your uploaded video, finds the natural break points in the routine, and gives you a practice workbench to drill each chunk — looped, slowed down, mirrored, with a 5-6-7-8 count-in.
- Upload a choreography video, or paste a direct video URL (a public, CORS-enabled
.mp4/.webm— not a YouTube/TikTok page link). Pose tracking runs locally in your browser — the video file never leaves your machine. - Pose tracking runs on-device via MediaPipe; the tracked motion powers the auto-segmentation and the AI coaching breakdown (it isn't drawn over the video).
- Auto-segmentation splits the routine into chunks at moments where overall body motion dips (pauses, held shapes, direction changes). A sensitivity slider lets you tune how finely it cuts.
- Practice each chunk with a player built for learning: jump to any segment, see exactly where it starts and ends, and drill it in isolation.
- Drill controls: 0.25×–1× speed, mirror toggle, audio on/off, auto-loop the current chunk, optional 5-6-7-8 metronome count-in, previous/next chunk.
- AI coaching (optional): ask Gemini for a plain-language, count-anchored breakdown of how to move through the active chunk's checkpoints, plus a practice tip. Runs server-side on Vertex AI.
- Track ID (optional): identify the song in the video and get Spotify / Apple Music / YouTube links, via AudD. For uploaded files only a few short audio windows (the loudest ~12s segments, up to ~36s total) are sent — never the video; for URL videos the link is passed along. Needs
AUDD_API_TOKEN.
Your video never leaves the browser — all pose tracking is on-device. The only thing sent anywhere is when you explicitly press "Break down this chunk": a short text summary of the tracked key poses (e.g. "both arms raised, weight on left") is sent to Vertex AI. No video, no images.
- No move naming as fact. A lightweight heuristic offers a rough "guess" label, clearly marked as a guess — naming arbitrary dance moves reliably is unsolved, and over-promising it would mislead.
- No scoring of your own dancing vs. the reference (a possible future addition).
- React 19 + TypeScript + Vite, Tailwind CSS v4
- @mediapipe/tasks-vision — on-device pose landmark detection
- Express API server holding the Gemini client (the AI call must be server-side — Vertex AI uses ADC, not a browser-safe key)
- @google/genai on Vertex AI for the coaching feature
Prerequisites: Node.js 18+, and (for AI coaching) the gcloud CLI.
npm install
cp .env.example .env # adjust GOOGLE_CLOUD_PROJECT / region if neededVertex AI authenticates with Application Default Credentials — no API key.
gcloud auth application-default login
gcloud auth application-default set-quota-project YOUR_PROJECT_ID
gcloud services enable aiplatform.googleapis.com --project YOUR_PROJECT_IDRun the SPA and the API server together:
npm run dev:all # Vite on :3000 + API server on :8787 (Vite proxies /api)Or in two terminals: npm run server and npm run dev.
Without ADC set up, the app still works fully — just the AI coaching button will error. (For purely local dev you can instead set GOOGLE_GENAI_USE_VERTEXAI=false and a GEMINI_API_KEY.)
npm run build # builds the SPA into dist/
npm start # Express serves dist/ and /api on $PORT (Vertex via the runtime service account)Other scripts: npm run lint (typecheck).
The included Dockerfile builds the SPA and runs the Express server. On Cloud Run, Vertex AI authenticates via the runtime service account (no key needed) and the AudD token is read from Secret Manager.
One-time setup (per project):
PROJECT=your-project-id
SA=$(gcloud projects describe "$PROJECT" --format='value(projectNumber)')-compute@developer.gserviceaccount.com
gcloud services enable run.googleapis.com cloudbuild.googleapis.com \
artifactregistry.googleapis.com secretmanager.googleapis.com aiplatform.googleapis.com --project "$PROJECT"
# Let the runtime service account call Vertex AI
gcloud projects add-iam-policy-binding "$PROJECT" \
--member="serviceAccount:$SA" --role="roles/aiplatform.user"
# Store the AudD token as a secret the service can read
printf '%s' "YOUR_AUDD_TOKEN" | gcloud secrets create audd-api-token --data-file=- --project "$PROJECT"
gcloud secrets add-iam-policy-binding audd-api-token \
--member="serviceAccount:$SA" --role="roles/secretmanager.secretAccessor" --project "$PROJECT"Deploy (rebuilds and ships in one command):
gcloud run deploy step-by-step --source . --region europe-west3 --allow-unauthenticated \
--set-env-vars GOOGLE_GENAI_USE_VERTEXAI=true,GOOGLE_CLOUD_PROJECT=$PROJECT,GOOGLE_CLOUD_LOCATION=us-central1,VERTEX_MODEL=gemini-2.5-flash \
--set-secrets AUDD_API_TOKEN=audd-api-token:latestDon't set PORT — Cloud Run injects it and the server reads it.
Early but working, and live: https://step-by-step-ie4z26gg6a-ey.a.run.app (Google Cloud Run, europe-west3). Built as a personal project — born from a real problem in my own dance practice.