Goal: a simple chat-like UI that:
- logs the user into the relay (hosted bus)
- pairs with a local node via QR payload
- encrypts outgoing messages and decrypts incoming messages
v1 is kept intentionally static: no build step required.
The client can prefill pairing fields from query params:
pair_b64: URL-safe base64 encoded pairing JSON (preferred)pair_payload: raw JSON string (URL-encoded)relay_url: optional relay URL override/prefill
The UI opens camera scan mode automatically when not connected. It supports QR values containing:
- raw pairing payload JSON
- deep-link URL containing
pair_b64/pair_payload/relay_url - bare
pair_b64value
On iPhone, scanning is intentionally gated to the installed Home Screen app context.
The UI includes an Install button:
- Chrome/Edge/Android: uses the native install prompt when available.
- iPhone Safari: shows guidance to use
Share -> Add to Home Screen.
After pairing:
- The app attempts push setup automatically.
- If browser permission needs interaction, tap the
Pushbutton. - The client remembers pairing state in
localStorageand restores it on next load.
Requirements:
- Client must run in a secure context (
https://...). - Relay must expose VAPID config via
GET /v1/push/config(enabled when VAPID env vars are set).
- Avoid third-party scripts.
- Use a CSP meta tag in
index.html. - Render decrypted content as text (or sanitized markdown).
- Re-enable and tighten the CSP meta tag in
index.html(temporarily commented out for deployment testing with variable relay URLs).