Documentation

Yttrium

A TypeScript sync engine. One domain is one Durable Object and one commit clock. apply(op) is the reducer. Overlay entries are functions, not provisional bytes. The host is not the engine: decode a frame, call apply, write the log, fan out.

Quickstart Run the Worker and playground, then send a mutation through a Session. Concepts The short model: domains, shapes, overlays, mounts, and persistence. Playground Two live clients, rooms, streaming, canvas, and the admin access editor.

What it is

Yttrium keeps a shaped tree consistent across browsers by sending operations through one server-authoritative domain. Clients predict their own writes with an overlay, then rebase that overlay onto each new committed head. Streams, presence, and derived artifacts travel on side lanes. Authentication and permission rules stay in application code.

The live Worker is at ytt.rium.dev — playground at /, these docs at /docs, WebSocket at /domain/:name.

How to read this

These docs used to be one short page. They are now a small site:

The original design note is docs/design-spec.md; host event logging is described in docs/observability.md.

Layers

src/protocol   ids, Op, Frame, JSON codec, shape
src/engine     apply, DomainServer, overlay, stream, artifacts
src/client     Session, Hub, ClientStore, Outbox
src/access     application policy, pushed replicas, private views
src/host       authenticated gateway + Durable Object host
src/batteries  optional reusable features; currently text
src/example    demo schema, points, raster, identity + roles
src/sim        seeded net for tests; no sockets
playground     chat workspace UI + this docs site

engine and protocol import nothing from host, client, or playground. Client and host both call the same apply. Persist the log first, then memory, then fanout.

Full reference

ArchitectureLayers, data flow, mounts, and Durable Object lifecycle. ProtocolOperations, frames, catch-up, paging, and private views. APISession, Hub, DomainServer, apply, store, and batteries. AccessApplication auth, ACL replicas, and private views. StreamsLive prefixes, presence, keep_last, and artifacts. HostWorker routes, SQLite, hibernation, observability. LimitsDemo identity, open editor edges, disposable data.