MoodWave Project Story

Inspiration

Every day, I spend hours on Spotify searching for the perfect playlist to match my mood—but I never quite found what I was looking for. Spotify's existing mood features pull from songs you've already listened to, but I wanted something different—I wanted to discover new music that matched my vibe. When creating playlists manually, Spotify recommends only 3-5 songs at the bottom, which never felt like enough variety. I envisioned a tool that could search through Spotify's vast database, pull tracks from renowned artists across different moods, and give me fresh recommendations every time.

Spotify has always been my go-to—I average around 100,000 listening minutes per year! I love how they constantly improve their interface and features to bring out the best in music. I knew there was room for something more personalized in the mood-based discovery space.

What it does

MoodWave is a Spotify-powered web application that generates personalized playlists based on your current mood. Users can:

  • Choose from 11 different moods (happy, chill, energetic, sad, romantic, focused, party, relaxed, motivational, nostalgic, and rap)
  • Get 12 curated tracks from diverse artists matching their selected mood
  • Preview songs before adding them with built-in playback controls
  • Save individual tracks to their Liked Songs or add them to custom playlists
  • Play songs directly in the browser with Spotify integration
  • Refresh recommendations to discover new music within the same mood category
  • Experience an immersive UI with animated album art backgrounds

How We built it

This was our first time working with Flask and Python web development. We leveraged AI tools as learning resources to guide us through the process, which allowed us to learn rapidly and bring our vision to life. I've always been interested in Spotify's APIs, but I'd never felt confident enough as a coder to tackle something like this—until now.

My building process:

  1. Brainstorming: Started with my love for Spotify and music, then outlined the mood-based concept
  2. API Setup: Obtained tokens and permissions from Spotify's Developer platform
  3. Local Development: Created a local domain using PowerShell and Visual Studio Code
  4. Mood Categories: Defined 11 distinct moods and curated seed artists for each
  5. Recommendation Engine: Built the logic to fetch and shuffle diverse tracks
  6. Public Deployment: Moved everything to PythonAnywhere to create an accessible public domain

Tech Stack:

  • Backend: Python Flask for server-side logic and routing
  • Spotify API: Spotipy library with OAuth 2.0 authentication
  • Frontend: HTML, CSS, and vanilla JavaScript for responsive UI
  • Tools: Visual Studio Code, PowerShell, PythonAnywhere
  • Algorithm: Artist-based similarity matching with randomization for variety

The entire process was trial and error, and I'm incredibly proud of building something I'm so passionate about from scratch.

Challenges I ran into

Most of the challenges centered around getting the code to work locally, especially as a beginner with APIs. The most significant hurdle was discovering that only I could access the app while others couldn't log in. It took about 2 hours to troubleshoot session management and Spotify Developer Mode restrictions.

Specific struggles:

  • Session Management: Configuring Flask session cookies with SameSite=None for cross-site authentication
  • User Access: Realizing the app was in Developer Mode and restricted to registered users only
  • Error Hunting: Manually finding typos in my code while sorting through error reports
  • 14-Hour Coding Marathon: At my first hackathon, I pushed through fatigue and frustration because I was determined to have something functional to present

I was panicking at times, especially when users couldn't log in—I knew I was so close to completion. But I believe in my abilities as an engineer, and that determination kept me going.

Accomplishments that I'm proud of

Seeing everyone's reactions to what I'd built—something combining my passions for Spotify, music, and engineering—was truly rewarding. I never thought I'd be able to create something like this, especially in 24 hours.

Key achievements:

  • Successfully implementing OAuth 2.0 login for multiple users
  • Generating playlists from recommendations and having songs save to Liked Songs
  • Creating an immersive user interface with dynamic backgrounds that enhance the listening experience
  • Building mood cards with smooth hover effects
  • Implementing music previews—when you select a recommended song, it plays instantly so you can listen before adding it

This hackathon was an incredible experience. Being part of a talented community of engineers, all with aspirations of creating and discovering, was inspiring.

What I learned

Before this project, I always thought I couldn't reach certain levels of coding expertise. This project was a transformative learning experience—I now realize that with time, effort, and commitment, I can achieve whatever I set my mind to in the engineering industry.

Technical skills gained:

  • Python and Flask web framework
  • API integration and authentication (OAuth 2.0)
  • Debugging and error handling
  • Website domains (local and public)
  • PowerShell and Visual Studio Code proficiency
  • Understanding OAuth communication between applications

Personal growth: As an engineer, I learned that whatever I set my mind to, I can achieve. Debugging, projects, and problems all need to be solved and processed. Through this experience, I've come to understand that as engineers, we can build anything—from circuits to websites, from cybersecurity tools to design applications.

What's next for MoodWave

I've been researching features that could enhance the Spotify listening experience. The sky is the limit with Spotify's APIs, and here are the most exciting features I'm exploring:

Priority additions:

  • Mood Transitions: Automatically transition between moods based on listening history—gradually selecting songs to help you process your emotions or lift your spirits
  • Mood Tracking & Yearly Recap: Keep track of what moods you're feeling throughout the year, with a Spotify Wrapped-style summary showing your emotional listening patterns
  • Enhanced Recommendations: Use Spotify's audio features (tempo, energy, valence) for more precise mood matching
  • Social Music Journaling: Like Letterboxd but for music—write what a song means to you, either publicly or privately
  • Mobile Apps: Native iOS and Android versions for on-the-go mood-based listening

Along with several other enhancements including collaborative playlists, fan challenges, and interactive music games.

I'll continue improving this project and making it better for my personal use and potentially to share with others. This is just the beginning—I'm committed to evolving MoodWave into a tool I can use daily and maybe even share with the world.

Built With

Share this project:

Updates