Developing web applications has gotten insanely complex.
You need a tall pile of tech to build a "modern" web app: client-side code, server-side code, APIs to tie them together, data fetching, state management, hydration, websockets for reactivity, and a whole lot more. And once you're done, the resulting app still isn't very good.
It's time for a rethink.
We’re building a general-purpose sync engine for the web. You put Zero in front of your existing database or web service, and we distribute your backend all the way to main thread of the UI.
You get a client-side API that looks like an embedded db, but to which you can issue arbitrary hybrid queries that span the entire database, including the server.
Behind the scenes, we synchronize the most frequently used 100MB of data to a client-side persistent cache. This cache is used automatically to the maximum extent possible for all queries.
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 tracks = useQuery(
zero.playlistTrack.join(zero.track).select(
'track.*',
['album', track => track.queryAlbum().select('name')],
['artists', track => track.queryArtists().select('name')],
)
.where('playlistTrack.playlistID', '=', id)
.orderBy('playlistTrack.order', 'asc')
.limit(1000)
);
const onStar = (id: string, starred: boolean) => {
zero.track.update({
id,
starred,
});
}
return (
<div>
{tracks.map(track => (
<TrackRow track={track} onStar={onStar}/>
))}
</div>
);
}
This architecture provides:
You can use Zero to build all kinds of web apps, from blogs to collaborative spreadsheets. But where Zero really shines is “local-first” style applications like Linear and Superhuman. With Zero, these apps can be built in a fraction of the time it would take to build even an old-fashioned server-rendered web app.
We will be open sourcing Replicache and Reflect. Once Zero is ready, we will encourage users to move. We expect the migration to be easy, and the benefits once migrated to be dramatic.
Zero is the culmination of everything we've done with sync over the past five years. We are working toward a source release in summer fall EOY 2024 and an open beta Q1 Q2 2025.
For early access, drop your email below: