Get started
Learn by running an app
Three examples that connect library APIs to visible application behavior.
Content reviewed 30 October 2026
Run these examples from a repository checkout with Node 22.17 or later. Each uses the local P2P source; the typed RPC and database APIs are available in published 0.6.0-alpha.2. Clone the repository first with the commands below. Each example section starts at that repository root; open a new terminal there when switching examples.
git clone https://github.com/unstoppable-stack/unstoppable-dev.git unstoppable-examples
cd unstoppable-examplesReplicate notes between peers
Use openCollection to copy JSON between two app instances. The library owns storage, discovery and replication; the example needs public UDP peer discovery and prints the copied note.
npm ci --prefix packages/p2p
npm ci --prefix examples/p2p-data
npm run mirror --prefix examples/p2p-data- Look for: Hello from another app, read from the second app’s local copy.
- API:
openCollection, put, sync, get and close. - Boundary: one writer, read-only replicas and a known download checkpoint. No automatic backup or conflict resolution.
Merge offline edits
Start with the managed collaborative database: Alice explicitly admits Bob, Bob writes a note, and Alice reads it. The advanced offline example also tests restart and conflict convergence.
npm ci --prefix packages/p2p
npm ci --prefix examples/p2p-data
npm run collaborate --prefix examples/p2p-data- Look for: Written by Bob, read from Alice’s local view.
- API:
openCollaborativeDatabase,members.add, put, get and close. - Boundary: no rich-text merge, administrator recovery, schema migration or complete backup. Pairing alone does not authorize database writes.
Build a local shopping assistant
Local Goods combines a product catalog, persistent cart, demo order lookup, scoped peer receipt retrieval and optional QVAC chat. Electron displays the UI; a Bare worker owns storage, P2P and inference. The maintainer validation platform is macOS Apple Silicon; other platforms remain unverified.
npm ci --prefix packages/p2p
cd examples/ecommerce-assistant
npm ci
npm run dev- Try it: add products, save a demo order, restart and look up its receipt. Load Assistant separately to ask about the catalog.
- Libraries: Bare worker, Hyperbee persistence, P2P scoped RPC and QVAC with vendored lifecycle helpers.
- Boundary: checkout records a demo order only; it does not charge money or fulfill purchases. AI requires a model download and separate native/offline acceptance.
Build your own version
Start with the desktop scaffold, choose a local data model, then add one peer or AI interaction. Use the examples to learn contracts and behavior; keep your own schemas, prompts and UI in the app.