Damus
JeffG profile picture
JeffG
Yeah! Sounds very similar. We're using a set of storage traits in MDK so that the storage layer is abstracted from the code. The traits define the interface that any storage backend has to implement, then MDK can just call those methods when needed and doesn't need to know exactly what is happening in storage. We have two implementations that we maintain; a simple memory storage backend (mostly for tests) and a sqlite storage backend (which is now also encrypted at rest using SQLCipher). I hope that more storage backends will crop up from the community for other databases over time.

I only talked about the Flutter app refactor here but we've done a massive refactor of MDK and the whitenoise-rs crates as well over the last two months. Largely based on the audit feedback but also cleaning up and improving a lot of things based on learnings of having the app out there in the wild over the last 7 months.