Serverless, zero-login peer-to-peer workspace for real-time messaging and chunked file sharing via WebRTC & Nostr.
PeerBox enables private, instant, browser-to-browser collaboration with no accounts, no backend servers, and no tracking:
- 🔒 Zero Servers & Intermediaries: Direct browser-to-browser WebRTC DataChannels. No central server inspects, relays, or stores messages.
- 🔑 URL Hash Encryption: The secret Room Key resides exclusively in the URL hash fragment (
#key=...), which web browsers never transmit over HTTP. - 📦 Large File Streaming (OPFS): Slices and streams files of any size directly to disk using the Origin Private File System (OPFS), bypassing browser memory limits.
- 🧹 Ephemeral State: All active state lives in volatile browser memory—closing the tab erases everything.
- Direct Messaging: Low-latency room broadcasts or 1-to-1 targeted whispers.
- OPFS File Transfers: Chunked direct transfers with backpressure control and live throughput/ETA telemetry.
- Voice Notes: In-browser audio recording with Opus compression and interactive waveform preview.
- Screen Grabs: Capture a display or window frame instantly without video call overhead.
- Connection Telemetry: Live metrics for connection type (
Direct LANvsDirect P2P) and round-trip latency. - Instant Pairing: 1-click room link copying and built-in offline QR code generation for mobile devices.
- PWA & Mobile Ready: Responsive edge-to-edge layout with safe-area support and offline PWA caching.
# Clone the repository
git clone https://github.com/ii2d/peer-box.git
cd peer-box
# Install dependencies
pnpm install
# Start development server
pnpm devOpen http://localhost:5173 in your browser.
| Command | Description |
|---|---|
pnpm dev |
Start Vite local development server |
pnpm build |
Compile production bundle to dist/ |
pnpm preview |
Preview production build locally |
pnpm test |
Run Vitest test suite |
pnpm test:watch |
Run Vitest in interactive watch mode |
pnpm check |
Run svelte-check and TypeScript diagnostics |
pnpm lint |
Run ESLint across codebase |
pnpm lint:fix |
Automatically fix ESLint errors |
pnpm format |
Format code with Prettier |
pnpm format:check |
Check code formatting with Prettier |
PeerBox is built around four verifiable guarantees:
- Zero Central Relays: No central TURN servers relay your content (ADR-0001).
- Decentralized Signaling: Discovery operates over public Nostr relays without a custom backend (ADR-0002).
- Key in Hash Fragment: The Room Key is never sent in HTTP request headers or query strings (ADR-0003).
- Transparent IP Disclosure: Direct WebRTC connections exchange IP addresses directly between peers; PeerBox discloses this transparently (ADR-0004).
- Domain Model & Glossary – Project terminology and conceptual boundaries.
- Technical Specification – Architectural contracts and protocols.
- Agent Guidelines – Development conventions and issue triage workflow.
- Architecture Decision Records (ADRs) – Architectural history and trade-offs.
Contributions are welcome! Please follow these steps:
- Fork the repository and create your feature branch:
git checkout -b feature/my-feature - Ensure tests and typechecks pass:
pnpm check pnpm test pnpm lint pnpm format:check - Commit your changes and push to your fork.
- Open a Pull Request detailing the changes made.
This project is licensed under the MIT License.