Loading…
../projects

KO Unwrapped

My own year-round Spotify Wrapped and AI playlist builder. Spotify only shares your last 50 plays, so I built an hourly sync that keeps every one, then used that history to build DJ-style sets.

role
Solo designer and developer (personal project)
status
live
stack
Next.js · React · TypeScript · Supabase · Drizzle ORM · Spotify API · GSAP · Tailwind · Vercel
Plays saved
18,273
Tracks
7,193
Artists
3,686
Mood tags
24,791
Sync
hourly
First tagging run
$0.29

The problem

I wanted a version of Spotify Wrapped I could open any day of the year, and I wanted it to do something with my history, not just display it.

Spotify's API gets in the way twice. It only returns your 50 most recent plays, so anything older is gone unless you saved it. And it no longer gives new apps audio data like tempo, energy, or key, which is exactly what you need to judge whether two songs belong next to each other.

My role

Personal project. I designed and built all of it: the data pipeline, the stats pages, the visuals, and the playlist builder.

Keeping a history Spotify won't keep

Every hour, a scheduled job asks Spotify for everything played since the newest play already in the database, then stores the tracks, artists, and plays in Postgres on Supabase. Asking only for what is new keeps each sync small, and running it hourly keeps me well under the 50-play limit, so nothing is lost.

From those plays the app works out listening sessions: runs of songs played close together. Since the first saved play on November 6, 2025, the history has grown to 18,273 plays across 7,193 tracks and 3,686 artists.

Filling in what the API won't say

  • Mood and energy: Claude tags tracks from a fixed vocabulary of 96 mood and energy tags. The first full run, in July 2026, covered all 5,180 tracks in the library at the time and cost $0.29. Today 5,411 tracks carry 24,791 tags, and tracks synced since then are waiting on the next run. Energy for each track is estimated from its tags.
  • Genres: pulled from Spotify for each artist, where Spotify lists any.
  • Tempo and key: looked up from Deezer and GetSongBPM where they have the track, and converted to the Camelot wheel DJs use to find keys that mix well.

Turning history into playlists

Pick seeds from my own listening

I start with a few seed tracks, found by searching my library, choosing mood tags, or reusing a past listening session in one click.

Rank my library against them

The app scores every track I have heard against the seeds: shared genres (30%), shared mood tags (30%), whether I have played them in the same sessions (25%), time of day (10%), and popularity (5%).

Suggest music I have not heard

Claude proposes new tracks that fit the seeds, Last.fm adds similar tracks, and each suggestion is matched to a real Spotify track. A preset decides how much of the set is new music versus my own library.

Direct the set

Claude gets the combined pool and acts as a set director. It picks an opener, builds to a peak, brings it back down, keeps adjacent tracks close in energy, tempo, and key, and avoids clumping one artist together. It writes a note for every placement and every transition, so I can see why the set is shaped the way it is. If the AI call fails, the app falls back to the ranked list instead of showing an error.

Edit and save

The set appears as an energy timeline. I can drag to reorder, swap any track for one of its next-best alternatives, or remove it, then save the result to Spotify as a private playlist. Only my own Spotify account can create playlists.

Results

  • 18,273 plays, 7,193 tracks, and 3,686 artists kept in just over a year, from an API that only shows the last 50 plays.
  • 24,791 mood and energy tags across 5,411 tracks. The first full run of 5,180 tracks cost $0.29.
  • Playlists go from a few seed tracks to a finished Spotify playlist in one flow, verified end to end against my real account.

What I learned

Working inside an API's limits pushed the project in a better direction. Because Spotify would not hand me the data, I had to own it, and once I owned it I could do more with it than Spotify's own year-end review does.

©2026