You don't need a CRDT to build a collaborative experience

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

SurveyJS - JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor
Keep full control over the data you collect and tailor the form builder’s entire look and feel to your users’ needs. SurveyJS works with React, Angular, Vue 3, and is compatible with any backend or auth system. Learn more.
surveyjs.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. othello

    Operational transform library for Clojure + Clojurescript

    I haven’t explored this space in a while, but I have a couple of examples that could be helpful. A Clojure library of mine [0] has a decent README with some background reading on how to use operational transform.

    I also reimplemented it in a surprisingly tiny amount of OCaml [1] which was a fun way to learn that language :)

    [0]: https://github.com/jahfer/othello

  2. SurveyJS

    JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor. Keep full control over the data you collect and tailor the form builder’s entire look and feel to your users’ needs. SurveyJS works with React, Angular, Vue 3, and is compatible with any backend or auth system. Learn more.

    SurveyJS logo
  3. othello-ocaml

    Reimplementation of https://github.com/jahfer/othello in OCaml programming language

  4. ot.js

    This single file shows the entire set of OT transformations (retain, insert, delete):

    https://github.com/Operational-Transformation/ot.js/blob/mas...

    and this is a good post outlining the basics of OT, from the creator of CodeMirror:

    https://marijnhaverbeke.nl/blog/collaborative-editing-cm.htm...

  5. rich-text

    Format for representing rich text documents and changes (by ottypes)

    nah, that’s not true at all. have a look at ‘rich-text’[1] which allows for transforms on metadata in a separate stream from the main content. it’s the same basic algo used for OT on plain text.

    (i was the cto at a startup which used this to create a multi-user text editor with rich text support in 2015ish)

    1: https://github.com/ottypes/rich-text

  6. collabs

    Collabs library monorepo

    > Opaque State: [...] You can’t inspect your model represented by the CRDT without using the CRDT library to decode the blob, and you can’t just store the underlying model state because the CRDT needs its change history also. You’re left with an opaque blob of data in your database.

    As someone who works on a CRDT library with opaque state [1], I agree that this is a big barrier to adoption. Features like partial loading, per-paragraph permissions, and accept/reject suggestions seem pretty easy to implement if each text char is just a row in your server's DB, but I would have trouble implementing them on top of e.g. Yjs.

    For text editing, one idea is to separate the CRDT "positions" from the text itself, which you can then store as a map (position -> char) in your own data structures. I've made a simple (but inefficient) library along these lines [2] and would be interested in ideas for further development.

    [1] Collabs - https://collabs.readthedocs.io

    [2] position-strings - https://www.npmjs.com/package/position-strings

  7. quill

    Quill is a modern WYSIWYG editor built for compatibility and extensibility

    I agree. Yes, you can. Quill is the example here.

    Actually, back in 2015 when we started prototyping CKEditor 5, we started with this approach as well. Our goal from the beginning was to combine real-time editing capabilities with an engine capable of storing and rendering complex rich-text structures (nested tables, complex nested lists, other rich widgets, etc.). We quickly realized that a linear structure is going to be a huge bottleneck. In the end, if you want to represent trees, storing them as a linear structure is counterproductive.

    So, we went for a tree model. That got many things in the engine an order of magnitude harder (OT being one). But I choose to encapsulate this complexity in the model rather than make it leak to particular plugins.

    In fact, from what I remember, https://github.com/quilljs/quill/issues/117 (e.g. https://github.com/quilljs/quill/issues/117#issuecomment-644...) is a good example of issues that we avoided.

    I also talked to companies that built their platforms on top of Quill. One of them ended up gluing together countless Quill instances to power their editor and overcome the limitations of the linear data model but is now looking for a way to rebuild their editor from scratch due to the issues (performance, complexity, stability).

    So, yes. You can implement a rich-text editor based on a linear model. But it has its immediate limitations that you need to take into consideration.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Ask HN: How to integrate a Blog system into my NextJS app

    2 projects | news.ycombinator.com | 15 Nov 2024
  • Using Quill Rich Text Editor in the HTML Form element

    1 project | dev.to | 29 Sep 2024
  • Notion-like WYSIWYG editor with export to a beautiful static HTML website

    2 projects | news.ycombinator.com | 19 Aug 2024
  • A Comprehensive Guide to React-Quill: The Rich Text Editor for Your React Applications

    2 projects | dev.to | 13 Aug 2024
  • Quill: Open-source, powerful rich text editor in JavaScript

    1 project | news.ycombinator.com | 25 Mar 2024

Did you know that TypeScript is
the 1st most popular programming language
based on number of references?