BalduchColab is a decentralized rich text block editor based on Peritext CRDT algorithm, built in Go and React. It uses a Peerster network to share document updates among peers in the network. Our objective is to make a user friendly application that can be installed to try out a Peritext like algorithm that includes blocks.
For this project, you need NodeJS (preferrably v18.17.0), Go (v1.23.1). For more instructions on how to install them, please refer to the dedicated webpages for Node and Go. You need to install the following libraries:
For the desktop app framework, you need to install Wails:
go go install github.com/wailsapp/wails/v2/cmd/wails@latest
We also use another library to get the IP Adress of the host:
go go install github.com/jackpal/gateway
To install all the javascript dependencies, you can run the following commands:
cd frontend
npm install
To run in live preview mode, run wails dev
in the project directory. Wails will compile the application and start a window with the editor.
To build a redistributable, production mode package, use wails build
.
To use BalduchColab with someone else, you need to first make sure that all the computers are in the same local network. You can then all launch the app and go to the 'AddPeer' screen. Here, you find the node IP address and port to share with other peers. You have to add each other using those addresses and ports. Once this is done, you can go on to editing a page in the Editor.
To create a document, click on the 'New Document' and give it a name. All the peers in the network that will participate in the editing of the document will have to do the same procedure. After that, you can all edit the page with the block editor.
At the top of the editor, you see a 'Sync' button. This allows you to:
- Send your changes to all peers in the network
- Get the new updated document given the modifications from everyone
If you have the error message too long
, you need to update the UDP buffer size with the following command
sudo sysctl -w net.inet.udp.maxdgram=65535
The implementation still needs to integrate some block types. Here are the currently not supported types:
- Code Block
- Table
- Image
- Audio
- Video
- File
- Emoji
We also need to refine the behavior detected in certain edge cases. If you find any bug, do not hesitate to submit an Issue to the repo: Create Issue