Skip to content
Strata is pre-1.0. APIs, protocol, and storage format may change.

What is Strata?

Strata is a self-hosted, typed collaboration stack written in Gleam. Developers use it to build applications with concurrent document editing, presence, durable storage, and reusable collaborative components. Strata uses conflict-free replicated data types (CRDTs), so applications can merge concurrent changes without a central edit queue.

  1. An application opens a WebSocket connection to /socket/websocket?token=…. The server checks the token before it accepts the connection.
  2. The application sends a join frame for a document.
  3. The server sends a snapshot that contains the document state.
  4. The application sends encoded ORMap state in each later delta frame.
  5. The server queues the state for merge. It sends the submitted state to the other applications on the document.
  • Document — one collaborative state unit. The wire uses the doc field. The server uses the topic doc:<id>.
  • ORMap — the map that stores a document. It tracks enough history to merge concurrent changes.
  • Delta — a frame that carries encoded ORMap state after a local edit.
  • Snapshot — a frame that carries document state after join or reconnect.
  • Presence — session data for a document, such as a cursor, selection, name, or color. Presence disappears when the connection closes.
  • Versioned JSON messages in strata_protocol, shared by applications and the server.
  • Typed CRDT fields, records, document IDs, and logical clocks in strata_document.
  • A server package (strata_server) that synchronizes and persists documents.
  • A client package (strata_client) that prepares outgoing messages and reads incoming messages. It supports Erlang and JavaScript.
  • Browser and Erlang WebSocket transport packages.
  • Presence data for cursors, selections, names, and colors.
  • Atomic child creation, cascading deletion, and typed references for composite document models.
  • Headless component contracts with typed config, messages, outputs, ownership, ports, and bindings in strata_component.
  • A read-only admin page at /admin that shows documents, their sizes, active connections, and present users.

Strata does not replace product-specific authorization, schema design, conflict semantics, or UI state management. Your application provides these functions.

The component package defines static contracts. Application hosts still manage component discovery, lifecycle, connection routing, and UI adapters. Strata does not yet persist editable component connection graphs.

Wire protocol v0 does not support separate tenants, a cluster of server nodes, or large snapshots split into smaller messages. See Limitations.