A personal Spotify discovery app that breaks you out of the same 50 artists.
Discovery runs on the Last.fm API (open, read-only with an API key). It computes your sound profile from Last.fm genre/mood tags, then crawls the similar-artist graph for under-discovered acts (ranked by tag-match and listener-count obscurity). Because you listen on Spotify, the app maps each Last.fm track to a real Spotify track URI (via search) and writes your picks to a Spotify playlist ā and the weekly cron keeps it fresh.
Rendering mermaid diagram...
index.ts ā Hono server: Spotify OAuth, session cookie, /api/me,
/api/profile, /api/discover, /api/save.lib/spotify.ts ā OAuth + Spotify API client. Used for your top artists
(discovery seeds), mapping tracks to Spotify URIs, and writing playlists.lib/lastfm.ts ā Last.fm client: similar artists, tags, listener counts, top tracks.lib/taste.ts ā taste profile (Last.fm tags), discovery, Spotify playlist writer.lib/db.ts ā SQLite storage for per-user Spotify tokens + playlist id.frontend/ ā React app with a constellation map + grid views.cron/refresh.ts ā weekly job that refreshes each user's "Discovery Radar"
playlist (Sundays 12:00 UTC).š Add LASTFM_API_KEY here: https://www.val.town/x/test_account_001/discovery-radar/environment-variables?key=LASTFM_API_KEY
https://discovery-radar.val.run/auth/callback, and set the two env vars below.š Add SPOTIFY_CLIENT_ID here: https://www.val.town/x/test_account_001/discovery-radar/environment-variables?key=SPOTIFY_CLIENT_ID
š Add SPOTIFY_CLIENT_SECRET here: https://www.val.town/x/test_account_001/discovery-radar/environment-variables?key=SPOTIFY_CLIENT_SECRET
SPOTIFY_REDIRECT_URI is optional ā it defaults to the callback URL above.
playlist-modify-* scopes ā disconnect and reconnect Spotify to re-consent.