How Dapp Builder Works

A plain-language tour of the architecture, data storage and synchronization. For the technical guide to building your own apps, see Building your own Code Dapps.

The principle: your data stays with you

Dapp Builder is local-first. All data — dapp configuration, members, records, app source code — lives exclusively on your devices, stored in the browser's local database (IndexedDB). There is no central server holding your content and there are no accounts. The app works fully offline; after the first install, even the interface itself loads without a network connection thanks to a service worker.

When several devices share a dapp, its content syncs directly from device to device — over encrypted WebRTC connections. Every device keeps its own conflict-free copy of the data (a CRDT, technically Yjs). Changes can therefore happen in parallel on multiple devices and are merged automatically, without data loss, the next time the devices meet.

How a dapp is built up

Every dapp consists of two separate documents:

DocumentContents
Dapp documentMetadata (name, icon, color), member list, optional data schema, the actual records, and generic app state.
Source documentA Code App's source files (e.g. index.html, manifest.yaml). It lives in its own database and travels over the same member-verified connections as the dapp document — no extra secret inside invites. Only source that an owner has signed is run on the members' devices.

Synchronization: WebRTC, brokered only at first contact

Devices find each other through a signaling server that only brokers the initial introduction — like a notice board where two devices arrange to talk directly. The data transfer itself runs peer-to-peer between the devices and is end-to-end protected. The signaling operator never sees dapp content; during brokering, connection data (such as IP addresses) is exchanged between the devices as with any WebRTC connection — details in the privacy policy.

A dapp's documents are exchanged only between devices that have proven a member key: when two devices connect, each signs a fresh challenge with its identity key, and the other checks that key against the dapp's signed member list before a single byte of the dapp is sent. Knowing a dapp's connection secret is not enough. A device that an owner removes is refused by every other device as soon as they have learned of the removal.

The signaling server is the only central infrastructure, and it can be self-hosted: the app accepts a custom server via the build variable VITE_SIGNALING_URL. In rare, very restrictive networks (e.g. strict corporate firewalls) a direct connection may fail — in every case your data remains safe locally and catches up later.

Identities and access control

On first start the app generates a cryptographic key pair (Ed25519) on your device. That key is your identity — no accounts, no passwords. The private key is stored so that it cannot be read out again, not even by the app itself; it never leaves the device. Each device therefore has its own identity — a second device of yours is simply invited to your dapps as another member.

Every dapp knows its members and their roles:

Sensitive changes (member list, record deletions, role assignments) are cryptographically signed by the owner. Every device verifies each incoming change against these signatures: anything not properly signed is reverted automatically. Deleted records are marked with signed tombstones so older copies on other devices cannot resurrect them. A member cannot simply grant themselves more rights — all devices jointly enforce this.

Contacts: private pairing

Before you can share a dapp with someone, a relationship is established through pairing: one person creates a short-lived, signed invite (dapp://invite/pair/…) which is entered on the second device. The invite opens a one-time lobby; both sides see the other's signed request and approve deliberately. For verification, both devices display the same safety number derived from the two keys — if it matches on both screens, the connection has not been tampered with.

Each pairing receives its own relationship identity and its own encrypted control room. Isolating people from one another is a core principle: what you share with person A is technically invisible to person B.

Sharing dapps: offers, isolated channels, revocation

Sharing a dapp runs over the control room of the respective relationship:

  1. The sender creates a signed offer (with app metadata and optionally the signed app package).
  2. The recipient sees the offer in their inbox ("People & Sharing") and decides consciously — for attached app packages including a mandatory preview and signature verification before installation. Open requests expire after ten minutes.
  3. Upon acceptance, a separate, isolated data channel is created for exactly this app and this relationship. The control room itself never carries app data — only control messages (offers, acknowledgements, revocations).
  4. A revocation removes exactly that channel — other shared apps with the same person remain untouched.

Pending offers remain visible as inbox entries and can be revoked at any time — even if the other device never received them. App packages (.dapp files) contain only metadata and source code, never records, members or credentials; installation always creates fresh, independent credentials.

Code dapps: your app inside a sandbox

An app's visible part is a Code App: a synchronized index.html running inside a strictly separated sandbox (an iframe with an opaque origin). Network access, external scripts, nested frames and forms are blocked by a content security policy; the app talks to the framework through a small, role-checked API ($data, $store, $router and friends). How to build your own Code Apps is explained in Building your own Code Dapps. Eleven ready-made starter apps — among them To-Do List, Shared Expenses, Diary, Group Chat, Recipe Book and Shopping List — serve as templates and can be modified freely.

Install as an app

Dapp Builder is an installable web app (PWA): via your browser's menu ("Add to home screen" / "Install app") it gets its own icon and its own window without browser chrome. Installing additionally protects local data — notably on iOS, where non-installed web apps may have their data evicted after seven days of disuse. Once installed, the app starts even without an internet connection.

An always-on device of your own (keeper)

Peer-to-peer means a change only travels while two devices are online at the same time. For that there is an optional keeper: the same software without a screen, running on a machine of yours (a NAS, a small server). It is invited to a dapp like any other device, keeps a copy and passes changes on, so your phone and your laptop stay in step even if they are never online together. It uses the same signed protocols as the app itself — it cannot write anything a member device could not, and it cannot give itself access to a dapp.

What deliberately does not happen