It is inspired by CRDTs, but does not use ones. Instead, it lifts off some constraints and adapts algorithms to its own environment. e.g., Figma has a centralized server to coordinate update.
Internally, Figma is a tree editor.
Each node has an ID and a set of properties.
Each client must be able to generate globally unique IDs.
Parenting relationship is organized as children storing a “parent” property.
Reordering/reparenting is implemented as changing this “parent” property.
Delete + re-insert with different ID is not viable because concurrent changes still need to be synced.
The general flow is that server maintains a LWW (last writer win) registers for properties (where “last writer” means last client sending an update).
When a client connects to server, servers sends the whole state to the client. Then, they exchange changes.
If client was disconnected, it can continue editing offline. When client is re-connected, it downloads the whole document again and re-applies his changes.
Server does not store history or any tombstones. Clients store their history and are responsible for restoring previous state.