Web API — recently played on Spotify
By 2024, I had built roughly ten different versions of my portfolio. This time, I set a clear goal: create something low-maintenance, yet still playful. The result is a minimal design - but with a personal twist. I believe small, personal signals create stronger emotional engagement than heavy visual decoration so I wanted to find a subtle way to weave it into the experience.
Solution
I wanted to display my most recently played track from Spotify to visitors. I initially explored Spotify’s API, but quickly realized it was far too complex for such a small feature.
Although I briefly dropped the idea, it kept coming back. After researching alternatives, I discovered Last.fm, which offers a much simpler API and provides the same listening data.
Implementation
After reviewing Last.fm’s documentation, I created an account and connected it to my Spotify profile. I then generated API credentials, set up an endpoint, and started implementing the feature.
To keep the data fresh, I set up a scheduled job that periodically fetches my latest track. While the page could have requested the data on each visit, I deliberately chose to introduce a background update flow. This allowed me to explore automation, understand how to work with time-based processes, and think more critically about data freshness versus system complexity.
Closing Notes
The result is a small but personal detail: my latest played track is always visible on the site and links directly to Last.fm for listening. Beyond adding character to the portfolio, the project helped me better understand APIs, scheduling, and data handling - proving that even minor features can be valuable learning experiences.