Open Source · WebRTC & WebCrypto · Self-Hostable

Direct device-to-device pairing, file transfer, and sync.

Connect browsers, phones, and servers directly over WebRTC without centralized file storage. Pair trusted devices via single-use QR invites, stream files in bounded memory, and sync offline-first state.

npm install dropspace
quickstart.ts — dropspace
import { DropspaceClient } from "dropspace";

const client = new DropspaceClient({
  coreHttpUrl: "https://dropspace.app",
  deviceLabel: "MacBook-Pro",
  capabilities: ["messaging", "files", "crdt"],
});

await client.start();

// After pairing, send an ACKed P2P message
const peer = client.devices.selectPeer({
  requiredPermissions: ["messaging"],
});
if (peer.selectedDeviceId) {
  await client.connect(peer.selectedDeviceId, { waitForOpen: true });
  await client.channels.sendJson(
    peer.selectedDeviceId,
    { text: "Direct WebRTC DataChannel!" },
    { channel: "chat", ack: "received" }
  );
}
How It Works

Signaling once, direct encrypted P2P after

Dropspace Core only coordinates device identity and WebRTC signaling. Your files and CRDT edits travel directly between devices.

Device A
Browser / CLI / Mobile ECDSA P-256 or Ed25519 keypair
Direct WebRTC DataChannel (Files, Chat, Automerge)
Core Signaling & Ephemeral TURN Fallback (no file storage)
Device B
Peer Device OPFS streaming + SHA-256 verify
1
Challenge-Response Auth

Each device signs a server nonce with its local private key — no passwords or browser secrets.

2
Single-Use QR Pairing

Atomic invite tokens bind two devices with explicit permissions and per-space isolation.

3
Bounded-Memory Transfer

32 KiB chunks stream directly over WebRTC with backpressure, pause/resume, and SHA-256 checks.

Access Modes

Playground, Registered App, or Self-Host

Test immediately without an account, isolate production apps with strict Origin/JWT policies, or run the stack yourself.

1 · Public Playground

Try without registering

Omit appId to join an isolated ephemeral space with device auth and bounded session/rate limits.

Open Live Demo →
2 · Registered App · Coming Soon

Production multi-tenancy

Get a public appId, dev/prod Origin rules, usage stats, and optional JWT access tickets.

Developer Portal (Coming Soon) →
3 · Self-Host

Your own Core & TURN

Run DROPSPACE_MODE=self_host with your own SQLite, Coturn relay, and zero hosted dependencies.

Self-Host Guide →
Real-World Use Cases

What can you build with Dropspace?

Direct peer-to-peer file drops, offline-first collaborative notes, and server-assisted device relays.

File Sharing

Direct Device-to-Device File Transfer

Send files directly from laptop to phone or colleague over WebRTC DataChannels. Files stream in bounded-memory chunks into OPFS (origin-private storage) or File System Access API with SHA-256 verification and same-page pause/resume — without centralized file storage.

Collaboration

Offline-First Notes & Shared State

Keep editing in IndexedDB when Wi-Fi drops. As soon as two paired devices reconnect, Automerge CRDT character-level diffs converge automatically over a direct P2P DataChannel.

Device Pairing

Phone-to-Desktop Companion Pairing

Scan a single-use QR invite (with the bearer secret in the URL #fragment) to link a mobile browser to your desktop app. Approve via visual SHA-256 fingerprint comparison, grant scoped permissions, and revoke access anytime.

Infrastructure

Self-Hosted Signaling Core & TURN Relay

Run your own lightweight Gleam signaling core + coturn TURN server. Direct P2P is preferred; when strict corporate or carrier NATs block direct ICE, traffic is relayed through Coturn using ephemeral HMAC credentials.

Modular Stack

One package, zero lock-in

Import only what you need from dropspace (dropspace/files, dropspace/automerge, dropspace/protocol).

dropspace TypeScript SDK

Subpath exports: "dropspace", "dropspace/files", "dropspace/automerge", and "dropspace/protocol".

dropspace_core Gleam / BEAM Server

Self-hosted signaling server, challenge-response auth, pairing state machine, and TURN issuer.

dropspace_server_peer Elixir OTP Integration

Headless WebRTC DataChannel node (ex_webrtc / ex_sctp) for automated testing and hub relay.