Hello! I was wondering if anyone knew of any libraries or best practices for implementing local-first data management in a clj/cljs fullstack app? What I mean by local first is that the frontend app stores data locally using indexeddb, then synchronises this with the database on the backend. Would be grateful for any pointers 🙏
I'm not sure if this is what you're looking for, but there's this -> https://www.instantdb.com/
Thank you! I’m aware of Instant, but my FE app is not that complex, plus I want to manage my own backend/database
I've been playing with persisting a datascript transaction log to indexeddb for a sort of poor man's xtdb in the browser. Intent being to add a sync layer on top of it. The browser piece is straightforward enough - can see about putting some version of it up on GitHub if it's of interest? Also doing local-first file storage to OPFS with the intent of syncing that too
I’ve head good things about electric clojure
but i haven’t been able to fully test it myself…on paper it looks really interesting. But i’m not sure it’s a plug and play sort of thing. Haven’t seen a productionized use case for it.