Instant Queries by Default
Sync engines enable instant UI by downloading data to the client before it's needed. All read and writes are local and synced with the server in the background.
But there's a catch: almost all realistic apps have way too much data to download ahead of time. There are usually complex permissions too — not all users can read and write all data.
We started the Zero project two years ago to solve these problems and bring the performance of sync to the entire web.
Try it out right now.
We have not auto-loaded this demo because we really want you to see how fast it loads.
How it Works
Step 1: Install & start a Postgres database
import { createClient } from '@supabase/supabase-js';
const supabase = createClient(
process.env.SUPABASE_URL,
process.env.SUPABASE_KEY
);
export default supabase;Start your local Postgres instance and get the database ready for development.
Step 2: Run zero-cache
import { Zero } from '@rocicorp/zero';
const z = new Zero({
server: 'http://localhost:4848',
schema: {
issues: {
tableName: 'issue',
},
},
});
export default z;In another terminal tab, start the local zero-cache service to enable query syncing and reactivity.
Step 3: Start your application
import { useQuery } from '@rocicorp/zero/react';
import z from './zero';
export function IssuesList() {
const issues = useQuery(z.query.issues);
return (
<div>
{issues.map(issue => (
<div key={issue.id}>{issue.title}</div>
))}
</div>
);
}In a final terminal tab, start your application.
Only with Zero
Zero's query-driven sync enables a really powerful set of features. Some tools offer some of these features, but only Zero offers all of them together.
Fine-Grained Permissions
Define row- and field-level access rules so each user sees exactly the data they're allowed to.
Partial Sync
Only data returned by active queries is synced to the client — no need to ship entire tables.
Client-First Reads & Writes
Queries resolve on the client for instant results. Writes apply immediately and sync seamlessly.
Atomic Transactions
Group multiple writes into one transaction. All succeed — or all roll back together.
Our Users Say
Check out what our users have to say about Zero.
Zero completely changed how we think about real-time. The query-driven sync is genius — our app feels instant now.
We tried building our own sync layer. Should've just used Zero from day one. Saved us months of development time.
The permission system is incredibly powerful. We can finally give users real-time collaboration without worrying about data leaks.
Local-first with Zero means our app works offline and syncs seamlessly. Our users don't even notice when their connection drops.
The developer experience is top-notch. Write queries, get reactive updates. It's that simple.
Zero handles the hard parts of sync so we can focus on building features. The performance gains are unreal.
Ready to Get Started?
Dive into the docs to see how Zero fits into your stack, and hop into our Discord to connect with the team and other builders.