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.
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:
- Start — overview, quickstart, a one-page concept note, and a playground guide.
- Reference — architecture, protocol, API, access, streams, host, and current limits.
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.