AI-powered music personality analyzer with custom track generation. Like Spotify Wrapped meets AI music generation!
- 🎵 Analyze your Spotify listening history with AI
- 🤖 Get personalized insights about your music taste
- 🎼 Generate 8 custom AI tracks based on your preferences
- 🎨 Beautiful animated presentation with slides
- 🔐 Secure Spotify OAuth integration
- 💾 Session persistence across page refreshes
- Node.js 18+ and npm
- Spotify Developer Account
- Anthropic API Key (Claude)
- ElevenLabs API Key
-
Clone the repository
git clone https://github.com/yourusername/elevenlabs-wrap.git cd elevenlabs-wrap -
Install dependencies
npm install
-
Configure environment variables
Create
apps/api/.env:# Spotify OAuth (get from https://developer.spotify.com/dashboard) SPOTIFY_CLIENT_ID=your_client_id SPOTIFY_CLIENT_SECRET=your_client_secret REDIRECT_URI=http://127.0.0.1:3001/auth/callback # Frontend URL FRONTEND_URL=http://127.0.0.1:3000 # AI API Keys ANTHROPIC_API_KEY=your_anthropic_key ELEVENLABS_API_KEY=your_elevenlabs_key # App Config SESSION_SECRET=your_random_secret_here NODE_ENV=development PORT=3001
Create
apps/web/.env:VITE_API_URL=http://127.0.0.1:3001
-
Set up Spotify App
- Go to Spotify Developer Dashboard
- Create a new app
- Add redirect URI:
http://127.0.0.1:3001/auth/callback - Copy Client ID and Client Secret to your
.envfile
-
Run the app
npm run dev
That's it! Both backend and frontend will start:
- 🎨 Frontend: http://127.0.0.1:3000
- 🔧 API: http://127.0.0.1:3001
elevenlabs-wrap/
├── apps/
│ ├── api/ # Express.js backend
│ │ ├── src/
│ │ │ ├── modules/ # Feature modules
│ │ │ │ ├── auth/ # Spotify OAuth
│ │ │ │ ├── ai-analysis/ # Claude AI analysis
│ │ │ │ ├── music-generation/ # ElevenLabs API
│ │ │ │ └── wrap-stats/ # Spotify stats
│ │ │ └── routes/ # API routes
│ │ └── server.js # Entry point
│ │
│ └── web/ # React + Vite frontend
│ └── src/
│ ├── components/ # React components
│ └── App.tsx # Main app
│
├── docs/ # Documentation
├── scripts/ # Dev utilities
└── package.json # Root workspace config
Development:
npm run dev- Start both API and web (recommended)npm run dev:api- Start API onlynpm run dev:web- Start web only
Production:
npm run start:api- Start API in production modenpm run start:web- Start web in production mode
See RAILWAY-DEPLOYMENT.md for deploying to Railway.
Quick deploy checklist:
- Push code to GitHub
- Create Railway project from GitHub
- Deploy backend service with environment variables
- Deploy frontend service with API URL
- Update Spotify redirect URIs
- Test the deployment
- Go to Spotify Developer Dashboard
- Create an app
- Get Client ID and Client Secret
- Sign up at Anthropic Console
- Generate an API key
- Sign up at ElevenLabs
- Get your API key from Profile → API Keys
Frontend:
- React 18
- Vite
- TailwindCSS
- Framer Motion
- Radix UI
Backend:
- Node.js
- Express.js
- Spotify Web API
- Anthropic Claude API
- ElevenLabs API
- User logs in with Spotify OAuth
- Backend fetches top artists, tracks, and recently played songs
- Claude AI analyzes music taste and estimates "music age"
- ElevenLabs generates 8 custom tracks based on analysis
- Frontend displays animated slides with insights
- Music plays as user navigates through their wrapped
"Redirect URI mismatch"
- Ensure Spotify redirect URI exactly matches:
http://127.0.0.1:3001/auth/callback
CORS errors
- Check
FRONTEND_URLin backend.envmatches your frontend URL
API calls failing
- Verify
VITE_API_URLin frontend.envpoints to backend
Session not persisting
- Check browser localStorage for
elevenlabs_analysisandelevenlabs_tracks - Verify cookies are enabled
ISC
Built during the ElevenLabs Hackathon by padel enthusiasts 🎾