Get started
R2DB DOCUMENTATION / OVERVIEW

Meet r2db

A TypeScript relational database for Workers, with live queries built in. Call it over HTTP from your existing Worker or service. Optionally deploy code beside the database in a facet.

Declare tables and indexes once, create an empty database, then read, write, or subscribe using the same query builder. r2db maintains live query results as data changes; your application owns its routes, users, and UI.

Start here

Developer preview

HTTP queries, atomic write batches, version-checked read-modify-write, and WebSocket live results are implemented. The public SDK owns subscription setup, lease renewal, reconnection, and cleanup. The query language is the TypeScript builder or its JSON AST; this service does not accept SQL.

The SDK and CLI are one package, r2db. The package can be built and packed from this repository; npm publication and a production service have not been activated. The private static site preview does not connect its console to a production backend.

Facets support one-shot reads and synchronous transactions. Facet subscriptions, public schema evolution, recovery operations, and complete storage/live-query billing remain preview work.