Skip to content

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.

  • Node.js 24.11 or later on the Node 24 line, or Node.js 26 or later. .nvmrc selects Node 24.
  • Vite Plus. Use vp for 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.
  1. Install dependencies from the repository root.

    Terminal window
    vp install --frozen-lockfile

    Installation completes without changing the lockfile.

  2. Run the full check suite before making changes, so you know the baseline is green.

    Terminal window
    vp run check
    vp run typecheck
    vp run build
    vp run test

    A successful run reports correctly formatted files, zero type/lint errors, and a passing Vitest test summary. Oxlint can still print advisory warnings.

    vp run check first 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 typecheck also runs explicit TypeScript source and test programs and Astro checks. vp run build builds the packages, examples, and sites. vp run test runs 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.

  3. Make the change in the package that owns the behavior.

    Path Owns
    packages/core Route, middleware, config, logger, and query helpers
    packages/cli Validation, generation, OpenAPI, scaffolding, and the servers
    packages/create-routa-ts The project scaffolder
    apps/docs This documentation site
    examples/* Runnable demonstrations of the public surface
  4. Verify against a real project. The examples run the routa binary, so build and link the local CLI before checking them.

    Terminal window
    vp run prepare:local-cli
    vp run --filter full-api check
    vp run --filter full-api dev

    Preparation links the local CLI. The example check exits with status zero, and the development command starts a server with file watching.

  5. Add a changeset for any change to a published package.

    Terminal window
    vp run changeset

    Changesets prompts for packages and release notes, then writes a new file under .changeset/.

  6. Update the documentation in the same pull request. Read apps/docs/AGENTS.md first; it defines the required page frame, the package-manager command component, and the structure each section uses.

  7. 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, a routa check diagnostic, or a compiler error.

    Reviewers see what changed without checking out the branch.

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.

Terminal window
vp run verify
vp run --filter @routa-ts/docs build

The 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.

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.
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.