CoJSON

CoJSON ("Collaborative JSON") will be a minimal protocol and implementation for collaborative values (CRDTs + public-key cryptography).

CoJSON is developed by Garden Computing as the underpinnings of Jazz, a framework for building apps with telepathic data.

The protocol and implementation will cover:

  • how to represent collaborative values internally
  • the APIs collaborative values expose
  • how to sync and query for collaborative values between peers
  • how to enforce access rights within collaborative values locally and at sync boundaries

THIS IS WORK IN PROGRESS

Core Value Types

Immutable Values (JSON)

  • null

  • boolean

  • number

  • string

    • stringly-encoded CoJSON identifiers & data (CoValueID, AgentID, SessionID, SignatoryID, SignatorySecret, Signature, RecipientID, RecipientSecret, Sealed, Hash, ShortHash, KeySecret, KeyID, Encrypted, Role)
  • array

  • object

Collaborative Values

  • CoMap (stringImmutable, last-writer-wins per key)
    • Team (AgentIDRole)
  • CoList (Immutable[], addressable positions, insertAfter semantics)
    • Agent ({signatoryID, recipientID}[])
  • MultiStream (independent per-session streams of Immutables)
  • Static (single addressable Immutable)

Implementation Abstractions

  • MultiLog
    • Session Logs
    • Transactions
      • Private (encrypted) transactions
      • Trusting (unencrypted) transactions
    • Rulesets
  • CoValue Types
  • LocalNode
    • Peers
    • AgentCredentials
  • Peer

Extensions & higher-level protocols

More complex datastructures

  • CoText: a clean way to collaboratively mark up rich text with CoJSON
  • CoJSON Tree: a clean way to represent collaborative tree structures with CoJSON
Description
A new kind of database that's distributed across your frontend, containers, serverless functions and its own storage cloud.
Readme 75 MiB
Languages
TypeScript 81.8%
MDX 11.5%
JavaScript 3.1%
Rust 2.4%
CSS 0.5%
Other 0.6%