CodeVetter
← All unpacks
CodeVetter · Repo Unpack evidence

TanStack/router

Scanned commit 1f0f20a320 dated 2026-10-01 — last upstream commit. Generated by codevetter 1.15.0 on 2026-10-02.

github.com/TanStack/router ↗ · 4000 files · 10.5 MB · scan capped

TanStack Router A modern router designed for type safety, data‑driven navigation, and seamless developer experience.

Deep analysis by cli:codex via the codex CLI on 2026-10-02 (402s) — every claim below links to its cited source files. Source inspection; upstream code and tests were not executed.

Overview

TanStack Router is a TypeScript routing library with shared navigation and data-loading machinery plus React, Solid, and Vue bindings. This repository also implements TanStack Start, which adds request middleware, server functions, server routes, and streamed rendering. Its distinctive boundaries are typed route trees, separate client/server loading paths, request-scoped server state, and build-time route generation. This brief examines commit 1f0f20a3206a28365d74fd2485b9a8eedbf74dd0 through bounded source inspection; tests and CI were inspected, not executed.

System map

The repository publishes routing and full-stack framework packages rather than one deployable application. RouterCore owns shared routing, while framework bindings provide rendering and store integration. Start introduces HTTP request handling and request-local context on top of that core. Workspace scripts and CI coordinate builds, correctness checks, performance scenarios, and releases.

Feature catalog

The inspected public surface covers typed route construction, navigation, validated URL state, route loading, and framework presentation. Start adds server-function RPC, HTTP method handlers, middleware, and streaming SSR. Developer tooling generates route trees through a CLI or bundler plugin. The catalog describes capabilities demonstrated by inspected implementations and fixtures, not an exhaustive inventory of every package export.

Data flow

URLs become parsed locations, inherited validated search values, loader dependencies, and route matches. Client loading carries context and cancellation ownership through reusable resource work into framework presentation. Server requests supply their own Router, middleware context, and serialized transport. Durable outputs in the inspected paths are browser history, generated route files, and session operations delegated to h3.

Behavior traces

The investigation followed browser startup, client navigation, server rendering, RPC, and generated-file output through their concrete functions. Each trace retains meaningful branches such as canonical redirects, document navigation, method mismatch, or unchanged generated output. Authentication persistence was also traced through a browser-test fixture and the session wrapper. These are source-derived execution paths, not observed runtime runs.

Testing signals

Tests and CI were inspected, not executed; no passing result, coverage percentage, or benchmark outcome is asserted. The inspected suites combine Vitest, React Testing Library, type assertions, generator snapshots, and Playwright browser checks. CI definitions connect affected targets and framework benchmark matrices. The inventory and test inspection are bounded, and mocked unit boundaries do not establish deployment-level correctness.

Risk map

The main sensitive boundaries are URL interpretation, RPC decoding, middleware trust, SSR stream ownership, and generator filesystem access. Several protections are explicit, but their effectiveness has not been dynamically verified here. The risks below are source observations or labeled hypotheses, not confirmed vulnerabilities. Test limitations are specific to the inspected files and do not imply whole-repository absence of coverage.

Extension points

Extension is concentrated in route options, framework factories, generator hooks, middleware, and transport adapters. These hooks allow application behavior without moving request state into shared metadata. Build integration is split between generator configuration and bundler lifecycle hooks. SSR extensions must preserve the existing cleanup and serialization ownership contracts.

Contributor handoff

Begin at the affected core boundary and its framework consumers, then read the local instructions and executable configuration as source. Tests and CI were inspected, not executed; all commands here describe future validation when execution is authorized. This brief is a bounded investigation of the pinned commit, not comprehensive coverage or a vulnerability audit. Preserve public contracts, request isolation, cancellation ownership, and generated-file boundaries.

Languages

LanguageFilesShare of source
TypeScript878096%
JSON1338docs/config
Markdown527docs/config
JavaScript2903%
CSS279docs/config
HTML127docs/config
Vue631%
YAML39docs/config

Start reading here

Probable source entrypoint: packages/ — inferred from the directory tree and manifest, not the upstream docs.

Source roots

packages/ (918 files)

Repository structure

Top-level pathFiles
benchmarks/919
e2e/919
packages/918
examples/918
docs/248
scripts/27
.github/14
_artifacts/5

Docs found: AGENTS.mdCONTRIBUTING.mdREADME.mddocs/AGENTS.mddocs/router/api/file-based-routing.mddocs/router/api/router.mddocs/router/api/router/ActiveLinkOptionsType.mddocs/router/api/router/AsyncRouteComponentType.mddocs/router/api/router/FileRouteClass.mddocs/router/api/router/LinkOptionsType.md

Package

package.json — root, 20 declared dependencies.

@changesets/changelog-github@changesets/cli@nx/devkit@playwright/test@swc-node/register@tanstack/eslint-config@types/node@typescript/nativeeslinteslint-plugin-unused-importsmarkdown-link-extractornx

CI & config entrypoints

Structural health signals

Average score 7.6/10 across 96 analyzed source files; 10 hotspots surfaced.

These are deterministic review leads — size, churn, and structural signals — not proof of a bug in this project.

Recent history