Find Spotify playlists that match your vibe
Moodify is a Flask web application that uses the Spotify Web API to discover playlists based on your current mood. Whether you're feeling happy, sad, energetic, or chill, Moodify helps you find the perfect soundtrack for your moment.
- Mood-based playlist discovery - Enter any mood and get curated Spotify playlists
- Interactive emoji picker - Quick-select popular moods with emoji buttons
- Clean, responsive UI - Beautiful interface that works on all devices
- Direct Spotify integration - Links directly to playlists on Spotify
- Artist lookup tools - Bonus utilities for finding artist information and images
- Python 3.7+
- Spotify Developer Account (for API credentials)
-
Clone the repository
git clone <your-repo-url> cd moodify
-
Set up virtual environment
python -m venv venv venv\Scripts\activate # Windows # or source venv/bin/activate # Mac/Linux
-
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
cp .env.example .env
Edit
.env
and add your Spotify API credentials:SPOTIPY_CLIENT_ID=your_spotify_client_id SPOTIPY_CLIENT_SECRET=your_spotify_client_secret SECRET_FLASK_KEY=your_flask_secret_key
-
Run the application
python api/index.py
-
Open your browser and visit
http://localhost:5000
- Go to Spotify Developer Dashboard
- Log in with your Spotify account
- Click "Create App"
- Fill in app details (name, description)
- Copy your Client ID and Client Secret to your
.env
file
- Enter your mood - Type anything like "happy", "workout", "study", or "chill"
- Get recommendations - Moodify searches Spotify for playlists matching your mood
- Discover music - Click any playlist to open it directly in Spotify
- Quick picks - Use emoji buttons for instant mood-based searches
moodify/
├── api/
│ └── index.py # Main Flask application (Vercel serverless)
├── spotify_utils.py # Spotify API integration
├── templates/
│ ├── index.html # Homepage with mood input
│ └── results.html # Playlist results page
├── static/
│ ├── style.css # Styling
│ └── script.js # Frontend interactions
├── vercel.json # Vercel deployment configuration
├── requirements.txt # Python dependencies
└── examples/ # Development utilities (gitignored)
├── artistimage.py # Artist lookup utility
└── coverart.py # Album art utility
- Backend: Flask (Python web framework)
- API: Spotify Web API via Spotipy
- Frontend: HTML, CSS, JavaScript
- Environment: python-dotenv for configuration
Try searching for:
- Emotions: happy, sad, angry, excited, calm
- Activities: workout, study, party, sleep, driving
- Genres: jazz, rock, electronic, classical, hip-hop
- Vibes: chill, energetic, romantic, nostalgic, upbeat
This project was created for a hackathon by Anish Bommena and Krish Joshi. Feel free to fork and improve!
This project is open source and available under the MIT License.
Made with ❤️ and lots of ☕ during a hackathon