Rust implementation of NextGraph, a Decentralized and local-first web 3.0 ecosystem
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Niko PLP 2f1712cd89 connection to broker 2 months ago
app-node ClientInfo 5 months ago
app-react raname sdk to ng-sdk-js 6 months ago
app-web raname sdk to ng-sdk-js 6 months ago
js copyright and readme 4 months ago
src connection to broker 2 months ago
Cargo.toml connection to broker 2 months ago
LICENSE-APACHE2 raname sdk to ng-sdk-js 6 months ago
LICENSE-MIT raname sdk to ng-sdk-js 6 months ago automatic including of sdk in web app 3 months ago
index.html wallet creation and login working on native app tauri 4 months ago
pkg.tar.gz adding a binary tar of the sdk 4 months ago
prepare-node.js raname sdk to ng-sdk-js 6 months ago


JS/WASM crate containing the SDK of NextGraph


NextGraph brings about the convergence between P2P and Semantic Web technologies, towards a decentralized, secure and privacy-preserving cloud, based on CRDTs.

This open source ecosystem provides solutions for end-users and software developers alike, wishing to use or create decentralized apps featuring: live collaboration on rich-text documents, peer to peer communication with end-to-end encryption, offline-first, local-first, portable and interoperable data, total ownership of data and software, security and privacy. Centered on repositories containing semantic data (RDF), rich text, and structured data formats like JSON, synced between peers belonging to permissioned groups of users, it offers strong eventual consistency, thanks to the use of CRDTs. Documents can be linked together, signed, shared securely, queried using the SPARQL language and organized into sites and containers.

More info here

JS/WASM module

This crate is composed of

  • the npm package ng-sdk-js which is the SDK
  • an example of web app using the ESmodule and webpack as bundler app-web
  • an example of React web app app-react
  • an example of node-js app app-node
  • index.html an example of vanilla JS usage of the SDK


Documentation can be found here

And our community forum where you can ask questions is here

For developers

Read our getting started guide.

npm i ng-sdk-js

For contributors

We recommend contributors to use the production build, as the creation and opening of wallets is very slow in the dev build. Only use the dev build when debugging the sdk. see the next chapter for the production build. Please note that the dev and prod builds share the same output folder, they thus override each other. When building the app, be sure to have the production build of the SDK in the output folder.

wasm-pack build --dev --target bundler

wasm-pack build --dev -t nodejs -d pkg-node
node prepare-node.js

For testing in vanilla JS

wasm-pack build --dev --target web -d web
python3 -m http.server
// open http://localhost:8000

Or automated testing with headless chrome:

wasm-pack test --chrome --headless

Production build

wasm-pack build --target bundler
tar --exclude .DS_Store -zcvf pkg.tar.gz pkg
wasm-pack build -t nodejs -d pkg-node
wasm-pack build --target web -d web
node prepare-node.js
cd pkg
npm publish --access=public
cd ../pkg-node
npm publish --access=public

Example Plain JS web app

cd ../app-web
// for local development
npm install --no-save ../pkg
// or, for install from npm registry: npm install
npm start

Open this URL in browser : http://localhost:8080

Example React web app

cd ../app-react
// for local development
npm install --no-save ../pkg
// or, for install from npm registry: npm install
npm run dev

This URL will open automatically in browser : http://localhost:8080

Example NodeJS app

cd ../app-node
// for local development
npm install --no-save ../pkg-node
// or, for install from npm registry: npm install
npm run start

Contributions license

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as below, without any additional terms or conditions.s


Licensed under either of

SPDX-License-Identifier: Apache-2.0 OR MIT

NextGraph received funding through the NGI Assure Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 957073.