A collections library for collaborative data structures
Collabs is a library for building and using collaborative data structures. These are data structures that look like
Array, etc., except they are synchronized between multiple users: when one user changes a collaborative data structure, their changes show up for every other user. You can use them to quickly build collaborative apps along the lines of Google Docs/Sheets/Slides, shared whiteboards, etc.
- Local-first: Users see their own changes immediately, even when offline, and sync up with other users in the background. All users see the same state once they sync up, even if they made simultaneous changes (e.g., two users typing at once).
collabsgenerates messages that you must eventually broadcast to all users, but how is completely up to you and your users: your own server, WebRTC, encrypted Matrix room, etc.
Flexible and extensible: At its core,
collabsis a library for collaborative data structures, not just a library of them (although we provide plenty of those too). So if our data types don't meet your needs, you can create your own or get them from third-party libraries.
- Composable: In particular, we provide techniques to create new types by composing existing ones. Correctness properties compose too!
- Keep your data model and type safety: A core feature of Collabs is that you can organize your collaborative state using reusable, strongly-typed classes. In particular, you can make a single-user app collaborative while preserving its data model and type safety, by directly replacing its frontend data types with collaborative versions.
git clone https://github.com/composablesys/collabs.git cd collabs/collabs npm i npm run build
docs/typedoc/index.html in a browser.
Authors and Acknowledgements
Collabs was created by Matthew Weidner, Heather Miller, Huairui Qi, Maxime Kjaer, Ria Pradeep, Ignacio Maronna, and Benito Geordie at Carnegie Mellon University's Composable Systems Lab.
Matthew Weidner's work on the project is supported by an NDSEG Fellowship sponsored by the US Office of Naval Research.