Zac Stryker Home Projects Blog Resume About Contact GitHub
← Projects

Related Artists

Discover connections between musical artists using Discogs data

Quick Search

Plini
Plini
Polyphia
Polyphia
Yvette Young
Yvette Young
0%
Initializing...

README.md

Discover connections between musical artists by exploring collaborator networks. Search for any artist and find guest appearances, featured collaborations, and band members through the Discogs music database API. Results stream in real-time as they are discovered.

Features

  • Artist search -- type any artist or band name
  • Streaming results -- collaborators appear in real-time via Server-Sent Events as releases are processed
  • Pause/resume -- results are delivered in batches of 12; pause to browse, resume to load more
  • Sorting -- by name (alphabetical), year (latest collaboration), or role
  • Relationship categories -- Members, Guests (featured on the artist's tracks), Appearances (tracks where the artist appears on others' releases)
  • 7-day cache -- repeated searches return instantly from a local JSON cache

How It Works

  1. The backend searches Discogs for the artist and fetches up to 100 releases
  2. For each release, track-level credits are parsed to identify collaborators
  3. Collaborators are streamed to the frontend via SSE as they are found
  4. After every 12 new collaborators, processing pauses until the user resumes
  5. Results are cached to disk for 7 days to avoid redundant API calls

Tech Stack

  • Discogs API (python3-discogs-client) -- artist search, release data, track credits, images
  • Flask -- SSE streaming endpoint, image proxy routes, cancel/resume API
  • Server-Sent Events -- real-time result streaming without WebSockets
  • Threading -- non-blocking background processing with queue-based communication

SSE Event Types

TypeDescription
progressGeneral progress update with percentage
artist_infoFound the main artist with profile data
collaboratorA new collaborator with release info
pausedBatch complete, waiting for resume
completeSearch finished with full results
cachedResults returned from cache
errorSomething went wrong

API Endpoints

MethodPathDescription
GET/related-artists/search_streamSSE stream of results
POST/related-artists/cancelCancel an active search
POST/related-artists/resumeResume a paused search
GET/related-artists/fetch_image/<id>Fetch artist image
GET/related-artists/fetch_release_image/<id>Fetch album artwork