Architecture
How the pieces fit together — Zero sync, apps, flows, and AI
start.chat is built on a few core systems that compose together. Understanding how they connect helps when building apps and writing flows. The source and self-hosting release are not public yet; see Software Availability and Rights for the current status.
Stack
| Layer | Technology | Role |
|---|---|---|
| Frontend | React + Tamagui | Universal UI (web, desktop, mobile) |
| Routing | One (Vite) | File-based routing, SSG/SSR/SPA |
| Sync | Orez | Real-time local-first data sync |
| Database | SQLite | Namespaced primary storage |
| Desktop | Tauri | Native macOS/Windows/Linux app |
| Mobile | React Native (Expo) | iOS and Android |
| AI | Multi-provider | Claude, Gemini, Qwen, Ollama, more |
| Flows | Pipedown | DSL for multi-step automation |
Data flow
All data flows through Orez’s local-first sync runtime. The client maintains a local replica of the data it has access to. Mutations are optimistic — the UI updates immediately, then the server confirms or rebases.
This means:
- The UI is never blocked waiting for the server
- Offline edits queue and sync when connectivity returns
- Conflict resolution is automatic
- Every query is a local read — fast regardless of server latency
Permissions at the sync layer
Zero enforces access control at the data level through where predicates. When
a client subscribes to data, the server filters rows based on the user’s roles
and permissions. Private channels, secret data, and admin-only resources are
invisible to unauthorized clients — they never leave the server.
Apps
Apps are the primary extension mechanism. An app definition
(createApp()) declares:
- Actions — functions that agents and flows can call
- Backends — scheduled code that runs on a timer (
runsEvery) - Blocks — React components that render inline in chat
- Data — structured key-value storage scoped to the app
- OAuth — connect to external services
- Webhooks — receive events from external services
Apps compile in a sandbox. The sandbox injects a global namespace with
tools — tools.data, tools.message, tools.generate,
tools.strategy, tools.notify, and more. Apps cannot access the filesystem or make arbitrary
network requests.
Flows
Flows are written in Pipedown, a plain-language DSL that compiles to an AST. The runtime executes steps sequentially or in parallel, calling app actions, LLM providers, or built-in operations at each step.
Flows can be triggered by events (new message, webhook, data change), schedules
(every 6 hours), or manual commands. Each step has access to previous step
outputs via tags.
AI
The AI system composes abilities into a system prompt at request time. When a user messages HUD:
- Load channel config (model tier, system prompt, enabled abilities)
- Assemble context (recent messages, available apps, user role)
- Build system prompt from enabled ability definitions
- Stream response, executing tool calls as they arrive
- Post-process: citations, code blocks, action results
Model tiers
Seven tiers from xxs to xl, each mapping to specific models:
| Tier | Use case | Examples |
|---|---|---|
| xl | Complex reasoning | Claude Opus, Claude Sonnet |
| lg | Detailed responses | Claude Sonnet, Claude Haiku |
| md | General conversation | Claude Haiku (extended thinking), Gemini Flash |
| sm | Tool-calling/strategy | Gemini Flash (high thinking), Claude Haiku |
| xs | Simple tasks | Gemini Flash, Claude Haiku |
| xxs | Quick operations | Gemini Flash Lite, Claude Haiku |
Server admins set the default tier. HUD selects models within that tier based on task complexity. Ollama is supported for fully self-hosted AI.
Search
Search combines three ranking signals over namespace-local search documents:
| Signal | How it works | Best for |
|---|---|---|
| Text | Token and phrase matching with title boost | Exact phrases and known terms |
| Recency | Time and document-kind weighting | Recent conversations and trusted documents |
| Semantic | Cosine similarity over stored embeddings | Conceptual queries, “find messages about…” |
Results are merged with weighted ranking. Product mutations update search documents explicitly, so new content is findable without a database trigger.
Routing
File-based routing via One. Routes in app/ map to
URL paths:
app/(chat)/— authenticated chat UIapp/(site)/— public marketing site, docs, blog (SSG)app/api/— REST API endpointsapp/auth/— authentication flows
The (chat) group wraps everything in ~15 context providers (current server,
channel, user, theme, Zero client, etc). The (site) group uses static
generation for docs and blog pages.
Desktop sync
The Tauri desktop app adds bidirectional file sync. Your server’s apps and
flows mirror to ~/start/{server-slug}/ on your filesystem. Edit in your
editor, changes push back as drafts. Cloud edits write to local files.
Safety guards protect against accidents: mass change detection, large change ratio checks, freshness verification, offline protection, and per-file confirmation for deletions.