Jun 12, 2026 · 2 min

Building Zeron on Zero

Why I built an AI chat app on Zero, Rocicorp’s sync engine, and how it turned out.

Sync engines · Zero · TanStack Start · AI


Why

The idea came from one of Theo's videos where he was exploring sync engines. He had written his own, then looked at Zero by Rocicorp and felt like something was missing, and he ended up going with Convex. I came away with a different read. Zero's model, where you write queries on the client and the engine keeps the results in sync with your database, seemed like the right idea that just hadn't been taken far enough yet. I wanted to see it through, so I built Zeron, an AI chat app, on top of it.

The stack

  • Postgres is the source of truth, with Drizzle for the schema and drizzle-zero to generate the Zero schema from it. One schema to maintain, plus an explicit allowlist of what syncs to the client.
  • Zero syncs threads, messages, models, and settings. Switching between chats is instant because there's no fetching. The data is already there.
  • The AI SDK streams live responses over SSE. The token stream is the one thing that skips the sync engine. When a response finishes it gets written to Postgres, and Zero syncs it everywhere.
  • Redis tracks streams in flight. Each thread stores a stream id and a status, so if you refresh mid-response the client reattaches and the tokens keep coming.

Results

It works. Navigation is instant, streams survive refreshes, and there are search and research tools backed by Exa, across models from Anthropic, OpenAI, Google, and others. Zero was pre-1.0 for most of the build, you run zero-cache yourself, and the write paths took some thought, but none of that changed my mind about the core idea. Zero has since hit 1.0, so the bet aged well. The code is MIT-licensed at zeronsh/chat if you want to dig in.