Since I’m an iOS developer used to working with offline-first solutions like Firebase, Realm and Core Data I think the Blockstack SDK should rival their functionalities or at least be able to provide a lot of good alternative functionalities.
Since offline first is not an easy problem to tackle given the many different ways of structuring data I started working on a little side project that uses a Clean Architecture approach to trying to solve this problem.
The way I went about is writing a few protocols that guarantee that any struct that implements these can be saved to and retrieved from Gaia through the sdk.
Because the blockstack sdk uses a singleton I decided to put it in a separate platform layer and make it accessible through use cases.
You can follow my progress or fork at: https://github.com/YannisDC/BlockstackAdvancedExample and help build a better structure for blockstack apps with a UX that rivals that of mayor companies.
p.s. the repo uses MVVM + RxSwift + Coordinators so might be a lot to take in for the uninitiated