A fun web app that roasts your music taste based on a song choice. Using Spotify's API to get song data, LRCLIB for lyrics retrieval, and OpenRouter's AI models to generate hilarious, sarcastic, and personalized roasts of your music preferences.
- Real-time Song Search: Search the entire Spotify library with instant album artwork previews.
- AI-Powered Analysis: Get a personalized, savage roast of your music taste based on lyrics and musical features.
- Streaming Response: Watch the AI "Swork" type out your roast in real-time.
- Modern Aesthetic: A premium, Spotify-inspired interface with dark/light mode support.
- Zero-Key Lyrics: Uses LRCLIB for lyrics, meaning one less API key for you to manage.
- Backend: Python with FastAPI
- Frontend: HTML5, Vanilla CSS, JavaScript (ES6+)
- AI Integration: OpenAI SDK via OpenRouter
- Package Management: uv (ultra-fast Python package manager)
- Containerization: Docker & Docker Compose
- APIs:
- Spotify: For song data and searching
- LRCLIB: For free, keyless lyrics retrieval
- OpenRouter: For accessing frontier AI models (defaults to Gemini 1.5 Flash)
Before setting up the project, you'll need:
- Docker
- Docker Compose
- API Accounts:
- A Spotify Developer account
- An OpenRouter account
git clone <repository-url>
cd Spotify-Wrappedmake setupThis will create a .env file from the template.
Edit the .env file and add your actual API keys:
# Spotify API Credentials
SPOTIFY_CLIENT_ID=your_id_here
SPOTIFY_CLIENT_SECRET=your_secret_here
# OpenRouter API Key
OPENROUTER_API_KEY=your_key_heremake docker-runThe application will be available at http://localhost:8000.
If you have uv installed and want to run without Docker:
# Install dependencies
uv sync
# Run the app
uv run uvicorn app.main:app --reloadmake help # Show all available commands
make setup # Initial setup (creates .env file)
make docker-run # Build and run with Docker Compose
make docker-stop # Stop containers
make docker-logs # View application logs
make docker-shell # Access container shell
make docker-clean # Remove containers, images, and volumes
make clean # Clean Python cache filesSpotify-Wrapped/
├── app/
│ ├── main.py # FastAPI application and routes
│ ├── spotify.py # Spotify API integration
│ ├── analyzer.py # AI analysis logic (LRCLIB + OpenRouter)
│ ├── static/ # CSS, JS, and image assets
│ └── templates/ # Jinja2 HTML templates
├── Makefile # Development shortcuts
├── pyproject.toml # Project dependencies (uv)
├── Dockerfile # Container definition
├── docker-compose.yml # Docker orchestration
└── .env # Environment variables (not tracked)
Feel free to submit issues and enhancement requests!
This project is for entertainment purposes. Please respect the terms of service for all APIs used.