I research building blocks for collaborative and local-first software - in particular, Conflict-free Replicated Data Types (CRDTs).
mweidner037 [at] gmail.com • @MatthewWeidner3 • LinkedIn • GitHub
CRDT-inspired libraries for the web.
github.com/mweidner037/list-positions
list-positions is a TypeScript library that provides efficient “positions” for lists and text. You can use these to make documents rich and collaborative - e.g., storing annotations on collaborative rich text. See my announcement blog post.
@list-positions/formatting is a companion library that lets you add inline formatting to its lists (italics, hyperlinks, etc.).
list-positions implements the Fugue list CRDT, while @list-positions/formatting implements Geoffrey Litt et al.’s Peritext rich-text CRDT. However, the libraries are more flexible than traditional CRDTs, making them suitable for server-authoritative collaboration as well as local-first apps.
github.com/mweidner037/position-strings
position-strings is a TypeScript library that provides “position strings” for use in collaborative lists or text strings. Each position string points to a specific list element (or text character), and the list order is given by the lexicographic order on position strings.
Used by: Miro, Notion
position-strings and list-positions serve similar purposes. position-strings has a minimalist API designed for maximum compatibility with existing systems. list-positions is more comprehensive and uses less memory & storage, especially when used for text editing.
position-strings essentially implements the Fugue list CRDT with a minimalist API. See this blog post for further background.
Collabs is a TypeScript collections library for collaborative data structures (CRDTs). It puts into practice many of the ideas from my first blog post, Designing Data Structures for Collaborative Apps.
For a research-oriented description of Collabs, see our paper preprint. The paper also has benchmark results showing that a Collabs rich-text editor can scale to over 100 simultaneous users, and its memory usage and load/save times are comparable to Yjs.