100 Days of Gen AI: Day 35

Today I kept working on the Apple Siri shortcut. I used ChatGPT to help me setup a database to persist the spotify session tokens. At first I used an in-memory database with bbolt, which worked beautifully, except that on server restart session tokens would be lost. (I should have been more explicity in my instructions.) So I then swapped that out for a durable Redis datastore.

I also wanted it to be cloud-hosted so I’d be ready to launch to production using the same datastore method as used in development. I’ve been hosting most of my projects on Vercel, so I took a look at what’s natively offered with Vercel. It looks like they no longer offer a native Redis datastore, but they do have an integration with Upstash, so I used that.

Once I had the datastore up, I started work on building out the functionality I actually care about, which is the ability to add/remove songs from a pre-determined playlist. To that end I expanded the existing endpoints to extract the playlist ID, and instruct the user to set this as a request header from the Apple Siri shortcuts app. Then I ran out of time. :)

Next up is adding new endpoints to add/remove songs using that playlist ID header!

This project is a great example of a feature I always wanted, but before could never justify spending the time to build. With ChatGPT cutting down development time by half or even two-thirds, it’s suddenly conceivable to build this feature as a hobby project.