Uses automerge and autosurgeon to create a simple CRDT "CRM" app.
To build, use kit.
git clone [email protected]:dr-frmr/crdt-crm.git
cd crdt-crm
kit b
If you have a node running locally, use kit s
to install (use -p flag to select a port, default is 8080).
Sample usage (assuming two nodes named fake1.os
and fake2.os
have app installed):
On fake1.os
:
m our@contacts:crdt-crm:mothu-et-doria.os '{"AddPeer": ["fake2.os@contacts:crdt-crm:mothu-et-doria.os", "ReadWrite"]}'
On fake2.os
:
m our@contacts:crdt-crm:mothu-et-doria.os '{"AddPeer": ["fake1.os@contacts:crdt-crm:mothu-et-doria.os", "ReadWrite"]}'
Now, you can use the app on both nodes, and they will merge with one another.
m our@contacts:crdt-crm:mothu-et-doria.os '{"AddContact": ["Doria", {"description": "hai", "socials": {}}]}'
m our@contacts:crdt-crm:mothu-et-doria.os '{"RemoveContact": "Doria"}'
m our@contacts:crdt-crm:mothu-et-doria.os '{"EditContactSocial": ["Doria", "Telegram", "t.me/doria"]}'