Contributing
Routa is open source under the MIT License. The repository is a pnpm workspace holding three published packages, two example applications, and this documentation site, wired together with Turborepo.
Before You Start
Section titled “Before You Start”- Node.js 24 or later, matching
.nvmrc. - pnpm. The repository uses workspace protocol links between packages.
- A read of the v0 requirements and current public scope. Maintainers coordinate planned
V1 work through the project-local tracker described in
docs/agents/issue-tracker.md.
-
Install dependencies from the repository root.
Terminal window pnpm install -
Run the full check suite before making changes, so you know the baseline is green.
Terminal window pnpm checkpnpm typecheckpnpm buildpnpm testpnpm checkruns Biome formatting and lint checks. The other three run through Turborepo across every workspace package. -
Make the change in the package that owns the behavior.
Path Owns packages/coreRoute, middleware, config, logger, and query helpers packages/cliValidation, generation, OpenAPI, scaffolding, and the servers packages/create-routa-tsThe project scaffolder apps/docsThis documentation site examples/*Runnable demonstrations of the public surface -
Verify against a real project. The examples run the
routabinary, so build and link the local CLI before checking them.Terminal window pnpm prepare:local-clipnpm --filter full-api checkpnpm --filter full-api dev -
Add a changeset for any change to a published package.
Terminal window pnpm changeset -
Update the documentation in the same pull request. Read
apps/docs/AGENTS.mdfirst; it defines the required page frame, the package-manager command component, and the structure each section uses.
Verify
Section titled “Verify”pnpm verify runs the complete gate: lint, typecheck, tests, generated-file drift, example
checks, OpenAPI checks, the scaffold error smoke test, and a packaging check. A change is
ready when it passes and the docs site builds.
pnpm verifypnpm --filter @routa-ts/docs buildDocumentation Expectations
Section titled “Documentation Expectations”Every new feature needs all four of these, which is what the coverage rules in
apps/docs/AGENTS.md enforce:
- A reference entry with its signature, options, and one example.
- A mention in at least one guide showing it in a real workflow.
- An entry in Diagnostics for any new
ROUTA_*code. - A line in the implemented table on v0 Scope & Status.
Troubleshooting
Section titled “Troubleshooting”| Problem | Fix |
|---|---|
| Workspace packages resolve to published versions | Run pnpm install from the root, not from inside a package. |
| An example fails after a core change | Rebuild first. Examples consume built output, so run pnpm build. |
| Biome reports formatting differences | Run pnpm format to apply them. |
| The docs build fails on a slug | A sidebar entry in astro.config.mjs points at a page that does not exist. |