This Site

This site was made with Next.js and Tailwind! The colors were generated using HueWind. The source code is available here.

Music Player Widget

The music player widget on the homepage is powered by recenttrack, a Vercel serverless function I wrote. It attempts to request the currently playing song from the Spotify API, through an app I have registered under my Spotify developer account.

There's a problem though: because the Spotify API response has an isPlaying flag, it might seem as though the endpoint effectively returns the most recently played song. This, however, is not the case—the endpoint returns no data after a certain time has passed since Spotify was last playing. To remedy this, I utilize the last.fm API to query my most recently logged song, which for all purposes suffices.