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 with a watch remote.

Why
It began as the Death.FM player (see that project) and grew into a personal library: my own mp3 collection and internet radio in one place, at home and on the move. The collection lives in Google Drive because it is cheap and syncs to the desktop without building or paying for other storage. Ground Control, the simple one-button radio player, exists because I wanted internet radio that was cheap, did not depend on third-party apps or sites that might go off air, and did not push me into someone's bloated app. Space Station and Ground Control are light, start instantly and play my own library. That may not suit everyone, but it scratches a personal itch without the bloat.
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, an IR remote and a Wear OS watch remote.
- 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.
- The Worker can hold several separate libraries, each rooted at its own Drive folder, with its own likes, history and catalog version. Clients pick one, and an album or artist can be shared from one library to another without storing the file twice.
- Voice control goes through the phone: asking the assistant to open the app starts a listening prompt, and a station, song, album, artist or genre followed by "on ground control" plays it on the GroundControl box.
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.