How This Works
What actually happens when you open a Reality2 capability. Where your data goes. Why there's no account.
When you first open Notekeeper
Your browser fetches a web page
Just like any website. The page is served from GitHub - it's static HTML, CSS, and a 70KB WebAssembly file. That WASM file is the entire R2 protocol stack - encryption, trust groups, mesh routing - compiled from Rust.
The page caches itself
A service worker stores all the files on your device. From this moment on, your browser never needs to contact GitHub again. The next time you open the page, it loads instantly from your local cache. Pull the network cable - it still works.
You create a trust group
Cryptographic keys are generated right here, in your browser. An Ed25519 signing key, a data encryption key, an HMAC key. These keys never leave your device. There is no server that has a copy. No company that knows they exist.
You start writing
Notes are stored in your browser's local storage. They're right there on your device, alongside the keys. No server, no database, no cloud upload. Close the tab, reopen tomorrow - your notes are still there.
When you add another device
You generate an invitation
Your browser creates a short code and a QR code. These contain your trust group identity and a single-use join secret, encrypted so only the right device can use them.
Your other device joins
On your phone, you scan the QR code. The page loads (from GitHub, or from cache if you've visited before). The WASM stack runs the join handshake - X25519 key exchange, XChaCha20-Poly1305 encryption. Your phone now has its own copy of the trust group keys.
Both devices connect through a relay
The relay is a simple server that forwards encrypted messages. It knows which devices belong to the same trust group (by a hash), but it can't read what they're saying. It's a postal service carrying sealed envelopes.
Notes sync
When you edit a note on your laptop, the change is encrypted with your trust group key, sent through the relay, decrypted by your phone, and stored locally. The relay saw only ciphertext. GitHub saw nothing at all.
Where everything lives
What the relay sees
What happens on second visit
Nothing goes to GitHub
The service worker serves the page from local cache. Your trust group keys and notes load from localStorage. If you have a relay connection, sync resumes. The whole thing starts in milliseconds, entirely from your device.
What's in the files
Total transparency. Here's exactly what runs on your device:
Total download: about 500KB. After first visit, everything is cached - no further downloads. The source is public at github.com/reality2-ai/r2-notekeeper. The WASM is compiled from the Rust crates in r2-core (not yet public - coming soon).