dr-frmr / crdt-crm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A simple CRDT app on Kinode

Uses automerge and autosurgeon to create a simple CRDT "CRM" app.

To build, use kit.

git clone git@github.com: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"]}'

About

License:Apache License 2.0


Languages

Language:Rust 50.7%Language:JavaScript 36.9%Language:CSS 9.6%Language:HTML 2.7%