Space Station
A personal music library and jukebox. A Cloudflare Worker and D1 database hold the catalog and stream audio that lives in Google Drive, and a family of clients plays it: a web player, an Android app, a Windows LAN server and player, a Chromecast receiver and a small ESP32 box.

The pieces
- Worker and catalogThe API, the D1 catalog, Drive streaming and sync, AutoDJ, the web player and the Cast receiver page.
- Android appLibrary browser with crossfade, Android Auto, live radio and Chromecast.
- LAN server and playerA Windows tray app that serves the local copy of the library on the home network, with its own player.
- GroundControlA tiny always-on ESP32 internet radio and library receiver with an OLED and a ship-terminal look.
- Music CleanerA desktop tool that matches incoming albums to MusicBrainz and writes tidy tags and cover art, with a review queue.
How they fit together
- The Worker is the hub. Every client downloads the same compact catalog, checks a version fingerprint to know when to refresh, and shares likes and a global play history through it.
- AutoDJ is a weighted random walk over a hand-made genre adjacency graph. The walk state lives in the client, so it can be handed from one player to another.
- Audio normally comes through the Worker from Drive, which adds over a second to every start or seek. At home the Windows LAN server serves the local copy instead, and clients probe it and fall back to the Worker if it is not there.
- Chromecast and GroundControl are outputs. The Android app and the Windows player hand over the AutoDJ walk and the Last.fm session, and the receiver or device then runs its own queue, records history and scrobbles, so playback carries on with the phone away.
- Both receivers also play live Death.FM and SomaFM radio from a station list the Worker keeps, with one shared Last.fm switch per stream.
A personal project for a private library. The screenshots use invented artists and albums, and the real library, its storage layout and its addresses are deliberately not shown.