> 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 [https://nextgraph.org](https://nextgraph.org)
## JS/WASM module
This module is part of the SDK of NextGraph.
This crate is composed of
It is composed of
- the npm package `ng-app-js` which is the SDK
- the plain JS web app `app-web`
- the React web app `app-react`
- the node-js app `app-node`
- the npm package `ng-app-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
## Support
@ -31,7 +31,7 @@ And our community forum where you can ask questions is here [https://forum.nextg
Read our [getting started guide](https://docs.nextgraph.org/en/getting-started/).
```
npm i ng-app-js-sdk
npm i ng-sdk-js
```
## For contributors
@ -39,25 +39,28 @@ npm i ng-app-js-sdk
```
wasm-pack build --target bundler
cd pkg
// if you have access to npm registry and want to publish the package
// if you have access to npm registry and want to publish the package
// npm publish --access=public
cd ..
wasm-pack build -t nodejs -d pkg-node
node prepare-node.js
cd pkg-node
// if you have access to npm registry and want to publish the package
// if you have access to npm registry and want to publish the package
// npm publish --access=public
```
For testing in vanilla JS
For testing in vanilla JS
```
wasm-pack build --target web -d web
python3 -m http.server
// open http://localhost:8000
```
```
Or automated testing with headless chrome:
```
wasm-pack test --chrome --headless
```
@ -67,7 +70,7 @@ wasm-pack test --chrome --headless
```
cd ../app-web
// for local development
npm install --no-save ../pkg
npm install --no-save ../pkg
// or, for install from npm registry: npm install
npm start
```
@ -84,7 +87,7 @@ npm install --no-save ../pkg
npm run dev
```
Open this URL in browser : [http://localhost:8080](http://localhost:8080)
This URL will open automatically in browser : [http://localhost:8080](http://localhost:8080)
### NodeJS app
@ -105,9 +108,10 @@ additional terms or conditions.s
## License
Licensed under either of
* Apache License, Version 2.0 ([LICENSE-APACHE2](LICENSE-APACHE2) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
- Apache License, Version 2.0 ([LICENSE-APACHE2](LICENSE-APACHE2) or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)