Contributing
Routa is open source under the MIT License. The repository is a workspace holding three published packages, two example applications, this documentation site, and a design lab. Framework checks, tests, and package builds use the locally pinned Vite Plus toolchain.
Before You Start
Section titled “Before You Start”- Node.js 24.11 or later on the Node 24 line, or Node.js 26 or later.
.nvmrcselects Node 24. - Vite Plus. Use
vpfor development commands; the root manifest pins its toolchain and pnpm 11.9.0 as the underlying dependency resolver. - 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 vp install --frozen-lockfileInstallation completes without changing the lockfile.
-
Run the full check suite before making changes, so you know the baseline is green.
Terminal window vp run checkvp run typecheckvp run buildvp run testA successful run reports correctly formatted files, zero type/lint errors, and a passing Vitest test summary. Oxlint can still print advisory warnings.
vp run checkfirst builds workspace declarations and runs Astro sync for both sites, then combines Oxfmt, type-aware Oxlint, compiler diagnostics, and the JavaScript plugins for dependency and secret checks.vp run typecheckalso runs explicit TypeScript source and test programs and Astro checks.vp run buildbuilds the packages, examples, and sites.vp run testruns all framework tests with Vite Plus’s bundled Vitest.Only package compilation is cached. Tests and type checks execute on every run. Install Vite Plus before running repository commands. Generated applications retain their existing TypeScript, Biome, and Vitest tooling.
-
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 vp run prepare:local-clivp run --filter full-api checkvp run --filter full-api devPreparation links the local CLI. The example check exits with status zero, and the development command starts a server with file watching.
-
Add a changeset for any change to a published package.
Terminal window vp run changesetChangesets prompts for packages and release notes, then writes a new file under
.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. -
Open the pull request with
.github/PULL_REQUEST_TEMPLATE.md. Its Evidence section shows the change instead of describing it: run the base branch and your branch, then paste the code and the output each one produces, such as a response, arouta checkdiagnostic, or a compiler error.Reviewers see what changed without checking out the branch.
Verify
Section titled “Verify”vp run 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.
vp run verifyvp run --filter @routa-ts/docs buildThe verification log ends with Pack check passed in ... and a successful task
summary. The docs build reports [build] Complete!. Both commands exit with status zero.
Documentation 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 vp install from the root, not from inside a package. |
| An example fails after a core change | Rebuild first. Examples consume built output, so run vp run build. |
| A formatter reports differences | Run vp run 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. |