Instant Queries by Default

Gigabugs – Our 1.2 million row bug tracker.

Sync engines enable instant UI by downloading data to the client ahead of time. Reads and writes happen locally, and changes are synced in the background.

It's a beautiful idea, and one that has been used by some of the world's best software: Linear, Figma, Superhuman, and Dropbox were all built this way.

But there's a catch. And this catch is the reason why sync-based apps are still rare.

Apps usually have far too much data to download up-front. They also have complex permissions. Incrementally syncing a static block of data is easy; syncing just the slice the user wants and has access to is much more difficult.

We created Zero to solve these problems in a general way, and to bring the performance of sync to the entire web.

Try it out right now.

Our Gigabugs demo has 1.2 million rows, instant interactions, and loads in less than 2 seconds.

How it Works

Zero Architecture Diagram

Zero has two parts: zero-client and zero-cache.

Zero-cache runs in the cloud and maintains a read-only replica of your Postgres database. Zero-client gets linked into your app and maintains a client-side store of recently used rows.

Queries run against the client first, returning matching results instantly. In parallel, queries are sent to the server, which returns authoritative results asynchronously.

Server results are automatically stored client-side, so that future queries can be answered instantly.

import {queries} from 'queries.ts'
import {mutators} from 'mutators.ts'
 
function Playlist({id}: {id: string}) {
  // This usually resolves *instantly*, and updates reactively
  // as server data changes. Just wire it directly to your UI –
  // no HTTP APIs, no state management, no realtime goop.
  const [playlist] = useQuery(
    queries.playlist.byID({id})
  )
 
  const onStar = (id: string, starred: boolean) => {
    mutators.playlist.star({id, starred})
  }
 
  // render playlist...
}

Efficient incremental execution of complex queries is made possible by ZQL, a new streaming query engine we built specifically for Zero.

This architecture lets you sync exactly the data you need, when you need it — enabling instant UI without preloading the universe.

Features

Instant Reads

Queries are always client-first, returning matching local data immediately – literally in the next frame.

Instant Writes

Mutations are always client-first, updating all open queries instantly. Edge-cases like reverts are handled automatically.

Automatic Reactivity

All queries are reactive. When data changes on the server – even from non-Zero clients – affected queries are automatically updated.

Fast Startup

Query-driven sync provides precise control over when data is synced, enabling fast startup without sacrificing instant interactions.

Server Authority

All reads and writes flow through your code on your server, giving you complete control over permissions and business logic.

Easy Integration

Zero works with normal Postgres databases, using normal Postgres schemas, with normal APIs and libraries.

From Our Users

Zero is open-source and fully self-hostable.

We also offer a fully-managed service, which can run on either your servers or ours.

Cloud Zero Dashboard
Traditional SaaS

Runs in Rocicorp's AWS account

Hobby

  • 10 GB storage
  • 3 shared vCPU
  • Support via public Discord
  • Additional storage: $0.20/GB
  • Dedicated vCPU: $50 each
$30/mo

Professional

  • 100 GB storage
  • 6 dedicated vCPU
  • Shared Slack channel
  • Additional storage: $0.20/GB
  • Additional vCPU: $50
$300/mo
BYOC

Runs in your AWS account

Bring Your Own Cloud

  • Data stays in your AWS account
  • Rocicorp has limited privileges
  • AWS infra billed to your account
  • Shared Slack channel
  • Includes 10 vCPU
  • Additional vCPU: $20
$1000/mo+ AWS

Get in Touch

Hosting is in private beta. Message us and we'll get you onboarded.

Get Started