Skip to content
IN DEVELOPMENTBuilt on Cloudflare00 / TAPEDB

TapeDB. Your data.Always in sync.

A typed database for the apps you want to build. Live queries, offline writes, and a history you can replay. All in your own Cloudflare account.

  • TypeScript first
  • Zero core runtime dependencies
  • Your infrastructure
  1. 00:00:01.204tx_0193task.create
  2. 00:00:00.977tx_0192task.update
  3. 00:00:00.418tx_0191client.connect
  4. 00:00:00.000tx_0190schema.define

Every write lands on the tape.

01WRITE ONCE. WATCH IT ARRIVE.

WRITE ONCE. WATCH IT ARRIVE.

WORKSPACELAUNCHDEMO
app.tsCLIENT 01
// A query. A live view. The same API.
db.task.findMany({
  where: { done: false },
}).subscribe(({ data }) => render(data));

// One write reaches every subscriber.
await db.task.create({
  data: { title: "Replay the log" },
});
Typed end to end. No query strings.
CLIENT 0203 TASKS

PROJECT

First project

  • Define the schemaDONE
  • Connect the clientDONE
  • Subscribe to a queryIN PROGRESS
TRANSACTION TAPE00:00:01.204workspace.ready
02BUILT ON PRIMITIVES YOU ALREADY TRUST.

BUILT ON PRIMITIVES YOU ALREADY TRUST.

  • Cloudflare Workers
  • Durable Objects
  • SQLite
  • R2 Object storage
03THE APPLICATION IS YOURS. SO IS THE DATA.

Live, offline, and replayable.

Define a schema. Connect a client. Subscribe to a query. TapeDB handles subscriptions, the offline outbox, and the transaction log.

  • ALIVE

    Live, by subscription.

    Subscribe to a query and receive row-level updates when relevant data changes. The same API for a read or a live view.

    Queries & subscriptions
  • BOFFLINE

    Offline isn't the end.

    Single-row writes apply optimistically and queue in a persistent outbox. Reconnect and pick up where you left off.

    The offline write path
  • CHISTORY

    A history to build on.

    Transactions go onto a log. Segments and snapshots reach R2, ready for replay and recovery when needed.

    Inside the transaction tape
04SCHEMA, TYPES, AND MIGRATIONS

Define the model.
Types follow.

Fields, relations, and access rules in TypeScript. Your schema shapes the engine, migrations, and client types.

  1. 01One definition. Models drive your data layer.
  2. 02Real relations. Link and query your models.
  3. 03Reviewed migrations. SQL you can commit.
Get to know the model API
tapedb.schema.tsTS
import { schema, model, t } from "tapedb/schema";

export default schema({
  project: model({
    name: t.string(),
    tasks: t.hasMany("task"),
  }),
  task: model({
    title: t.string(),
    done: t.boolean().default(false),
    project: t.belongsTo("project"),
  }),
});
The schema drives types and migrations.
05SMALL PARTS. A CONSIDERED SYSTEM.

A workspace. A writer. A tape.

Each workspace has one Durable Object and one SQLite database. A single writer makes transactions serializable. R2 gives the log somewhere to go.

  1. 01CLIENT

    Your application

    • Typed queries
    • Live subscriptions
    • Persistent outbox
    TYPESCRIPT
  2. Connection: HTTP / WS
  3. 02WORKSPACE

    Durable Object

    • Single writer
    • SQLite database
    • Access rules
    ONE PER WORKSPACE
  4. Connection: async flush
  5. 03STORAGE

    The tape in R2

    • Log segments
    • State snapshots
    • Recovery & replay
    YOUR BUCKETS

Your infrastructure. Your application supplies identity; TapeDB manages workspace data.

Read the architecture
06PREPARING FOR PUBLIC RELEASE

Validated.
Before release.

TapeDB is in development. We're validating the complete path from the installed package to a running database, before opening the source and announcing availability.

Pre-1.0. The API may change. Public release not yet announced.