This walks through running Thunderbolt locally: backend API, PowerSync sync service, and the Vite frontend.
- Bun 1.2+
- Rust toolchain — needed for the Tauri desktop and mobile builds. Install via rustup.
- sccache — speeds up Rust rebuilds. Install with
cargo install sccache. Configured insrc-tauri/.cargo/config.toml. - Docker — PowerSync and PostgreSQL run in containers during local dev.
Run make doctor after cloning to verify your environment is set up correctly. It prints exact install commands for anything missing.
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).
-
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 cd backend && cp .env.example .env && cd ..
At a minimum set
BETTER_AUTH_SECRET(any 32+ character string) and one provider key inbackend/.env. See Configuration for the full list. -
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:5173.Desktop (Tauri):
bun tauri:dev:desktopiOS simulator:
bun tauri:dev:iosAndroid emulator:
bun tauri:dev:android -
Sign in. Open
http://localhost:5173, 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.- Backend errors with
BETTER_AUTH_SECRET— Zod validates this on startup. Generate one withopenssl rand -hex 32and put it inbackend/.env. powersyncJwtSecret must be at least 32 characters— same fix. The secret must 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 :5173 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.
- Architecture — how the pieces connect.
- Testing — test patterns, composite keys, synced table rules.
- Self-Hosting — deploy Thunderbolt somewhere real.