SteevePommier
Theme
Menu background
Background pattern
Reveal
Reveal size 10
Density 50
Colour
Menu position
Analytics

Spotify poller01

Spotify only exposes your last 50 played tracks, so whatever is not collected in time is lost. This collects continuously — and proves it never stopped.

Ongoingdata collectionself-hostedspotifyhome lab
The poller's sign-in card on black, labelled 'Custody report' with a single admin token field.
overview
overview
playback
playback
accounts
accounts
database
database
settings
settings
Timeline
Aug 2026 —
Role
design + build
Author
Steeve Pommier
Stack
Next.js, TypeScript, Tailwind CSS, SQLite, jose, Docker
AI
Vibecoded

The Spotify API keeps a rolling window of the last 50 tracks. Miss the window and that listening history is not late, it is lost. So the interesting part of this project is not the collecting, it is proving the collecting never stopped.

Two collectors

idSourceCadence
played/v1/me/player/recently-playedevery 30 min
liked/v1/me/tracksdaily, hourly during the initial backfill

Only played is critical, and only played pings the watchdog.

Detecting silence, not noise

Two things here are easy to over-trust, and both are called out in the repo:

  • A Docker HEALTHCHECK under plain Compose restarts nothing — an unhealthy container simply stays unhealthy. It is a diagnosis, not a cure.
  • Push notifications cannot replace a heartbeat. A dead poller sends nothing, and a quiet phone reads exactly like a working one.

So the load-bearing piece is an external heartbeat: the collector pings a watchdog on every successful run, and the watchdog alerts on absence. The UPS covers power loss; the watchdog covers everything else — ISP outage, full disk, silent crash, reboot without a clean restart.

A Next.js dashboard sits on top as the custody report, readable from a phone, with JWT sessions gating every page and admin route.