Generalized DNA for building real-time shared-state hApps on holochain
Syn: Etymology. From Ancient Greek συμ- (sum-), variant of συν- (sun-), from σύν (sún, “with, in company with, together with”).
This project makes it easy to build collaborative apps in the distributed peer-to-peer context of Holochain. Syn uses Holochain's infrastructure for data integrity and peer-to-peer networking to store regular "commits" of the shared content's state, while coordinating batches of delta's that comprise those commits between nodes. The approach is generalized for many different use-cases, where the app-developer need only define:
For more details read the design documents, read the article, and check out the example app, SynText, in the /ui directory.
nix-shell
.git clone https://github.com/holochain/syn && cd ./syn
nix-shell
.npm install
npm run build:happ
We have provided a sample UI that implements collaborative text editing in a minimal editor. To run this UI in test mode:
npm run start
And the same in another terminal:
npm run start
Now open two browser tabs pointing to the locations that the output from those commands indicates.
Now you should be able to see both agents and start editing text on either tab and see it appear on the other.
npm run test
Copyright (C) 2020-2021, Holochain Foundation
This program is free software: you can redistribute it and/or modify it under the terms of the license provided in the LICENSE file (CAL-1.0). This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.