Skip to content

Zeroback

Open-source real-time backend for Cloudflare.
Type-safe functions, reactive queries, your infrastructure.
Zeroback demo — real-time sync across two browser windows

Developer Experience

Schema to screen
in three steps

zeroback/schema.ts
import { defineSchema, defineTable, v } from "@zeroback/server"

export const schema = defineSchema({
  messages: defineTable({
    channel: v.string(),
    author: v.string(),
    body: v.string(),
  }).index("by_channel", ["channel"]),
})
zeroback/messages.ts
import { query, v } from "./_generated/server"

export const list = query({
  args: { channel: v.string() },
  handler: async (ctx, args) => {
    return await ctx.db
      .query("messages")
      .withIndex("by_channel",
        (q) => q.eq("channel", args.channel))
      .collect()
  },
})
src/Chat.tsx
import { useQuery, useMutation } from "@zeroback/react"
import { api } from "../zeroback/_generated/api"

function Chat({ channel }: { channel: string }) {
  const messages = useQuery(api.messages.list,
    { channel }
  )
  const send = useMutation(api.messages.send)

  // Auto-updates when anyone sends a message
  // No polling. No refetch. No boilerplate.
}

Why Zeroback

Everything you need.
Nothing in the way.

Real-Time Queries

Queries auto-subscribe over WebSocket. When data changes, affected clients update instantly.

🔒

Type-Safe End-to-End

Schema and functions generate a typed API object. From database to React hook — zero gaps, zero guesswork.

🏗️

Your Infrastructure

Runs on your Cloudflare account. Workers + Durable Objects + SQLite. Your data never leaves your control.

📡

Offline-First

IndexedDB persistence. Your app renders from cache instantly, even before the WebSocket connects.

🧩

Batteries Included

File storage, scheduled jobs, cron, full-text search, pagination. Everything you need, nothing you don't.

⚙️

One Command Setup

npx @zeroback/cli init scaffolds your project. zeroback dev starts the server. You're building in under two minutes.

Architecture

One Durable Object.
Everything you need.

A single Durable Object gives you SQLite for persistence, WebSockets for real-time, and strong consistency by default. No distributed coordination. No cache invalidation.

React Client useQuery · useMutation
WebSocket
Worker Auth · CORS · Routing
Internal
Durable Object SQLite · Subscriptions · OCC
< 50ms Query latency
~10 GB SQLite storage
1,000 Concurrent connections
MIT Open source

Start building in two minutes

npx @zeroback/cli init my-app