Local setup
Prerequisites
Section titled “Prerequisites”- Bun 1.3.11 or newer in the 1.3 line.
- Docker Engine with the Compose plugin: the backing services (PostgreSQL 16 + PostGIS, Valkey,
Meilisearch, S3-compatible storage, imgproxy) run as a per-workspace container stack —
bun run local up, see Local environment (Compose). Native installs of the same services also work if you point a Doppler config at them.
Clean clone
Section titled “Clean clone”bun install
# Paraglide output is gitignored, so compile it before running or checking the web app.(cd apps/svelte-web && bunx @inlang/paraglide-js compile --project ./project.inlang --outdir ./src/lib/paraglide)Kysely database types (packages/database/src/generated/db.ts) are committed, so a clean clone needs no database connection and no codegen step. Regenerate them with bun --filter @repo/database db:codegen only after a schema migration.
Environment variables (Doppler)
Section titled “Environment variables (Doppler)”Server-side env is not copied between machines — it comes from Doppler, project kottia-com, config dev_local (it inherits the root config dev, the deployed DEV tier; dev itself syncs to no Railway service — the dev_api, dev_web and dev_worker branches do — see Secrets). Install the Doppler CLI, then once per checkout:
doppler logindoppler setup --no-interactive # binds this directory to the project/config in doppler.yamlPrefix any command that needs env with doppler run --. The binding is per directory and inherited by subdirectories, so one doppler setup at the repo root covers every app and package. With several worktrees side by side, bind their parent once instead: doppler setup --no-interactive --scope <parent-dir>.
- Two configs on a workstation.
dev_local(thedoppler.yamldefault) pointsDATABASE_URLat the deployed DEV database through a Railway TCP proxy — a plaindoppler run -- …talks to DEV.dev_dockeris the loopback config for the container stack and is only ever used throughbun run local exec -- …, which injects the workspace’s ports on top. Print the target host before any database command:doppler run -p kottia-com -c <config> -- bun -e 'console.log(new URL(process.env.DATABASE_URL).hostname)'. - Personal overrides (another
DATABASE_URL, your ownQUEUE_SUFFIX) stay in your shell:DATABASE_URL=… doppler run --preserve-env=DATABASE_URL -- bun run dev. Changedev_localitself only for values every developer should get; never put workstation values indev, which is what production-like DEV runs on. - Fallback without Doppler:
cp .env.example .env.localat the repo root. Every loader fills only keys the environment does not already set, so Doppler values win when both exist — delete a stale.env.localonce you are on Doppler. - Never print secret values (
doppler secrets get,doppler secrets download) into a terminal log, doc, or chat.doppler secrets --only-namesis fine.
Never paste secrets into docs or committed files. The source of truth for variable meaning is Settings → Environment variables.
First local runs
Section titled “First local runs”| Surface | Command | Notes |
|---|---|---|
| Docs | bun --filter @repo/docs dev | Runs generators first, then Astro/Starlight. No env needed. |
| Web | cd apps/svelte-web && doppler run -- bun run dev | Main SvelteKit app. |
| API | doppler run -- bun --filter api dev | Hono host for Better Auth and tRPC. |
| Worker | doppler run -- bun --filter worker dev | BullMQ jobs; use matching QUEUE_SUFFIX in dev. |
For a docs-only onboarding loop, run bun --filter @repo/docs build first. It validates MDX, generated API pages, Knock workflow pages, design tokens, and the generated workspace inventory.
Native app note
Section titled “Native app note”The native iOS and Android apps are product apps but not Bun workspaces. Use their Xcode/Gradle commands and the native CI workflows. They still depend on the shared API contract and synced i18n catalogs.