Generate personalized Spotify playlists based on your favorite artists. Enter a seed artist, adjust the settings, and create a playlist with similar music.
- Login with your Spotify account
- Enter a seed artist (e.g., "Radiohead", "Kendrick Lamar")
- Adjust the sliders to customize your playlist
- Generate recommendations and preview the tracks
- Save the playlist directly to your Spotify account
Since Spotify deprecated their /recommendations API endpoint in November 2024, this app uses an alternative approach:
- Last.fm API finds artists similar to your seed artist
- Spotify Search API fetches top tracks from those artists
- The results are combined into a personalized playlist
The fastest way to get Marcify running. No need to clone the repository.
Spotify:
- Go to Spotify Developer Dashboard
- Create a new app
- Add redirect URI:
http://localhost:5000/spotify-oauth2callback - In User Management, add your Spotify email
- Copy Client ID and Client Secret
Last.fm:
- Go to Last.fm API
- Create an API account
- Copy your API Key
# Download the compose file
curl -O https://raw.githubusercontent.com/marwonn/marcify/master/docker-compose.ghcr.yml
# Edit and fill in your API credentials
nano docker-compose.ghcr.ymlFill in your credentials in the environment section:
environment:
- SPOTIFY_CLIENT_ID=your_spotify_client_id
- SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
- REDIRECT_URL=http://localhost:5000/spotify-oauth2callback
- SECRET_KEY=change_this_to_a_random_string
- LASTFM_API_KEY=your_lastfm_api_key
- USERNAME=your_spotify_usernamedocker compose -f docker-compose.ghcr.yml up -dOpen http://localhost:5000 in your browser.
# View logs
docker compose -f docker-compose.ghcr.yml logs -f
# Stop
docker compose -f docker-compose.ghcr.yml down
# Update to latest version
docker compose -f docker-compose.ghcr.yml pull
docker compose -f docker-compose.ghcr.yml up -dFor server deployment, change the REDIRECT_URL to match your server:
- REDIRECT_URL=http://your-server-ip:5000/spotify-oauth2callbackOr with a domain and reverse proxy (nginx/traefik):
- REDIRECT_URL=https://marcify.yourdomain.com/spotify-oauth2callbackImportant: Update the redirect URI in your Spotify Developer Dashboard to match.
git clone https://github.com/marwonn/marcify.git
cd marcify
cp .env.example .env
nano .env # Fill in your credentials
docker compose up -d- Fork this repository
- Go to Render Dashboard
- Create a new Web Service and connect your fork
- Set Build Command:
pip install -r requirements.txt - Set Start Command:
gunicorn wsgi:app - Add environment variables
- Deploy
git clone https://github.com/marwonn/marcify.git
cd marcify
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
nano .env
flask run| Variable | Description |
|---|---|
SPOTIFY_CLIENT_ID |
From Spotify Developer Dashboard |
SPOTIFY_CLIENT_SECRET |
From Spotify Developer Dashboard |
REDIRECT_URL |
OAuth callback URL (must match Spotify app settings) |
SECRET_KEY |
Random string for Flask sessions |
LASTFM_API_KEY |
From Last.fm API |
USERNAME |
Your Spotify username |
| Setting | Description |
|---|---|
| Seed Artist | The artist to base recommendations on |
| Variety | How many different artists to explore (1-10) |
| Discovery | Balance between seed artist and new artists (1-10) |
| Track Count | Number of songs in the playlist (1-20) |
| Fallback Genre | Used when the seed artist can't be found |
| Problem | Solution |
|---|---|
| "Error during authentication" | Redirect URL must match exactly in Spotify settings and compose file |
| No recommendations found | Check that LASTFM_API_KEY is set correctly |
| 403 Forbidden from Spotify | Add your email in Spotify Dashboard → User Management |
| Container won't start | Check logs with docker compose -f docker-compose.ghcr.yml logs |
Published under the GNU General Public License v3.0. See LICENSE for details.
