Prototypes LedgerP12 · CRM on the device
The server

What the CRM server holds

Every update the devices sent, as Yjs wrote it, read every 2 seconds. The server stores the updates per record, merges a record’s updates into one when there are more than sixteen, and tells every open device over a WebSocket when something new arrives.

MeasureCount
Contacts0
Deals0
Updates stored0
Bytes stored0
Records merged into one update0
Devices connected nowNone

Latest updates

FromRecordSize

No key The updates are not encrypted: a CRM’s server is where a team’s records are kept. P6 shows the other design, where the server holds only ciphertext.

How Ledger is built
  1. Each contact and each deal is a Yjs document on the device, stored in IndexedDB. The page is cached by a service worker, so it opens with no network.
  2. A change is written on the device first. The records with changes wait in a list, and each is sent as the difference from what the server has acknowledged.
  3. The server keeps every update and answers with the updates from other devices since the device’s last sync. Over the WebSocket the server sends a message when there is something new, with the record each device has open.
  4. Text merges letter by letter. Tags, people and tasks are sets and lists that keep what both sides added. A stage, an owner, an amount or a date chosen differently on two devices keeps both values, and each device shows the conflict until a person keeps one.