| name | dev-workflow |
| description | Information on how to build, lint, typecheck and test the project, with details on dev and prod mode differences |
Dev Workflow Skill
Describes how to build, typecheck, and test this project.
Ports & Domains
- Backend port:
3222 (set via PORT env var)
- Local domain:
cityguide.local → proxied to port 3222 via localias with HTTPS enabled
- In production
SERVER_DOMAIN=cityguide.local; on a real deployment this will be the actual domain name
To confirm localias is running and check the mapping:
localias list
If localias is running, treat https://cityguide.local as the live URL for the app. If it is not running, the app is reachable at http://localhost:3222.
Build
bun run build:frontend
bun run build:backend
bun run build:all
Frontend build uses vue-tsc -b && vite build.
Backend build uses bun build ./src/index.ts --target bun --outdir ./dist.
Dev (watch mode)
bun run dev
bun run dev:backend
bun run dev:frontend
In dev mode the backend runs on http://localhost:3222. The frontend dev server (bunx vite) runs separately on port 5173 and proxies API calls to the backend via VITE_API_URL=http://localhost:3222.
Typecheck
bun run typecheck
- Backend:
tsc --noEmit (strict, bun-types, covers src/ scripts/ tests/ drizzle.config.ts)
- Frontend:
vue-tsc -b (composite project references via tsconfig.app.json / tsconfig.node.json)
Tests
Tests exist only in the backend (backend/tests/*.test.ts).
bun run --cwd backend test
Uses bun:test (describe, it, expect, beforeAll, afterAll).
Test helper pattern
backend/tests/helpers/app.ts exports makeTestApp(), which spins up a full Elysia app wired to a fresh in-memory PGlite database (via MemoryFS) with migrations applied. Each suite gets a clean DB; call teardown() in afterAll.
import { makeTestApp, get, post, patch } from './helpers/app'
let app: TestApp
let teardown: () => Promise<void>
beforeAll(async () => { ({ app, teardown } = await makeTestApp()) })
afterAll(async () => { await teardown() })
The helpers get, post, and patch call app.handle(new Request(...)) and return { status, body }.
Adding tests
- Place new files in
backend/tests/ named *.test.ts.
- Use
makeTestApp() — do not import the live DB or call external services.
- No frontend test setup exists yet.