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.
Notes: RPC and sync
Start here for schema-validated calls, streams and invitation grants. Then replicate a single-owner Hyperbee and read it after the writer disconnects and the replica restarts.
Read moreCollaborative notes: Autobase
Approve a writer, edit while both transports are closed, restart and converge conflicting notes, then remove the writer. Node-only prototype with an explicitly installed engine.
Read moreLocal Goods: desktop RPC
A Bare worker owns a private cart and order database. A single-use invitation grants one device receipt queries; validated RPC returns selected fields without replicating the database.
Read moreRun the small examples
# 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-databaseBoth 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.