So right now I’m working with some data that has traditionally been end-to-end encrypted with a mobile app that would maintain its full copy of the data locally. We sync the data to the server but the server has almost no idea what the data is and no way to decrypt it (by design the client keeps the key and passes it through a secure channel to other clients).
I love the “Hotwire” approach and the simplicity it provides but as I’ve built out pages with Turbo I realized there wasn’t a great way to delay a page being rendered till it was decrypted in the browser without some kind of blank page flash or loading state. Maybe it’s fine to keep this short loading state but its kind of jarring.
I’m not sure this approach works well with Turbo and tempted to move to more of a SPA for the main pages the user visits (maybe keep the various settings pages out of React) but I was curious if people were aware of APIs that would allow me to move more seamlessly between React Router & Turbo or perhaps to delay Turbo changing pages till the page is fully done loading. Maybe I just shouldn’t use Turbo here because that’s not what it’s made for, not sure.
Also, on a related note, decrypting takes a long time, it would be nice to cache the results of this in the browser if possible, but this would again require me to delay the page from loading or provide some kind of loading state for Encrypted data.
I really love server-rendered HTML and would like to push those boundaries when possible, but I also don’t want to force my love of the tech on a domain where it doesn’t make sense.
Tell me if you have any creative solutions!