Pick a song and Orbitune turns it into a planet you can orbit. The project has two parts:
client/– the website (Vite + Three.js)server/– the API (Express on Node), which searches songs on Deezer, runs the Python audio analyser, stores planets in MongoDB and asks ElevenLabs for landmark narration
- Node.js 22 (20.12 or newer works; the server uses
process.loadEnvFile) - Python 3 with
pip(on Windows the server callspy, elsewherepython3) - ffmpeg on your
PATH, so librosa can decode MP3s - A MongoDB database (local or Atlas) for saved planets
- API keys for Gemini and, for narration, ElevenLabs
Create server\.env:
GEMINI_API_KEY=your-gemini-key
MONGODB_URI=mongodb://localhost:27017
MONGODB_DB=orbitune # optional, defaults to "orbitune"
ELEVENLABS_API_KEY=your-elevenlabs-key
ELEVENLABS_VOICE_ID=your-voice-id
# PORT=3000 # optional
# ORBITUNE_PYTHON=C:\path\to\python.exe # optional, overrides py/python3Both the Node server and analyse.py read this file. Without the ElevenLabs
values everything works except /narrate.
In one terminal, install and start the API server (port 3000):
cd server
npm install
py -m pip install -r requirements.txt --target Lib\site-packages
npm startThe --target Lib\site-packages install keeps the Python libraries inside the
project; the server adds that folder to PYTHONPATH automatically. A normal
pip install -r requirements.txt (or a virtualenv plus ORBITUNE_PYTHON)
also works. If the Python libraries are missing, /analyse returns a 502.
In a second terminal, start the frontend (port 5173):
cd client
npm install
npm run devOpen the URL Vite prints (usually http://localhost:5173). Vite proxies
/search, /audio, /analyse, /narrate and /planets to the server, so
add new server routes to client\vite.config.js too.
Other pages:
/– song picker and galaxy/mvp.html– demo planet viewer/home.htmland/world-test.html– extra pages for development
cd client
npm testBuild the client, then let Express serve it from client\dist:
cd client
npm run build
cd ..\server
npm startOpen http://localhost:3000.
The Dockerfile installs Python, ffmpeg and both Node apps, builds the client
and starts the server:
docker build -t orbitune .
docker run -p 3000:3000 --env-file server\.env orbitune.env is not copied into the image, so pass it with --env-file.
With the API server running and the ElevenLabs settings configured, save narration files into Vite's public cache:
node scripts\prebake-narration.js path\to\world.json alors-on-danseThe world JSON must contain a landmarks array and may include
narratorStyle. Pass an optional third argument to use a different API server
URL. The generated client\public\cache\<songId> files are served directly,
so the MVP can play them without calling /narrate.