Now Playing on Last.fm

For a long time I wanted to have a simple UI for viewing what song’s playing right now and then have a bit of information about so about a month ago, I decided to try building exactly that.

I’m using Last.fm’s API since it’s pretty simple to get an API key and start making requests with a username passed in, no authentication needed.

You can check it out here: Now Playing

Example song playing on now.usman.xyz

One thing I wanted in this project was to get to a “done” state and have it usable. Since it has been a long time that I wanted something like this, I knew exactly what the requirements were in my mind.

I used Svelte to build this since it’s so lightweight compared to Vue and React. After the username is set, I just save it to a cookie and use that in the subsequent sessions. I didn’t want to overly complicate this project.
Code is here: https://github.com/usmanity/now-playing