Skip to content

Local setup

  • 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.
Terminal window
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.

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:

Terminal window
doppler login
doppler setup --no-interactive # binds this directory to the project/config in doppler.yaml

Prefix 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 (the doppler.yaml default) points DATABASE_URL at the deployed DEV database through a Railway TCP proxy — a plain doppler run -- … talks to DEV. dev_docker is the loopback config for the container stack and is only ever used through bun 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 own QUEUE_SUFFIX) stay in your shell: DATABASE_URL=… doppler run --preserve-env=DATABASE_URL -- bun run dev. Change dev_local itself only for values every developer should get; never put workstation values in dev, which is what production-like DEV runs on.
  • Fallback without Doppler: cp .env.example .env.local at 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.local once you are on Doppler.
  • Never print secret values (doppler secrets get, doppler secrets download) into a terminal log, doc, or chat. doppler secrets --only-names is fine.

Never paste secrets into docs or committed files. The source of truth for variable meaning is Settings → Environment variables.

SurfaceCommandNotes
Docsbun --filter @repo/docs devRuns generators first, then Astro/Starlight. No env needed.
Webcd apps/svelte-web && doppler run -- bun run devMain SvelteKit app.
APIdoppler run -- bun --filter api devHono host for Better Auth and tRPC.
Workerdoppler run -- bun --filter worker devBullMQ 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.

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.