Type-AgnosticOperationalTransformation

The OT engine that doesn't assume your deployment. Bring your own backend, network, and data structure.

100%
Type-Safe
1
Dependencies
MIT
Licensed
Auto Demo

Watch operations appear in real-time...

Powered by @open-ot/core
Live

Data Agnostic

Built-in Text type, fully extensible for JSON, rich-text, or custom structures. Define your transform function—OpenOT handles the rest.

Offline-First

Operations queue locally when offline. Automatic sync when connection returns. Your users never lose work.

Storage Pluggable

Redis, S3, Postgres, or anything. Implement getSnapshot() and appendOp() to use any database.

Transport Optional

WebSockets, HTTP-SSE, or build your own. Simple .send() and .onReceive() interface.

See OpenOT in Action

Type below to see actual OT operations generated in real-time using OpenOT's TextType

Cursor position: 11

Operations will appear here...

This demo uses @open-ot/core TextType to generate and apply operations locally

Installation

Get Started in Minutes

Choose your framework and start building collaborative applications

Install

npm install @open-ot/core @open-ot/client @open-ot/transport-websocket

Usage

1import { OTClient } from "@open-ot/client";
2import { TextType } from "@open-ot/core";
3import { WebSocketTransport } from "@open-ot/transport-websocket";
4
5const transport = new WebSocketTransport("ws://localhost:3000");
6
7const client = new OTClient({
8  type: TextType,
9  initialSnapshot: "Hello World",
10  initialRevision: 0,
11  transport: transport,
12});
13
14// Apply local changes
15client.applyLocal([{ r: 5 }, { i: " Alice" }]);

Modular Architecture

Composable packages that work together seamlessly. Mix and match to fit your stack.

Dependency Flowcoreclient/serveradapters/transports

Core

Foundation packages for OT functionality

Core OT type system with TextType and JSON transformation

Type-agnostic interfaceTextType implementationTransform & compose operations

Client & Server

Synchronization and state management

@open-ot/client
depends on:core

Client-side synchronization state machine with offline support

3-state synchronizationOperation bufferingConflict resolution
@open-ot/server
depends on:core

Authoritative server for operation history and concurrency control

Operation catchupBackend adapter interfaceMulti-client coordination

Storage Adapters

Persistence layer implementations

@open-ot/adapter-redis
depends on:server

Redis adapter for operation logs and real-time presence

Fast operation storagePub/sub supportTTL management
@open-ot/adapter-s3
depends on:server

S3 adapter for snapshot storage and archival

Snapshot persistenceCost-effective archivalVersioned backups

Network Transports

Communication layer adapters

WebSocket transport for bidirectional real-time communication

Full-duplex messagingAuto-reconnectionLow latency

Server-Sent Events transport for serverless environments

Serverless compatibleHTTP-basedOne-way streaming