I like this concept of “local-first software”. This is a very comprehensive survey.
https://www.inkandswitch.com/local-first.html
Foundational part of it are Conflict-free Replicated Data Types. Can’t say I know a thing about the details, but they sound pretty good:
"general-purpose data structures, like hash maps and lists, but multi-user from the ground up.
"we think CRDTs may be the foundation for collaborative software that gives users full ownership of their data"