MYND Synchron: Reading a Sync Engine Against the Word CRDT
Conflict-free replicated data types were formalised by Marc Shapiro, Nuno Preguica, Carlos Baquero and Marek Zawirski in their 2011 work on convergence under eventual consistency. The core promise is that replicas can take updates without coordinating and still converge, because the merge is built into the data type. The README of my repo MYND Synchron mentions CRDT operations. I went to the sync engine to see whether the code matches that word.
What the code does
backend/src/sync-engine/index.ts is about 4 KB. It takes a SHA-256 hash of the state to check integrity. It encrypts payloads with AES through the crypto-js library. It detects conflicts by recursively diffing two versions of an object and labelling each difference with a severity. It merges by object spread, or by set union for arrays.
Why that is not a CRDT
A CRDT needs a merge that is commutative, associative and idempotent, so that any order of delivery gives the same result. A spread merge keeps whichever side is applied last, so order matters. Set union is safe for adds but cannot represent a delete. The engine is a reasonable diff-and-merge layer. It is not a CRDT, and the code does not claim to be one. Only the README wording does.
Two other details
The encryption falls back to a fixed default key string when no key is configured, and the server falls back to a default JWT secret. Both are common in demos and both must be overridden in any real deployment. The repository metadata shows no license, while the README text says MIT, so the licence status is unclear until a LICENSE file is added.
My opinion
My view, not a fact from the code: the honest fix is to change the README to say diff-and-merge with severity labels, and to leave CRDTs for a version that implements one, for example a last-writer-wins register or an add-wins set. Naming a thing correctly costs nothing and saves a reader an hour.
Sources
Shapiro, Preguica, Baquero, Zawirski, Conflict-free Replicated Data Types, Springer 2011 and INRIA report RR-7687: inria.hal.science/hal-00932836. Code: github.com/yethikrishna/mynd-synchron, sync-engine/index.ts and server.ts, read on October 10, 2026.