Rantify is a web application that integrates Spotify with LLMs for generating reviews and rhymes on a given Spotify playlist.
- Flask – Framework
- Python – Language
- Bootstrap – CSS
- jQuery - JavaScript
- Spotipy – Spotify API Integration
- LangChain OpenAI – OpenAI API Integration
- LangChain – LLM prompt and output parsing
- Pytest - Unit Testing
- GitHub Actions - CI/CD
- Heroku – Hosting
Here's what you need to be able to run Rantify:
- Python (version >= 3.10)
API Keys for Spotify and OpenAI:
- Spotify - Follow the Spotify Docs
- Client ID
- Client Secret
- Redirect URI
- OpenAI - Follow the OpenAI Docs
- API Key
git clone https://github.com/SadiJunior/rantify.git
cd rantify
python -m venv .venv
.venv/bin/activate # Linux/macOS
.venv\Scripts\activate # Windows
python -m pip install --upgrade pip
pip install -r requirements.txt
cp .env.example .env # Linux/macOS
copy .env.example .env # Windows
code .env
# Flask app information
FLASK_CONFIG=development
# Session information
SECRET_KEY=<your-secret-key>
# Spotify information
SPOTIFY_CLIENT_ID=<your-spotify-client-id>
SPOTIFY_CLIENT_SECRET=<your-spotify-client-secret>
SPOTIFY_REDIRECT_URI=<your-spotify-redirect-uri>
# OpenAI information
OPENAI_API_KEY=<your-openai-api-key>
OPENAI_LLM_MODEL=gpt-4o-mini
flask run
Visit http://localhost:5000 in your browser.
- Error when Logging in: Currently, the app is in development mode and needs to be accepted by Spotify for public release.
- Dangerous site warning: Sometimes Google Chrome may display a "Dangerous site" warning when trying to Log in with Spotify OAuth. You may proceed by clicking on "Details" and then "Visit this unsafe site."
- Social Media integration: Make the output shareable for social media. Generate Instagram Stories and Twitter posts for example.
- More User Options: Add options for generating rants on a user's top 10 most listened songs for a given time period or favorite artists.
- Streaming Services Integration: Add support for other music streaming services like Apple Music or Last.fm.
Rantify is a small open-source project, but I'd welcome contributions from the community.
If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.
MIT License - Copyright (c) 2024 Sadi Junior