This walks through running Thunderbolt locally: backend API, PowerSync sync service, and the Vite frontend.
After cloning, run make doctor — it inspects your machine and prints exact install commands for anything missing. The most common needs are:
- Bun 1.2+
- Rust toolchain — for Tauri desktop and mobile builds (install via rustup)
- sccache — speeds up Rust rebuilds (
cargo install sccache) - Docker — PowerSync and PostgreSQL run in containers during local dev
You'll also need at least one AI provider API key — Anthropic, OpenAI, Mistral, Fireworks, or any OpenAI-compatible endpoint (Ollama and llama.cpp are recommended for local inference).
Tauri needs GTK/WebKit dev libraries. On Debian/Ubuntu:
sudo apt install libwebkit2gtk-4.1-dev libjavascriptcoregtk-4.1-dev \
build-essential curl wget file libxdo-dev libssl-dev \
libayatana-appindicator3-dev librsvg2-dev libsoup-3.0-devFor other distributions, use the upstream
Tauri Linux prerequisites. make doctor checks for these on Linux.
-
Clone and install.
git clone https://github.com/thunderbird/thunderbolt.git cd thunderbolt make setupmake setupinstalls frontend and backend dependencies and wires up the Claude Code agent symlinks. -
Create
.envfiles.cp .env.example .env cp backend/.env.example backend/.env make doctor
make doctorgenerates aBETTER_AUTH_SECRETforbackend/.envautomatically if it's empty or still set to the placeholder. Add at least one AI provider key (e.g.ANTHROPIC_API_KEY) — see Configuration for the full list. Root.envis for the Vite/Tauri frontend;backend/.envis for the API server. -
Start Postgres + PowerSync.
make up
This runs
docker compose -f powersync-service/docker-compose.yml up -d. PowerSync listens on:8080, Postgres on:5433(the non-default port avoids clashing with a local Postgres). Verify withmake status. -
Run the dev servers.
Browser (recommended):
make run
Backend starts on
http://localhost:8000, frontend onhttp://localhost:1420.Desktop (Tauri):
bun tauri:dev:desktopiOS simulator:
bun tauri:dev:iosAndroid emulator:
bun tauri:dev:android -
Sign in. Open
http://localhost:1420, create an account, and send a message. If it works, you're good.
make upport conflict — something is bound to5433or8080. Stop it or editpowersync-service/docker-compose.yml.make upfails with a Postgres data-format error — the Postgres image was bumped to v18, which changed its on-disk layout. If your local volume was created with an older version, runmake nuketo wipe it and re-init (you'll lose any local DB state).- Backend errors with
BETTER_AUTH_SECRET— runmake doctor; it generates one for you. Or set it manually withopenssl rand -base64 32. powersyncJwtSecret must be at least 32 characters— setPOWERSYNC_JWT_SECRETinbackend/.envto match the one baked intopowersync-service/config/config.yaml.- Tests behave weirdly — fake timers are globally installed; see testing.md.
| Command | What it does |
|---|---|
make doctor |
Verifies your tools + env files. make doctor-q only prints issues. |
make run / make dev |
Starts backend + frontend. Kills stale processes on :8000 and :1420 first. |
make up |
Starts PowerSync and Postgres. |
make down |
Stops containers, keeps volumes. |
make nuke |
Wipes all container data and rebuilds from scratch. |
make check |
Runs type-check, lint, and format-check. |
make format |
Formats frontend, backend, and Rust. |
- Configuration Reference — every backend env var.
- Mobile Setup — iOS / Android / desktop Tauri dev prerequisites.
- Architecture — how the pieces connect.
- Testing — test patterns, composite keys, synced table rules.
- Self-Hosting — deploy Thunderbolt somewhere real.