Skip to content

Quick start from source

In about five minutes, you will build the eleven Peerborne library workspaces and run the real browser example in Chromium. The smoke test initializes Helia and libp2p, opens an Automerge document, and fails on browser runtime errors.

  • Node.js 26.13.1, matching the version pinned in .tool-versions
  • Corepack 0.36.0, which Node.js 26 no longer bundles
  • Git
  • A Chromium-compatible host for the browser smoke test

Docker is not required for this quick start.

Add a task on either side, choose Go offline, add a different task on each side, and Reconnect. Both lists should contain the two additions. This exercise runs real Yjs merge and Web Crypto in one page through an illustrative channel; the boundary is described below the component. Then follow the steps to open a real Peerborne document locally.

This simulation needs JavaScript and the Web Crypto API. See therunnable repository examples instead.

Initializing simulation…

Illustrative simulation: this runs real Yjs delta/merge via Peerborne’s YjsProvider and uses its SubtleCryptohelper for AES‑GCM encryption and ECDSA P‑384 signatures. It is not protocol-equivalent to Peerborne networking and does not exercisePeerborneDocument, ACL or key onboarding, Helia or a blockstore, libp2p or GossipSub, or any real transport. See therunnable examples for full application setups.

  1. Clone the repository and enable Yarn.

    Terminal window
    git clone https://github.com/Peerborne/peerborne.git peerborne
    cd peerborne
    npm install --global corepack@0.36.0
    corepack enable

    Confirm that the active Node.js version satisfies the repository requirement:

    Terminal window
    node --version
  2. Install the locked dependency graph.

    Terminal window
    yarn install --immutable

    --immutable prevents Yarn from silently changing the lockfile, matching the project’s CI environment.

  3. Build the library workspaces.

    Terminal window
    yarn build

    This typechecks and emits all eleven library workspaces in dependency order.

  4. Install Chromium and run the browser smoke test.

    Terminal window
    yarn exec playwright install chromium
    yarn test:e2e:browser-test

    On Linux hosts that need browser system libraries, use:

    Terminal window
    yarn exec playwright install chromium --with-deps

    A successful run ends with one passing Playwright test. It proves that the Vite browser application starts without runtime errors and that a real Peerborne document opens using the configured Automerge, crypto, ACL, and keychain providers.

  5. Run the example interactively.

    Terminal window
    yarn workspace @peerborne/browser-test start

    Open the URL printed by Vite. In the Open Document field, enter a path such as /quick-start/demo, then choose Create. The page displays the document and the local libp2p node addresses.

This quick start exercises a real Peerborne document in one browser process:

  • workspace package compilation and TypeScript declarations;
  • browser initialization of Helia and libp2p;
  • document creation and local content-addressed storage;
  • Automerge provider, serializers, signing, encryption, ACL, and keychain setup;
  • browser runtime behavior checked by Playwright.

This one-browser quick start does not demonstrate persistence across browser restarts or collaboration by itself. The separate Docker-backed acceptance job below covers a narrow online, founder-plus-one invitation path. Sharing an identity signing key between tabs is not sufficient to transfer a document encryption key.

The repository also contains heavier acceptance suites:

  • yarn test:e2e builds and smoke-tests the browser-test, wiki-swarm, password-manager and Peerborne Note examples, Note’s relay suite, and the framework-free, framework, editor and SSR integration examples.
  • yarn test:integration exercises the integration topology after its Docker Compose services are running.
  • yarn test:nat exercises NAT traversal after its Docker Compose topology is running.
  • yarn test:peerborne-nat uses separate signing identities in two NAT-isolated Chromium processes, accepts a signed editor invitation through Circuit Relay without exposing a plaintext document key or injecting one through the test bridge, and verifies fresh Automerge mutations in both directions.

The Docker-backed suites are started and cleaned up by their corresponding CI jobs in the repository workflow. Use that workflow as the canonical command sequence rather than running the test commands without their services.

Release validation packs all eleven libraries and installs the exact tarballs in a clean Node 26.13.1 consumer. It checks all supported library ESM and native CommonJS import paths, shared export identity, strict TypeScript typechecking for both module styles with NodeNext resolution, and a Vite build. The packages remain unpublished; this does not prove registry installation, browser runtime behavior, or packaged daemon execution. Until publication:

  • use Yarn workspace package names such as @peerborne/core;
  • do not copy future npm install commands from issues or old documentation;
  • treat private signing keys, KEM keys, and document keys as distinct persisted data when designing an application;
  • consult the feature and verification audit for the evidence behind capability claims.

For a change to these packages, the minimum completion commands are:

Terminal window
yarn build
yarn test

Run the documentation build with the Node runtime pinned in the repository’s .tool-versions.

Run the focused browser or Docker-backed suite as well when changing the behavior it covers.

  • Your first React workspace — copy a ten-line component and its full node/context setup
  • Documents, Identities, and Epoch Transitions — the three boundaries to understand before sharing
  • Production Runbooks — evaluate persistence limits and relay operation
  • Why Peerborne? — understand the value proposition and when to use it
  • Architecture — see how the pieces fit together with diagrams
  • Concepts — dive into local-first design, CRDTs, networking, storage, and security
  • Peerborne Note — try the initial-release demo and review its boundaries
  • Cookbook — try runnable recipes for wikis, password managers, React, Redux, and more
  • API reference — explore the generated API documentation for all eleven packages
  • FAQ — answers to common questions
  • Contributing — set up a development environment and make your first contribution