Local development
Workspace commands, infrastructure profiles and reproducible checks.
Workspace
Run commands from the repository root. pnpm dev starts package watchers, API, console, playground and docs; it does not start the example apps. pnpm dev:example starts the Next.js (:3100) and TanStack Start (:3200) examples; run it in a second terminal next to pnpm dev, which provides the API. To run just documentation: pnpm --filter @lynkoria/docs dev.
| Command | Purpose |
|---|---|
pnpm format:check / pnpm format | Oxfmt check / write |
pnpm lint | Oxlint, warnings fail |
pnpm dev:example | Next.js and TanStack Start example dev servers |
pnpm typecheck | All workspace types, including generated docs routes |
pnpm test | Unit, documentation and real-service integration tests |
pnpm build | SDKs, API, console, playground and static docs |
pnpm infra:validate | Local Compose, shell syntax and deployment-template tests |
pnpm --filter @lynkoria/api openapi | Regenerate docs/openapi.json from actual routes |
pnpm --filter @lynkoria/db generate | Generate a migration from schema changes |
Integration tests are deliberately uncached in Turbo: an earlier cached result cannot establish the current infrastructure state. Oxlint and Oxfmt remain the only lint/format tools.
Port conflicts
pnpm infra:up explicitly loads the root .env, as do the Compose commands below. Set host-port overrides and matching connection URLs in that file. Shell exports take precedence over .env; for a temporary override:
export LYNKORIA_PG_PORT=15432 LYNKORIA_REDIS_PORT=16379 LYNKORIA_VALKEY_PORT=16380
export DATABASE_URL=postgresql://realtime:local-dev-only@127.0.0.1:15432/lynkoria
export REDIS_URL=redis://127.0.0.1:16379
docker compose --env-file .env -f infra/local/compose.yaml --profile livekit --profile attachments up -d --wait
pnpm --filter @lynkoria/api testUpdate .env as well for watch processes. Valkey parity check:
docker compose --env-file .env -f infra/local/compose.yaml --profile valkey up -d --wait valkey
REDIS_URL=redis://127.0.0.1:16380 pnpm --filter @lynkoria/api testDefault Valkey port is 6380; this example uses the override above. Keep existing Docker volumes; do not use down --volumes unless intentionally erasing local data.
Documentation changes
Edit Markdown and navigation metadata under docs/. Add frontmatter title and preferably description. Use relative Markdown links for other guides. apps/docs resolves them to website routes. SDK examples in apps/docs/examples are typechecked; content tests verify links and navigation. docs/openapi.json is generated, not hand-edited.
Fumadocs/Next build with Turbopack, the Next.js default. Generated .source, .next and out directories are ignored. The static deployment artifact is apps/docs/out.