Devlog 4

You're viewing a Gemini article on the web

It's much better to view it on Gemini!

Another day, another dive into something new. This time: caching and security.

Today's work

Part of the authentication on the backend has been trying to work out what data to store in the token claims for the JWT. The Registration/Login/Logout actions all work as expected, and the tokens refresh as expected. However, there's more to a JWT than just being a validation string. I've spent some time reading up on JWT claims to see what else can be encoded there. I'm thinking that I probably need to store the user's UUID to more easily handle querying items for a specific user (e.g. for fetching a user's boards without them needing to navigate to a subcollection).

Another thing I need to do here is more actively start caching information. Looking up certain values for each action could get quite expensive, so I'm looking at implementing some sort of temporary cache that persists to save time on repeated actions. I think I'll also look into other things I can lean on claims for because it seems to be a much more powerful tool than I'd anticipated.

Other than that, I'm just plugging away at the handlers. I started work on reviews today and realized that it really requires me to implement items first. Should have thought about that really.

What's next

More of the same: handlers. I might be able to finish off all handlers by the end of the week if I really focus on it. I think I'm mostly putting off the frontend work to be honest so I need to make sure I don't lose momentum.

Tell me what you think.