jarek small.

Live adaptation

Music Mood Matcher

Adapting a music discovery capstone when the external API changes.

  • JavaScript
  • Spotify Web API
  • OAuth PKCE
  • React / Express / MongoDB (original)

Overview

Music Mood Matcher began as a full-stack capstone connecting music discovery, authentication, and playlist creation. The current portfolio edition keeps discovery and playlist export available while documenting how its behavior differs from the original.

Problem / Motivation

The project connects a personal interest in music with a practical software problem: helping someone build a soundtrack for their current mood. The original implementation used Spotify recommendation parameters such as valence, energy, and danceability.

Architecture / How It Works

The original source separates a React frontend from an Express backend and MongoDB persistence. The current public app runs as browser JavaScript hosted alongside the portfolio.

Spotify sign-in uses Authorization Code with PKCE. Catalog searches use mood, energy, and genre as search hints. Results are deduplicated, recent tracks are excluded, and each batch contains up to 10 tracks. Playlist export happens only after the visitor reviews the tracks and chooses to create a private playlist.

Key Technical Decisions

  • Keep the original frontend and backend source for reference while isolating the current adaptation in public-app/.
  • Use PKCE without a client secret in the browser; retain the short-lived access token in tab session storage.
  • Keep saved track lists on the visitor’s device. Bound each discovery request to avoid uncontrolled API retries.

Challenges & Tradeoffs

Spotify restricted Audio Features and Recommendations access for development apps. An authenticated test returned a 403 response, so the public version uses catalog search rather than pretending to retain audio-feature matching.

Search hints provide variety but cannot determine whether a song actually sounds happy or calm. Spotify API access also remains limited to approved test accounts in Development mode. These limitations are described in the app and repository.

Validation

Automated checks cover fresh-result selection, duplicate exclusion, bounded searches, invalid data, expired sessions, and OAuth callback state validation. Two live Spotify searches produced separate batches of 10 tracks without repeats between those batches.

What I Would Improve in a V2

Evaluate an accessible audio-feature provider against a small sample before changing the matching behavior again. Compare coverage and mood relevance, then separate provider-specific data access from track selection.

Original Music Mood Matcher interface walkthrough
Original capstone interface; the current live adaptation has a different interface.