Skip to content

A shared document application akin to Google Docs utilising WebRTC peer-to-peer protocol. Example usage of wasm-peers library.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

wasm-peers/live-document

Repository files navigation

Live Document

Proof of concept application showcasing the usability of wasm-peers crate for easy and costless peer-2-peer WebRTC communication.

It's an application akin to Google Docs, where many users can share a document and see changes introduced by any of them in real-time.

It was written in Rust, compiles down to WASM and can be hosted as a set of static files, no backend required.

Check out the live demo here.

Overview

This application uses wasm-peers crate to provide many-to-many connection between each pair of connecting peers.
Thanks to that, even if the original creator of the document leaves, copy of the work is still stored and distributed by each peer.

It also utilises yew framework for creation of Single Page Application.

Local development

To run the game locally you must have Rust and trunk installed.

Signaling server from wasm-peer project should be running on 0.0.0.0:9001. See here for instructions.

For now, only env variable without the default is the signaling server address in production, it should be some publicly available server, for ex. EC2 instance (tiny one should suffice).

For development, you can run the project in watch mode:

SIGNALING_SERVER_URL="ws://0.0.0.0:9001" trunk serve # comes with awesome hot-reloading

If you only want to build the static files:

SIGNALING_SERVER_URL="ws://0.0.0.0:9001" trunk build

This will create a dist folder with index.html and all the other required files. You can serve them any way you like.

Roadmap

  • Add reference to GitHub
  • Use proper CRDT
  • Save and retrieve file contents from local cache

Authors

Tomasz Karwowski
LinkedIn

License

This project is licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

A shared document application akin to Google Docs utilising WebRTC peer-to-peer protocol. Example usage of wasm-peers library.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published