Hanan
Maya
Alex

Real-time vector whiteboard,
executed on the edge.

Sub-16ms vector input, 15Hz presence, and SQLite persistence in every room. No sign-ups, no tracking cookies, and no compute spent while you draw alone.

Latency: <16ms Presence: 15Hz SQLite: LWW Peers: 50
● Two canvas layers: committed shapes below, live preview on top
New Room →
CORE SYSTEMS

Four subsystems, no framework in the middle.

// DUAL-LAYER CANVAS

Sub-16ms Vector Render Loop

Mesh splits rendering across two decoupled canvas surfaces. The committed buffer redraws strictly on shape additions or removals. Active drawing previews, live drag bounding boxes, and remote peer cursors execute on an overlay running at a locked 60fps.

Smoothing Algorithm

Ramer-Douglas-Peucker

Supported Primitives

7 Vector Tools

// Client-Side Geometry Optimization

const points = ramerDouglasPeucker(rawStroke, 1.2);
const shape = { id, type: 'path', data: { points } };

/* Geometry computation happens purely in the client worker thread, ensuring DO handlers stay ≤ 2ms */

SYSTEM TOPOLOGY

Single origin. Zero external database dependencies.

01

Browser Client

Runs Svelte 5 with fine-grained reactivity ($state/$effect). Captures pointer events, smooths strokes with RDP, and renders optimistic updates locally.

02

Anycast Edge Worker

hooks.server.ts intercepts /api/room/:id/ws before page resolution, routing the raw upgrade to the dedicated room isolate via idFromName(roomId).

03

Durable Object & SQLite

One isolate per room. Accepts hibernating WebSocket connections, resolves LWW conflicts, and commits to single-tenant transactional SQLite storage.

DEPLOYMENT

Self-host in your own cloud or container.

git clone https://github.com/VUXXE/Mesh.git
cd Mesh
docker compose up -d
SPECIFICATION

Hard protocol bounds & invariants.

Max Concurrent Connections 50 peers per room (with unauthed eviction)
Max Shapes Per Room 10,000 vector shapes
Rate Limiting 150 messages/sec sliding window per socket
Payload Frame Ceiling 64 KB (rejects frame with code 1009)
Conflict Resolution Monotonic Last-Write-Wins (LWW) with clock skew cap
Presence Broadcast Adaptive 15Hz with solo silence and deadband filtering
Authentication Hash PBKDF2-SHA256 (100,000 iterations via crypto.subtle)