100 Days of Gen AI: Day 34

Where I left off last, the issue was that the Apple shortcuts app worked, but only for an hour until the spotify session token expired. Today I focused on removing this one-hour limitation by refactoring the server to manage session tokens on behalf of the user. Rather than relying on the client browser to do this (in the form of a session token stored as a cookie), now the server uses an in-memory store to retain these. Instead the server provides a long-lived API key to the user, so it can be set once and never expire.

So far, this session data is just stored in server memory, so it will be lost as soon as the server restarts (not ideal). The next step will be to persist this in a proper data store so session data is not lost on server restarts. I’ll probably use Vercel to host this app, so would plan to use their durable Redis key-value store.

And I also still need to build the functionality I actually care about, which is the ability to add/remove songs from a playlist via Siri voice command.