@notebox/nb-crdt
TypeScript icon, indicating that this package has built-in type declarations

4.0.1 • Public • Published

nb-crdt

codecov sponsor

A block based Conflict-free Replicated Data Type that enables collaborative editing across multiple participants allowing for flexible data sharing across spreadsheets, boards, rich text, and more.

Development

Prerequisites

npm install

Test

npm test

Checkout Points

for synchronization, just investigate

  • domain/entity/block
  • domain/entity/contribution

for making an editor, all the interfaces you need are in

  • domain/usecase/replica

Key Concepts

  • replicaID
    • is an identifier for writers or devices
  • note
    • consists of blocks
    • block
      • block-props
        • nested json object for block properties
        • each leaf has its own stamp
          • replicaID
          • timestamp
      • text
        • consists of spans
        • span
          • point
            • position identifier
          • content
            • attrs
              • length
              • text-props
                • flat json object
              • stamp
            • string (UTF16)
      • version
        • per replicaID
          • block-props version
          • text-points or DB_RECORD-point version

Readme

Keywords

Package Sidebar

Install

npm i @notebox/nb-crdt

Weekly Downloads

1

Version

4.0.1

License

AGPL-3.0-or-later

Unpacked Size

587 kB

Total Files

248

Last publish

Collaborators

  • kangmh