
In the fairy tale, twelve princesses sneak out every night and dance until their slippers wear through. The story never says what music they danced to. We figure it was whatever they wanted.
Dance Fantasy turns any song into an original dance routine, teaches it with a 3D storybook dancer, and scores every beat through your webcam. Play solo, with friends on one laptop, or in an online ballroom from your phones.

Dance games only let you dance to songs someone already choreographed by hand. If your song isn't on the list, you can't dance to it. We wanted a game that works with any song, even one you recorded yesterday, and feels like a night at the ball instead of a workout.


- Any song becomes a routine. The server finds the beats and sections, then choreographs moves that land on downbeats and repeat on every chorus. Pick 87 storybook moves, 249 clips from motion-captured dancers (AIST++), or a mix.
- A 3D princess or prince teaches it, with upcoming moves sliding in as cue cards.
- Your webcam scores every beat as Perfect, Good, OK, or Miss, with combos and a highlight reel. Pose tracking runs in the browser, so video never leaves your device.
- Viral dances are built in. If a song has a famous dance, those moves land on the chorus and score double.
- A Royal Herald announces you by name, calls out your combos, and gives a final verdict.
- Play together. Up to 8 friends join a ballroom from their phones by QR code and start on the same beat, in Versus or Crew mode. Party mode tracks 2–4 people on one laptop.
- Learn mode, a Hall of Fame for every song, and 16 badges to earn.



- Listen: librosa finds the tempo, beats, downbeats, and sections, and recognizes every chorus as the same music.
- Choreograph: a beam search picks moves for each section, snaps them to downbeats, and pins signature moves to the chorus.
- Dance: MediaPipe tracks 17 joints in the browser. Poses are scaled to your torso, so height and camera distance don't matter, and each beat compares your limb directions to the dancer's.
- Together: devices sync to the server clock and start from one shared timestamp.
The 3D dancer is simple shapes in three.js. Routines are stored as 2D poses, so it recovers depth from how short each limb looks on screen.

The React, TypeScript, and Vite frontend runs on Vercel. The FastAPI backend runs on Vultr, with a copy on Vercel as a fallback. One shared schema keeps web and server in sync, and contract tests fail if they drift.

Meta Muse: the Royal Herald
Muse Spark gives the game a commentator who reacts to your round.
- Intro: when the ballroom doors open, Muse writes a welcome with your name and song. We request it during calibration, so it's ready when the music starts.
- Verdict: when the music stops, Muse writes a closing line from your score, grade, best move, and longest combo.
- No dead air: instant errors retry up to three times, then fall back to an older Muse model, then to Gemini, then to a hand-written line. Every line is length-limited and kept family-friendly.

Google Gemini: three jobs
- The herald's voice. Gemini text-to-speech performs each line with a directed delivery ("an ecstatic royal herald"). Lines are voiced once and cached, so call-outs play instantly while the music dips.
- Viral dance to choreography. Gemini reads SerpApi's results, names the song's signature dance, and maps it onto moves in our library.
- Backup writer for the herald when Muse is busy.

SerpApi: search that changes the routine
Search results don't just show up as links. They change what you dance:
- SerpApi searches Google and YouTube for the song's dance challenge.
- Gemini identifies the signature move.
- Our choreographer pins it to every chorus, a banner announces it ("Signature: YMCA arms"), and those beats score double.
- The original video is linked. If we don't have the move yet, a "Learn the real dance" card credits the creator.
Lookups only run for known songs, with per-visitor quotas and daily caps stored in the database.

Tiger Data: the memory of the ball
A dance is a time series: a score on every beat, from every dancer. Tiger Data (Postgres with TimescaleDB) stores it, plus ballrooms, chat, accounts, and friends.
- Hypertables hold every round and every beat danced in a ballroom.
- Continuous aggregates compute each song's "hardest moments" (the beats that trip everyone up) and each dancer's daily score for the weekly Hall of Fame.
- The same database enforces rate limits on paid AI and search calls.
We pinned our Vercel functions to Portland, next to our us-west-2 database, which saves 60–90 ms per query.

Vultr: the always-on backend
librosa's beat tracker compiles on its first run, which took about 33 seconds on a fresh serverless instance. So our FastAPI backend (song analysis, choreography, and ballrooms) runs on an always-on Vultr Cloud Compute instance. It compiles once at boot, new songs take about a second, and librosa's 430 MB of dependencies don't need to fit a serverless bundle limit. Vercel keeps a copy of the API as a fallback, and ballroom data lives in Tiger Data, so a restart loses nothing.

.Tech: DanceFantasy.tech
DanceFantasy.tech is the game's home and the one link we share everywhere. It's short, easy to say when inviting friends to a ballroom, and fits a game that runs pose tracking and live AI in a browser tab.

Cursor, Grok, and Claude Code
- Cursor was our editor for hands-on work: Agent mode to build features on our branches, Tab completion for the move library's pose data, and Cmd+K for quick UI fixes.
- Grok handled research and automations. Its live X access found which songs have viral dances and who started them, which seeded our signature-dance table. Scheduled Grok tasks kept sending us trending challenges while we built.
- Claude Code ran our overnight push as parallel agent workflows, one feature per git branch: the storybook UI, 3D dancers, ballrooms, party mode, accounts, and the herald's voice. Review agents checked each branch before merging, and an automated security review caught a path traversal bug in our upload endpoint before it shipped.

| CATEGORY | TECHNOLOGIES |
|---|---|
| Frontend | React, TypeScript, Vite, three.js |
| Pose tracking | MediaPipe (runs in the browser) |
| Audio analysis | librosa, numba |
| Backend | FastAPI, Python, Pydantic |
| AI | Meta Muse Spark, Google Gemini (text and text-to-speech) |
| Search | SerpApi (Google, YouTube) |
| Database | Tiger Data (Postgres, TimescaleDB) |
| Hosting | Vultr, Vercel, Vercel Blob, DanceFantasy.tech |
| Dev tools | Cursor, Grok, Claude Code |

- Audio analysis on serverless. librosa's dependencies weigh about 430 MB, nearly twice Vercel's 225 MB limit. The fallback API needed large functions and direct-to-Blob uploads, and the main backend moved to Vultr.
- Webcam lag. Cameras run 100–300 ms behind, so perfect dancers scored "late." A clap-along calibration measures the delay and subtracts it.
- Multiplayer without a socket server. Short polling plus a shared start time keeps up to 8 devices on the same beat and survives restarts.
- Depth from flat poses. We had to rebuild knee lifts and spins in 3D from 2D joint positions.
- Flaky models on the last morning. Muse threw "model not found" errors and Gemini hit its quota, which is why the herald now has three layers of fallback.

- Any song becomes an original, playable routine in seconds.
- A web search result becomes a move on your chorus.
- Multiplayer across phones with no game server.
- A 3D dancer with no 3D models.
- Webcam video never leaves the browser.
- It's live at DanceFantasy.tech.

- Latency beats accuracy. A correct score that arrives late feels broken.
- Every live AI call needs a fallback. Models fail at the worst moment.
- A theme does a lot of work. The same scoring engine feels like homework in a fitness app and like a party at the ball.

- Record your own moves into the library.
- Score in true 3D using MediaPipe's depth estimates.
- Bigger ballrooms with live connections on Vultr, plus weekly tournaments.
- More motion-captured dancers and genres.
Try it at DanceFantasy.tech. Midnight is coming.
Credits: real-dancer moves from AIST++ (© Google LLC, CC BY 4.0). Sample songs by Kevin MacLeod and Karissa Hobbs (CC BY 3.0).
Devpost form fields
Tagline: Bring any song to the ball.
Built with: .tech, aist++, claude-code, cursor, fastapi, gemini, grok, librosa, mediapipe, meta-muse, postgresql, python, react, serpapi, three.js, tiger-data, timescaledb, typescript, vercel, vite, vultr
Try it out: https://dancefantasy.tech · https://github.com/luvudeshi/dance-fantasy
Built With
- aist++
- claude-code
- cursor
- fastapi
- gemini-tts
- google-gemini
- grok
- librosa
- mediapipe
- meta-muse
- numpy
- postgresql
- python
- react
- serpapi
- three.js
- tiger-data
- timescaledb
- typescript
- vercel
- vercel-blob
- vite
- web-audio-api


Log in or sign up for Devpost to join the conversation.