Ultra-lean, low-bandwidth Nostr web client and workspace ecosystem tailored for engineers, systems thinkers, and technical operators.
zup is built from first principles for performance-conscious engineers who demand absolute cryptographic privacy, zero bandwidth waste, and high-density technical interfaces. It combines a local-first reactive database (Dexie IndexedDB) with single-socket multiplexed relay connections, hardware-backed/Argon2id vault encapsulation, and an in-browser companion CLI (@zup/cli).
- Absolute Local Zero-Knowledge Root (Invariant 1)
Raw
nsec(private key) and the 256-bit Master Encryption Key (MEK) never persist unencrypted across disk, network, or server storage. All IndexedDB records are wrapped via AES-GCM (256-bit) with randomized 12-byte IVs. - Singular Vault, Multi-Identity Encapsulation (Invariant 2)
One Master Password or WebAuthn PRF passkey unseals one persistent vault MEK. That single key decrypts all personas. Switching active personas is an in-memory pointer swap (
localStorage["zup:active_pubkey"]) that leaves the root MEK intact. - Single-Socket Multiplexing via SharedWorker (Invariant 3)
All browser tabs route through a single connection pool (
public/relay-worker.js). WebSockets to relays (nos.lol,relay.damus.io,relay.primal.net,nostr.wine) open once per origin, eliminating multi-tab connection floods, duplicate downloads, and rate limits. - Asynchronous Signature Ingestion (Invariant 4) Relay ingestion, Schnorr signature verification, and deduplication occur off the main thread. React views are purely passive, reactive consumers of Dexie IndexedDB tables.
- Bandwidth Zero-Waste Mandate (Invariant 5)
- External media (
.png,.jpg,.mp4) never auto-load; unhydrated tactile placeholders display domain metadata and byte estimates until clicked. - User profiles (
kind: 0) cache locally for 7 days before issuing network queries. - All relay queries pass incremental
since: latest_cached_timestampanchors.
- External media (
- Upstream Cloud & Turso Sync Readiness (Invariant 6) Every local table schema supports bidirectional, conflict-free Last-Write-Wins delta replication to remote LibSQL/Turso edge databases without exposing unencrypted keys.
- Inverted Surfaces Architecture:
- Outer Shell & Panels:
#161412(deep ash). - Component Cards, Input Wells, & List Tiles: Strictly
#000000(pitch black).
- Outer Shell & Panels:
- Pure White Typography:
- Labels and copy use crisp
#FFFFFFexclusively. Hierarchy is established through font weight (800/900 bold vs 500/600 medium), uppercase tracking (tracking-wider), and scale—never dimmed or washed-out grays.
- Labels and copy use crisp
- High-Contrast Solid Boundaries:
- Formal 1px outlines (
border border-white/20, hoverborder-white/50). - Active navigation highlights use semantic section colors:
- Vault / Signer: Emerald
#10B981(with subtle drop-glow) - Feeds / Notes: Pink
#EC4899 - Relays / Network: Amber
#F59E0B - Sync / Telemetry / CLI: Indigo
#6366F1
- Vault / Signer: Emerald
- Formal 1px outlines (
- Navigation Architecture:
- Desktop: Persistent Left Sidebar (
w-60tow-64) with direct access to Feeds, Vault, Relays, Telemetry, Cloud Sync, CLI Terminal, and a quick+ Dispatchbutton. - Mobile: Minimalist topbar and fixed tactile Bottom Navigation Bar with 5 key slots and a centralized highlighted
+dispatch action button. - Desktop Right Sidebar Drawer (
460px–560px): Opens when inspecting raw cryptographic events or composing dispatches, keeping primary navigation unobstructed.
- Desktop: Persistent Left Sidebar (
.
├── ARCHITECTURE.md # Technical specification & system invariants
├── AGENTS.md # Autonomous agent development directives & code invariants
├── README.md # Project overview & architectural guide
├── app/
│ ├── globals.css # Tailwind CSS v4 styling & dark theme variables
│ ├── layout.tsx # Root layout with dark HTML class and metadata
│ └── page.tsx # Main workspace entry point (Left Sidebar + Bottom Navbar)
├── components/
│ ├── feed/ # Technical feeds, kind 1 & 30023 dispatches, click-to-load media
│ ├── vault/ # Vault manager, Argon2id KEK derivation, identity switcher
│ ├── relays/ # Relay pool status, latency monitor, manual relay connector
│ ├── telemetry/ # Local behavior visualizer, affinity graphs, dwell inspector
│ ├── sync/ # Turso/LibSQL delta replication engine & sync diff viewer
│ ├── cli/ # Interactive @zup/cli terminal emulator for keyboard operators
│ ├── modals/ # Tactile drawer / right sidebar inspector (Inspect Raw, Event Signer)
│ └── ui/ # Reusable OpenBricks 4.0 tactile primitives (SegmentedControl, ActionTile)
├── lib/
│ ├── core/
│ │ ├── crypto/ # AES-GCM-256, PBKDF2/Argon2id, BIP-340 Schnorr signing & Bech32
│ │ ├── nostr/ # Canonical event serialization, SHA-256 event ID, validation
│ │ └── types/ # KeychainSlot, EncryptedIdentity, LocalEvent, UserTelemetry
│ ├── db/ # Dexie instance `zup_engine_v1`, seeds, live helpers
│ ├── state/ # Active identity pointer, volatile vault unlock status, RAM zeroing
│ ├── sync/ # Turso/LibSQL delta sync engine & zero-knowledge audit
│ └── workers/ # Relay multiplexer, connection pooling, batch ingestion
└── public/
└── relay-worker.js # SharedWorker background multiplexer
- Dense engineering stream with unboxed metadata (
·typographic separators). - Support for short technical notes and long-form markdown specifications (RFCs).
- Click-to-load bandwidth gate intercepting external CDN images.
- Real-time
IntersectionObserverdwell time profiling (>75% visibility for >800ms).
- Argon2id / PBKDF2 KDF: Derives Key Encryption Key (KEK) from Master Password.
- Volatile In-Memory MEK: Unwrapped key lives strictly in RAM closures.
- Idle Memory Zeroing: Purges keys from memory after 10 minutes of inactivity or explicit manual lock.
- Roundtrip Validation: In-memory test decryption before committing ciphertexts to IndexedDB.
- Multi-Identity Persona Ring: Instant pointer switching between personas without re-entering root passwords.
- Live WebSocket pooling across
wss://nos.lol,wss://relay.damus.io,wss://relay.primal.net, andwss://nostr.wine. - Real-time latency tracking, ping monitors, reconnect backoff, and 100ms micro-batch Dexie ingestion.
- Custom relay addition and persistent connection status.
- Right sidebar drawer displaying exact canonical NIP-01 JSON serialization
[0, pubkey, created_at, kind, tags, content]. - Live SHA-256 event ID recalculation and verification.
- 64-byte BIP-340 Schnorr signature breakdown into 32-byte
$r$ commitment and 32-byte$s$ scalar coordinates. - Automatic logging of
inspect_rawinteractions to local telemetry.
- 100% private, client-side behavioral logging in Dexie
telemetry. - Synthesizes dynamic topic affinity rankings (
#distributed-systems,#linux,#nostr,#crypto). - JSON export for external local ML ranking models and instant database purge control.
- Bidirectional delta-sync between local Dexie tables and remote LibSQL edge nodes.
- Conflict-free Last-Write-Wins (LWW) state resolution.
- Real-time Zero-Knowledge boundary verification guaranteeing zero plaintext private keys ever leave the device.
- Interactive in-app terminal shell supporting:
zup identity list # List personas and active pointer zup identity switch <target> # Switch active signing identity zup tail --kinds 1,30023 # Stream recent technical events zup publish "<text>" --sign # Sign and broadcast Schnorr event zup sync --turso # Trigger LibSQL delta replication zup inspect <eventId> # Verify canonical hash & Schnorr signature zup relays # Check connection pool latencies zup telemetry # Inspect local dwell & affinity metrics
| Shortcut | Action |
|---|---|
Cmd+K / Ctrl+K |
Open global Command Palette |
1 |
Switch to Feeds |
2 |
Switch to Vault & Identities |
3 |
Switch to Relays |
4 |
Switch to Telemetry |
5 |
Switch to Cloud Sync |
6 |
Switch to @zup/cli Shell |
N |
Open Compose Dispatch drawer |
L |
Lock Vault (Immediate RAM zeroing) |
Esc |
Close active drawer or modal |
# Install dependencies
npm install
# Start local Next.js dev server on port 3000
npm run dev
# Run ESLint validation
npm run lint
# Build production bundle
npm run buildLicensed under the MIT License. Designed and validated according to ARCHITECTURE.md and AGENTS.md.