Tilo

Docs

Documentation

Everything you need to build with Tilo, from quickstart to internals.

Getting started

Open the app, sign in with Google or GitHub, and create your first canvas from the dashboard. The canvas is a real tldraw surface with full drawing tools, plus a Tilo side panel that shows live sync activity.

The CRDT engine

Tilo's engine is written from scratch in Rust and compiled to WebAssembly. It implements Lamport clocks, last-writer-wins registers, and observed-remove sets, with a semantic resolution layer that enforces domain rules after convergence. The convergence property is verified by 8000+ randomised tests.

Sync transports

Three transports cooperate. BroadcastChannel for instant same-browser sync. Server-Sent Events through a Vercel API route for cross-machine sync. WebRTC DataChannels for same-network direct peer-to-peer ("Mesh Mode"). All three deliver Tilo state snapshots; CRDT idempotency makes duplicates harmless.

Architecture

Browser holds a local CRDT replica (WASM). Next.js on Vercel runs the relay (SSE) and a thin REST API. DynamoDB stores user accounts, world metadata, and the latest serialised state per canvas. Single-table design with PK/SK prefixes.

Security and privacy

Authentication via Google or GitHub OAuth. Sessions are JWTs signed with a server-side secret. World access is checked against the owner's userId on every read. API endpoints are rate-limited per IP and origin-restricted via env var.

Keyboard shortcuts

The canvas uses tldraw's standard shortcuts: V to select, R for rectangle, O for ellipse, A for arrow, T for text, P for pen, Cmd/Ctrl+Z to undo, Cmd/Ctrl+Shift+Z to redo, Cmd/Ctrl+A to select all, Space to pan.