Skip to content

Packages

Choose a P2P example

Working apps for scoped RPC, single-owner replication and collaborative offline databases.

Verified 16 October 2026

Version-matched source examples

These examples use the 0.6.0-alpha.2 candidate through local source links. Published alpha.1 does not contain /rpc or /db. Run from a checkout until alpha.2 is published. All APIs remain experimental.

Run the small examples

sh
# From the repository root, Node 22.17+
npm ci --prefix packages/p2p
npm ci --prefix examples/p2p-notes
npm run demo --prefix examples/p2p-notes
npm ci --prefix examples/p2p-database
npm run demo --prefix examples/p2p-database

Both small demos use an isolated real loopback DHT and temporary storage. They need no public discovery, Personal Node, account, model or wallet. Their tests establish the demonstrated local flows, not Internet reachability, full backup or production database acceptance.

Pick the data boundary

  • RPC: the host owns data and decides which validated results to return. Both devices must be online for a fresh call. Use this for private app data and scoped business actions.
  • Sync: devices retain single-owner datasets for offline reads. Giving the necessary dataset material can expose its contents independently of RPC method grants.
  • Database prototype: admitted devices append offline operations and derive a deterministic view after reconnecting. Apps own conflict semantics, schemas and secret distribution; the founder currently owns administration and indexing.
Need help? Report an issue with your CLI version, platform, command and first relevant error.