TypeScript icon, indicating that this package has built-in type declarations

    0.1.2 • Public • Published


    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 Set, Map, 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.

    Quick Start

    Live demos (source)

    Getting Started Guide


    • 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).
    • Network-agnostic: collabs generates 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, collabs is 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

    Open 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.


    npm i @collabs/collabs

    DownloadsWeekly Downloads






    Unpacked Size

    3.32 MB

    Total Files


    Last publish


    • heathermiller
    • mweidner037