Case study · 2025
Cadence
Discover Weekly, but whenever you want it: pick a seed, or just describe a vibe, and Cadence builds a playlist from your own listening history and saves it to your Spotify account.
Role
- Design, architecture, and build (solo)
Stack
- React
- TypeScript
- MUI
- React Query
- Fastify
- Prisma
- PostgreSQL
- Web Playback SDK
- Anthropic API
- Playwright
Links
- Private beta (see below)
From a school project to a real app
Cadence started as a university group project. I rebuilt it from scratch with seven ways to seed a playlist: recent listening, an artist, a song, a genre, a vibe, an existing playlist, or a blend of two.
Turning a “vibe” into a playlist
Free-text vibes like “rainy Sunday, slow coffee” go to the Anthropic API, which turns them into searchable signals; Last.fm and ListenBrainz supply recommendations tuned to the listener’s history. Every AI step has a non-AI fallback, so the app works without it.
When it can’t find every requested track, it says so and suggests how to get more next time, instead of quietly returning less.
Your listening, visualized
Top Music shows Spotify’s own ranking of your artists and songs over three time windows, plus genre charts estimated from your top artists’ tags, labeled as estimates so nobody mistakes them for Spotify data.
Playback and security
Songs play right in the browser through Spotify’s Web Playback SDK. Spotify tokens are encrypted at rest with AES-256-GCM, and Playwright tests run against mocked external APIs.
Decisions and trade-offs
Building on someone else’s platform means designing around its limits.
Recommendations without Spotify’s
Spotify deprecated its recommendations and related-artists endpoints for new apps in November 2024. I compared alternatives (SoundCloud needs app approval; Bandcamp and Instagram have no public discovery API) and chose a waterfall: ListenBrainz first, for newer and indie artists, falling back to Last.fm’s deeper catalog only when it runs short. No settings toggle for the user to think about.
AI where it helps, never required
Free-text vibes and playlist names use the Anthropic API, but every AI step has a non-AI fallback. If the key is missing or the call fails, Cadence still builds the playlist.
Designed around rate limits
Spotify limits how fast an app can make requests, so candidate lookups run with bounded concurrency instead of all at once. When a playlist would need more requests than allowed, the app says so and offers a retry instead of failing silently.
Private on purpose
Spotify’s development mode caps an app at 25 approved users, and going public needs Spotify’s app review. I chose to stay private and layered my own email allowlist and an optional site password on top of Spotify’s, as defense in depth. A clickable demo with sample data is on the way.
Tested without touching Spotify
I chose Playwright over Cypress for two reasons specific to this app: first-class network interception, so tests stub Spotify, Last.fm, ListenBrainz, and Anthropic without spending real API quota, and solid cross-origin support, since Spotify’s login redirects to another domain.