Packages
Choose a P2P example
Working apps for scoped RPC, single-owner replication and collaborative offline databases.
Content reviewed 16 October 2026
Version-matched examples
Install @unstoppable-stack/p2p@0.6.0-alpha.3 for these APIs. The repository demos use local source links; the quick starts below use npm. All APIs remain experimental.
Notebook + Briefing + Personal Node
Two independent command-line apps share a versioned service and read notes from a restarted node while the writer is stopped. Experimental source example with actual desktop pairing, friendly data browsing, and source-offline retrieval on one computer.
Read moreSimple data sync
Start here: a JSON collection or collaborative database with managed storage and replication. Complete runnable examples on each page.
Read moreNotes: 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.