Client-side routing in the Single Page App with file-based TanStack Router.
The Single Page App routes with file-based TanStack Router. Every route is a file in src/routes/: its location on disk maps to a URL path, and the tooling compiles those files into src/bootstrap/routeTree.gen.ts, the generated route tree the router consumes at runtime. You write small, declarative route files, and the framework wires up the tree, type-safe navigation, and matching for you.Routes stay thin. A route file is about wiring: it points a URL at a component and a set of boundaries (pending, error, not-found), and nothing more. The actual UI lives in features and data fetching lives in hooks, so each route reads as a clear map from path to behavior.
How it works
A route file declares a Route with createFileRoute. The path string mirrors the file’s location under src/routes/. The build step scans src/routes/, assembles every route into routeTree.gen.ts, and the router (mounted in src/bootstrap/app.tsx) uses that tree to match the current URL and render the matching component, or one of its boundaries while the route loads, errors, or fails to match.
Concept
What happens
File → URL
A file at src/routes/<kebab>.tsx maps to the URL /<kebab>. The path you pass to createFileRoute matches that location.
Root route
src/routes/__root.tsx is the app-wide layout and the error / not-found boundaries that wrap every page.
Index route
src/routes/index.tsx is the index (/) route — the landing page.
Generated tree
All route files are compiled into src/bootstrap/routeTree.gen.ts. This is tooling output — never edit it by hand.
Boundaries
Each route can declare pendingComponent, errorComponent, and notFoundComponent so loading, failure, and missing states render predictably.
Nesting
A layout renders its child routes through <Outlet /> from @tanstack/react-router.
Mounting
The router and React root are created and mounted in src/bootstrap/app.tsx, where global providers (e.g. the TanStack Query client) are wired.
Never edit src/bootstrap/routeTree.gen.ts by hand. It is generated from the files in src/routes/ and is Biome-ignored — any manual change is overwritten the next time the tree is regenerated. To change routing, add, rename, or remove files in src/routes/.
The root route
src/routes/__root.tsx is the entry of the tree. It defines the layout that wraps every page: shared chrome (navigation, providers-aware structure) plus the app-wide error and not-found boundaries. Every other route renders inside it, so put cross-page concerns here rather than repeating them per route.
The index route
src/routes/index.tsx is the index route for /, the landing page rendered when no deeper path matches. It is an ordinary route file: a Route declared with createFileRoute that points at the landing component.
Defining a route
Create a feature route with spa:feature:create. It generates a file at src/routes/<kebab>.tsx that maps to /<kebab>, declares the Route with createFileRoute, and wires a component alongside its pending, error, and not-found boundary components. A real generated route:
import { createFileRoute } from "@tanstack/react-router";import { SettingsErrorLayout } from "../features/settings/layouts/SettingsErrorLayout";import { SettingsLayout } from "../features/settings/layouts/SettingsLayout";import { SettingsNotFoundLayout } from "../features/settings/layouts/SettingsNotFoundLayout";import { SettingsSkeletonLayout } from "../features/settings/layouts/SettingsSkeletonLayout";export const Route = createFileRoute("/settings")({ component: SettingsLayout, pendingComponent: SettingsSkeletonLayout, errorComponent: SettingsErrorLayout, notFoundComponent: SettingsNotFoundLayout,});
Each option maps to a state the router renders:
component — the page rendered when the route matches and is ready.
pendingComponent — shown while the route resolves (e.g. a skeleton).
errorComponent — shown when the route throws.
notFoundComponent — shown when no matching child is found.
The components come from the route’s feature; the route file only references them, keeping the wiring separate from the UI.
Nesting with Outlet
A layout renders its child routes through <Outlet /> from @tanstack/react-router. Place Outlet where children should appear, and the matched child route renders into that slot:
This is how a parent route wraps its children with shared structure while each child controls its own content.
Mounting the router
The router and the React root are created and mounted in src/bootstrap/app.tsx. The router is built from the generated routeTree.gen.ts, and global providers (such as the TanStack Query client) are wired around it there. That single file is the boundary between the generated route tree and the running app: add app-wide providers here, not in individual routes.
Reading query params
Navigation and links come from @tanstack/react-router. To read the current URL’s search parameters, use the useSearch hook. The spa’s useLang hook reads the lang query param from any route:
import { useSearch } from "@tanstack/react-router";export const DEFAULT_LANG = "en";// strict: false opts out of route-specific search typing so it works from any route.export const useLang = (): string => { const search = useSearch({ strict: false }) as { lang?: string }; return search.lang ?? DEFAULT_LANG;};
Passing strict: false opts out of route-specific search typing, so the hook works regardless of which route the component is mounted under. That is useful for cross-cutting values like the active language (see internationalization). Route params follow the same idea: read them through the router’s hooks rather than parsing the URL yourself.
Patterns to follow
A route file should wire a component and its boundaries and nothing more, so push UI into features and data fetching into hooks. Never edit routeTree.gen.ts: it is generated from src/routes/ and Biome-ignored, so change routing by editing files in src/routes/ and let the tree regenerate. Keep data access out of route files (routes wire, hooks fetch) so they stay declarative; see data fetching.Declare pendingComponent, errorComponent, and notFoundComponent so loading, failure, and missing states are explicit instead of blank screens. Put shared layout and boundaries in __root.tsx, and global providers in bootstrap/app.tsx, rather than repeating them per route. Read params through useSearch and the router’s param hooks instead of reading window.location directly, so values stay in sync with navigation.
Related
SPA overview — what the Single Page App is and how it fits together.
Structure — where routes/, features/, and bootstrap/ live.
Features — the components and layouts a route delegates to.
Data fetching — the hooks that load data for a route.
Backend routing — server-side routing, distinct from this client-side router.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Talos","colors":{"primary":"#b07b36","light":"#d6a86a","dark":"#8a5a24"},"logo":{"light":"https://mintcdn.com/ooneex/LCNjS4NG4MSI9OUo/logo/light.svg?fit=max\u0026auto=format\u0026n=LCNjS4NG4MSI9OUo\u0026q=85\u0026s=30315860210d38d41afa289898d1d2be","dark":"https://mintcdn.com/ooneex/LCNjS4NG4MSI9OUo/logo/dark.svg?fit=max\u0026auto=format\u0026n=LCNjS4NG4MSI9OUo\u0026q=85\u0026s=46f5843455bd4e2114e13e5b35b481c2"},"favicon":"https://mintcdn.com/ooneex/LCNjS4NG4MSI9OUo/favicon.svg?fit=max\u0026auto=format\u0026n=LCNjS4NG4MSI9OUo\u0026q=85\u0026s=469331820d39c93caaa025f62f6b97bf","background":{"color":{"light":"#fdfbf6","dark":"#2e2417"}},"navbar":{"links":[{"icon":"download","href":"/cli/installation","label":"Install"}]},"footer":{"socials":{}},"fonts":{"family":"Space Grotesk"},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ooneex","hasAudioNarration":false,"actualSubdomain":"ooneex","customDomains":["docs.talosjs.com"],"gitSource":{"type":"github","owner":"ooneex","repo":"talos-doc","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae95af162209e0b20b8b4c1:success","clientVersion":"0.0.4428","searchFilterCounts":[{"language":"default","tag":"Framework","count":103},{"language":"default","tag":"Command Line","count":95},{"language":"default","tag":"Commands","count":94},{"language":"default","tag":"AI","count":33},{"language":"default","tag":"Components","count":23},{"language":"default","tag":"Prompts","count":18},{"language":"default","tag":"Resources","count":18},{"language":"default","tag":"Utilities","count":18},{"language":"default","tag":"Integrations","count":12},{"language":"default","tag":"Single Page App","count":8}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[{"filePath":"custom.css","content":":root{--talos-primary: oklch(0.58 0.11 62);--talos-primary-50: oklch(96.5% 0.014 75);--talos-primary-100: oklch(93.5% 0.03 73);--talos-primary-200: oklch(88% 0.055 70);--talos-primary-300: oklch(80% 0.08 67);--talos-primary-400: oklch(71% 0.1 64);--talos-primary-500: oklch(63% 0.11 62);--talos-primary-600: oklch(55% 0.108 60);--talos-primary-700: oklch(47% 0.097 58);--talos-primary-900: oklch(33% 0.07 55);--talos-secondary: oklch(0.7 0.1 185);--talos-secondary-100: oklch(93% 0.04 185);--talos-secondary-300: oklch(80% 0.08 186);--talos-secondary-600: oklch(0.55 0.09 190);--talos-background: oklch(0.972 0.012 78);--talos-foreground: oklch(0.33 0.07 58);--talos-muted: oklch(0.955 0.016 76);--talos-muted-foreground: oklch(0.55 0.028 70);--talos-border: oklch(0.86 0.045 72);--talos-link: oklch(0.5 0.108 60);--talos-radius: 0.45rem}.dark{--talos-background: oklch(0.23 0.035 64);--talos-foreground: oklch(0.955 0.016 76);--talos-muted: oklch(0.34 0.042 66);--talos-muted-foreground: oklch(0.78 0.03 72);--talos-border: oklch(0.43 0.052 64);--talos-link: oklch(0.86 0.045 72)}h1{color:var(--talos-foreground)!important}.dark h1{color:var(--talos-primary-300)!important}h2:not(nav h2):not(aside h2),h3:not(nav h3):not(aside h3),h4:not(nav h4):not(aside h4),h5:not(nav h5):not(aside h5),h6:not(nav h6):not(aside h6){color:var(--talos-foreground)!important}.dark h2:not(nav h2):not(aside h2),.dark h3:not(nav h3):not(aside h3),.dark h4:not(nav h4):not(aside h4),.dark h5:not(nav h5):not(aside h5),.dark h6:not(nav h6):not(aside h6){color:var(--talos-primary-300)!important}.sidebar-group-header{color:var(--talos-primary)!important}.dark .sidebar-group-header{color:var(--talos-primary-300)!important}[data-component-part=\"card-icon\"],[data-component-part=\"card-icon\"] svg{color:var(--talos-primary)!important;fill:var(--talos-primary)!important}[data-component-part=\"card-icon\"] svg[style*=\"mask\"]{background-color:var(--talos-primary)!important}.dark [data-component-part=\"card-icon\"],.dark [data-component-part=\"card-icon\"] svg{color:var(--talos-primary-300)!important;fill:var(--talos-primary-300)!important}.dark [data-component-part=\"card-icon\"] svg[style*=\"mask\"]{background-color:var(--talos-primary-300)!important}#content-area a:not([data-component-part]):not(.not-prose a),.prose a:not([data-component-part]){color:var(--talos-link)!important;text-decoration:none!important;border-bottom:none!important}#content-area a:not([data-component-part]):not(.not-prose a):hover,.prose a:not([data-component-part]):hover{color:var(--talos-secondary-600)!important;text-decoration:underline!important}.dark #content-area a:not([data-component-part]):not(.not-prose a),.dark .prose a:not([data-component-part]){color:var(--talos-link)!important}#pagination a:hover span{color:var(--talos-secondary-600)!important}#pagination a:hover svg{stroke:var(--talos-secondary-600)!important}::selection{background-color:var(--talos-primary);color:#fff}*::-webkit-scrollbar{width:4px;height:4px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background-color:var(--talos-primary);border-radius:9999px}#navbar a[href*=\"/cli/installation\"]{color:var(--talos-primary)!important;background-color:var(--talos-primary-100)!important;border:1px solid transparent!important;border-radius:var(--talos-radius)!important;padding:0.35rem 0.75rem!important;transition:border-color 0.15s ease}#navbar a[href*=\"/cli/installation\"]:hover{border-color:var(--talos-primary)!important}.dark #navbar a[href*=\"/cli/installation\"]{color:var(--talos-primary-300)!important;background-color:var(--talos-primary-700)!important}.dark #navbar a[href*=\"/cli/installation\"]:hover{border-color:var(--talos-primary-300)!important}#navbar a[href*=\"/cli/installation\"] svg{color:var(--talos-primary)!important;fill:var(--talos-primary)!important}#navbar a[href*=\"/cli/installation\"] svg[style*=\"mask\"]{background-color:var(--talos-primary)!important}.dark #navbar a[href*=\"/cli/installation\"] svg{color:var(--talos-primary-300)!important;fill:var(--talos-primary-300)!important}.dark #navbar a[href*=\"/cli/installation\"] svg[style*=\"mask\"]{background-color:var(--talos-primary-300)!important}a[href*=\"mintlify.com\"][href*=\"utm_campaign=poweredBy\"],a[href*=\"mintlify.com?utm_source=powered\"]{display:none!important}"}]}
{"page":{"pagePath":"spa/routing","slug":"/spa/routing","pageMetadata":{"title":"Routing","description":"Client-side routing in the Single Page App with file-based TanStack Router.","href":"/spa/routing"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Client-side routing in the Single Page App with file-based TanStack Router.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`The Single Page App routes with `,_jsxs(_components.strong,{children:[`file-based `,_jsx(_components.a,{href:`https://tanstack.com/router`,children:`TanStack Router`})]}),`. Every route is a file in `,_jsx(_components.code,{children:`src/routes/`}),`: its location on disk maps to a URL path, and the tooling compiles those files into `,_jsx(_components.code,{children:`src/bootstrap/routeTree.gen.ts`}),`, the generated route tree the router consumes at runtime. You write small, declarative route files, and the framework wires up the tree, type-safe navigation, and matching for you.`]}),`\n`,_jsxs(_components.p,{children:[`Routes stay thin. A route file is about wiring: it points a URL at a component and a set of boundaries (pending, error, not-found), and nothing more. The actual UI lives in `,_jsx(_components.a,{href:`/spa/features`,children:`features`}),` and data fetching lives in `,_jsx(_components.a,{href:`/spa/data-fetching`,children:`hooks`}),`, so each route reads as a clear map from path to behavior.`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsxs(_components.p,{children:[`A route file declares a `,_jsx(_components.code,{children:`Route`}),` with `,_jsx(_components.code,{children:`createFileRoute`}),`. The path string mirrors the file’s location under `,_jsx(_components.code,{children:`src/routes/`}),`. The build step scans `,_jsx(_components.code,{children:`src/routes/`}),`, assembles every route into `,_jsx(_components.code,{children:`routeTree.gen.ts`}),`, and the router (mounted in `,_jsx(_components.code,{children:`src/bootstrap/app.tsx`}),`) uses that tree to match the current URL and render the matching component, or one of its boundaries while the route loads, errors, or fails to match.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Concept`}),_jsx(_components.th,{children:`What happens`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`File → URL`}),_jsxs(_components.td,{children:[`A file at `,_jsx(_components.code,{children:`src/routes/\u003ckebab>.tsx`}),` maps to the URL `,_jsx(_components.code,{children:`/\u003ckebab>`}),`. The path you pass to `,_jsx(_components.code,{children:`createFileRoute`}),` matches that location.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Root route`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`src/routes/__root.tsx`}),` is the app-wide layout and the error / not-found boundaries that wrap every page.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Index route`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`src/routes/index.tsx`}),` is the index (`,_jsx(_components.code,{children:`/`}),`) route — the landing page.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Generated tree`}),_jsxs(_components.td,{children:[`All route files are compiled into `,_jsx(_components.code,{children:`src/bootstrap/routeTree.gen.ts`}),`. This is tooling output — never edit it by hand.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Boundaries`}),_jsxs(_components.td,{children:[`Each route can declare `,_jsx(_components.code,{children:`pendingComponent`}),`, `,_jsx(_components.code,{children:`errorComponent`}),`, and `,_jsx(_components.code,{children:`notFoundComponent`}),` so loading, failure, and missing states render predictably.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Nesting`}),_jsxs(_components.td,{children:[`A layout renders its child routes through `,_jsx(_components.code,{children:`\u003cOutlet />`}),` from `,_jsx(_components.code,{children:`@tanstack/react-router`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Mounting`}),_jsxs(_components.td,{children:[`The router and React root are created and mounted in `,_jsx(_components.code,{children:`src/bootstrap/app.tsx`}),`, where global providers (e.g. the TanStack Query client) are wired.`]})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Never edit `,_jsx(_components.code,{children:`src/bootstrap/routeTree.gen.ts`}),` by hand. It is generated from the files in `,_jsx(_components.code,{children:`src/routes/`}),` and is Biome-ignored — any manual change is overwritten the next time the tree is regenerated. To change routing, add, rename, or remove files in `,_jsx(_components.code,{children:`src/routes/`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`the-root-route`,children:`The root route`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`src/routes/__root.tsx`}),` is the entry of the tree. It defines the layout that wraps every page: shared chrome (navigation, providers-aware structure) plus the app-wide error and not-found boundaries. Every other route renders inside it, so put cross-page concerns here rather than repeating them per route.`]}),`\n`,_jsx(Heading,{level:`2`,id:`the-index-route`,children:`The index route`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`src/routes/index.tsx`}),` is the index route for `,_jsx(_components.code,{children:`/`}),`, the landing page rendered when no deeper path matches. It is an ordinary route file: a `,_jsx(_components.code,{children:`Route`}),` declared with `,_jsx(_components.code,{children:`createFileRoute`}),` that points at the landing component.`]}),`\n`,_jsx(Heading,{level:`2`,id:`defining-a-route`,children:`Defining a route`}),`\n`,_jsxs(_components.p,{children:[`Create a feature route with `,_jsx(_components.code,{children:`spa:feature:create`}),`. It generates a file at `,_jsx(_components.code,{children:`src/routes/\u003ckebab>.tsx`}),` that maps to `,_jsx(_components.code,{children:`/\u003ckebab>`}),`, declares the `,_jsx(_components.code,{children:`Route`}),` with `,_jsx(_components.code,{children:`createFileRoute`}),`, and wires a component alongside its pending, error, and not-found boundary components. A real generated route:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createFileRoute`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@tanstack/react-router\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SettingsErrorLayout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"../features/settings/layouts/SettingsErrorLayout\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SettingsLayout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"../features/settings/layouts/SettingsLayout\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SettingsNotFoundLayout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"../features/settings/layouts/SettingsNotFoundLayout\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SettingsSkeletonLayout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"../features/settings/layouts/SettingsSkeletonLayout\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` Route`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createFileRoute`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/settings\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` component:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SettingsLayout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` pendingComponent:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SettingsSkeletonLayout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` errorComponent:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SettingsErrorLayout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` notFoundComponent:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SettingsNotFoundLayout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Each option maps to a state the router renders:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`component`}),` — the page rendered when the route matches and is ready.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`pendingComponent`}),` — shown while the route resolves (e.g. a skeleton).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`errorComponent`}),` — shown when the route throws.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`notFoundComponent`}),` — shown when no matching child is found.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`The components come from the route’s feature; the route file only references them, keeping the wiring separate from the UI.`}),`\n`,_jsx(Heading,{level:`2`,id:`nesting-with-outlet`,children:`Nesting with Outlet`}),`\n`,_jsxs(_components.p,{children:[`A layout renders its child routes through `,_jsx(_components.code,{children:`\u003cOutlet />`}),` from `,_jsx(_components.code,{children:`@tanstack/react-router`}),`. Place `,_jsx(_components.code,{children:`Outlet`}),` where children should appear, and the matched child route renders into that slot:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Outlet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@tanstack/react-router\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` SettingsLayout`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ({ `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`children`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`children`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` React`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`ReactNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`section`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`children`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ??`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`Outlet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`section`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This is how a parent route wraps its children with shared structure while each child controls its own content.`}),`\n`,_jsx(Heading,{level:`2`,id:`mounting-the-router`,children:`Mounting the router`}),`\n`,_jsxs(_components.p,{children:[`The router and the React root are created and mounted in `,_jsx(_components.code,{children:`src/bootstrap/app.tsx`}),`. The router is built from the generated `,_jsx(_components.code,{children:`routeTree.gen.ts`}),`, and global providers (such as the TanStack Query client) are wired around it there. That single file is the boundary between the generated route tree and the running app: add app-wide providers here, not in individual routes.`]}),`\n`,_jsx(Heading,{level:`2`,id:`reading-query-params`,children:`Reading query params`}),`\n`,_jsxs(_components.p,{children:[`Navigation and links come from `,_jsx(_components.code,{children:`@tanstack/react-router`}),`. To read the current URL’s search parameters, use the `,_jsx(_components.code,{children:`useSearch`}),` hook. The spa’s `,_jsx(_components.code,{children:`useLang`}),` hook reads the `,_jsx(_components.code,{children:`lang`}),` query param from any route:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`useSearch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@tanstack/react-router\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` DEFAULT_LANG`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"en\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// strict: false opts out of route-specific search typing so it works from any route.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` useLang`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ()`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` search`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` useSearch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`strict:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`lang`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` search`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`lang`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ??`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` DEFAULT_LANG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Passing `,_jsx(_components.code,{children:`strict: false`}),` opts out of route-specific search typing, so the hook works regardless of which route the component is mounted under. That is useful for cross-cutting values like the active language (see `,_jsx(_components.a,{href:`/spa/internationalization`,children:`internationalization`}),`). Route params follow the same idea: read them through the router’s hooks rather than parsing the URL yourself.`]}),`\n`,_jsx(Heading,{level:`2`,id:`patterns-to-follow`,children:`Patterns to follow`}),`\n`,_jsxs(_components.p,{children:[`A route file should wire a component and its boundaries and nothing more, so push UI into `,_jsx(_components.a,{href:`/spa/features`,children:`features`}),` and data fetching into `,_jsx(_components.a,{href:`/spa/data-fetching`,children:`hooks`}),`. Never edit `,_jsx(_components.code,{children:`routeTree.gen.ts`}),`: it is generated from `,_jsx(_components.code,{children:`src/routes/`}),` and Biome-ignored, so change routing by editing files in `,_jsx(_components.code,{children:`src/routes/`}),` and let the tree regenerate. Keep data access out of route files (routes wire, hooks fetch) so they stay declarative; see `,_jsx(_components.a,{href:`/spa/data-fetching`,children:`data fetching`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Declare `,_jsx(_components.code,{children:`pendingComponent`}),`, `,_jsx(_components.code,{children:`errorComponent`}),`, and `,_jsx(_components.code,{children:`notFoundComponent`}),` so loading, failure, and missing states are explicit instead of blank screens. Put shared layout and boundaries in `,_jsx(_components.code,{children:`__root.tsx`}),`, and global providers in `,_jsx(_components.code,{children:`bootstrap/app.tsx`}),`, rather than repeating them per route. Read params through `,_jsx(_components.code,{children:`useSearch`}),` and the router’s param hooks instead of reading `,_jsx(_components.code,{children:`window.location`}),` directly, so values stay in sync with navigation.`]}),`\n`,_jsx(Heading,{level:`2`,id:`related`,children:`Related`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/spa/overview`,children:`SPA overview`}),` — what the Single Page App is and how it fits together.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/spa/structure`,children:`Structure`}),` — where `,_jsx(_components.code,{children:`routes/`}),`, `,_jsx(_components.code,{children:`features/`}),`, and `,_jsx(_components.code,{children:`bootstrap/`}),` live.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/spa/features`,children:`Features`}),` — the components and layouts a route delegates to.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/spa/data-fetching`,children:`Data fetching`}),` — the hooks that load data for a route.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/spa/internationalization`,children:`Internationalization`}),` — the `,_jsx(_components.code,{children:`useLang`}),` hook and language handling.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/basics/routing`,children:`Backend routing`}),` — server-side routing, distinct from this client-side router.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Routing","description":"Client-side routing in the Single Page App with file-based TanStack Router.","href":"/spa/routing"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"The root route","slug":"the-root-route","depth":2,"children":[]},{"title":"The index route","slug":"the-index-route","depth":2,"children":[]},{"title":"Defining a route","slug":"defining-a-route","depth":2,"children":[]},{"title":"Nesting with Outlet","slug":"nesting-with-outlet","depth":2,"children":[]},{"title":"Mounting the router","slug":"mounting-the-router","depth":2,"children":[]},{"title":"Reading query params","slug":"reading-query-params","depth":2,"children":[]},{"title":"Patterns to follow","slug":"patterns-to-follow","depth":2,"children":[]},{"title":"Related","slug":"related","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"ooneex","siteName":"Talos","title":"Routing - Talos","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-01T04:43:24.769Z","originalFileLocation":"spa/routing.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Client-side routing in the Single Page App with file-based TanStack Router.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Talos\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ooneex/PR9dPdss1Zda5yko/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/ooneex/PR9dPdss1Zda5yko/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ooneex/PR9dPdss1Zda5yko/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ooneex/PR9dPdss1Zda5yko/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ooneex/PR9dPdss1Zda5yko/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ooneex/PR9dPdss1Zda5yko/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ooneex/PR9dPdss1Zda5yko/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ooneex/PR9dPdss1Zda5yko/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ooneex/PR9dPdss1Zda5yko/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Routing - Talos\">\u003cmeta data-mint-head property=\"og:description\" content=\"Client-side routing in the Single Page App with file-based TanStack Router.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Talos\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.talosjs.com/spa/routing\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ooneex.mintlify.site/_mintlify/api/og/v2?division=Single+Page+App\u0026amp;title=Routing\u0026amp;description=Client-side+routing+in+the+Single+Page+App+with+file-based+TanStack+Router.\u0026amp;theme=ffeb264b7babaf1c4fb8b976\u0026amp;signature=18496da8edd2e8420ac2164c819f3b9ffb56c4516d4c8795a0aa2868af15f766\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Routing - Talos\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Client-side routing in the Single Page App with file-based TanStack Router.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ooneex.mintlify.site/_mintlify/api/og/v2?division=Single+Page+App\u0026amp;title=Routing\u0026amp;description=Client-side+routing+in+the+Single+Page+App+with+file-based+TanStack+Router.\u0026amp;theme=ffeb264b7babaf1c4fb8b976\u0026amp;signature=18496da8edd2e8420ac2164c819f3b9ffb56c4516d4c8795a0aa2868af15f766\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/ooneex/PR9dPdss1Zda5yko/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Talos\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#b07b36\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.talosjs.com/spa/routing\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/spa/routing.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.talosjs.com/#organization\",\"name\":\"Talos\",\"url\":\"https://docs.talosjs.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ooneex/LCNjS4NG4MSI9OUo/logo/light.svg?fit=max\u0026auto=format\u0026n=LCNjS4NG4MSI9OUo\u0026q=85\u0026s=30315860210d38d41afa289898d1d2be\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.talosjs.com#website\",\"name\":\"Talos\",\"url\":\"https://docs.talosjs.com\",\"publisher\":{\"@id\":\"https://docs.talosjs.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.talosjs.com/spa/routing#webpage\",\"url\":\"https://docs.talosjs.com/spa/routing\",\"name\":\"Routing\",\"description\":\"Client-side routing in the Single Page App with file-based TanStack Router.\",\"dateModified\":\"2026-07-01T04:43:24.769Z\",\"isPartOf\":{\"@id\":\"https://docs.talosjs.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.talosjs.com/spa/routing#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.talosjs.com/spa/routing#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Framework\",\"item\":\"https://docs.talosjs.com/basics/routing\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Single Page App\",\"item\":\"https://docs.talosjs.com/spa/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Routing\",\"item\":\"https://docs.talosjs.com/spa/routing\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.talosjs.com/spa/routing#article\",\"headline\":\"Routing\",\"name\":\"Routing\",\"description\":\"Client-side routing in the Single Page App with file-based TanStack Router.\",\"url\":\"https://docs.talosjs.com/spa/routing\",\"mainEntityOfPage\":{\"@id\":\"https://docs.talosjs.com/spa/routing#webpage\"},\"dateModified\":\"2026-07-01T04:43:24.769Z\",\"publisher\":{\"@id\":\"https://docs.talosjs.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.talosjs.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Talos\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Talos\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/spa/routing.md","siteName":"Talos","nav":{"global":{"anchors":[]},"pages":[{"group":"Getting Started","icon":"rocket","pages":[{"title":"What is Talos?","href":"/getting-started/index"},{"title":"Create your app","href":"/getting-started/create-app"},{"title":"Monorepo","href":"/getting-started/monorepo"},{"title":"Configuration","href":"/getting-started/configuration"}]},{"group":"AI","icon":"robot","pages":[{"title":"Spec-Driven Development","href":"/ai/spec-driven-development"},{"group":"Agents","pages":[{"title":"Overview","href":"/ai/agents/overview"},{"title":"Defining an Agent","href":"/ai/agents/defining"},{"title":"Running an Agent","href":"/ai/agents/running"},{"title":"Tools","href":"/ai/agents/tools"},{"title":"Middleware","href":"/ai/agents/middleware"},{"title":"Structured Output","href":"/ai/agents/structured-output"},{"title":"Built-in Tools","href":"/ai/agents/built-in-tools"}]},{"group":"RAG","pages":[{"title":"Overview","href":"/ai/rag/overview"},{"title":"Vector Database","href":"/ai/rag/vector-database"},{"title":"Vector Table","href":"/ai/rag/vector-table"},{"title":"PDF Extraction","href":"/ai/rag/pdf-extraction"},{"title":"Embeddings","href":"/ai/rag/embeddings"},{"title":"Search","href":"/ai/rag/search"},{"title":"Filtering","href":"/ai/rag/filtering"}]},{"group":"Prompts","pages":[{"group":"Resources","pages":[{"title":"User Resource","href":"/ai/prompts/resources/user-resource"},{"title":"Chat Resource","href":"/ai/prompts/resources/chat-resource"},{"title":"Logger Resource","href":"/ai/prompts/resources/logger-resource"},{"title":"Book Resource","href":"/ai/prompts/resources/book-resource"},{"title":"Video Resource","href":"/ai/prompts/resources/video-resource"},{"title":"Audio Resource","href":"/ai/prompts/resources/audio-resource"},{"title":"Tag Resource","href":"/ai/prompts/resources/tag-resource"},{"title":"Topic Resource","href":"/ai/prompts/resources/topic-resource"},{"title":"Category Resource","href":"/ai/prompts/resources/category-resource"},{"title":"Folder Resource","href":"/ai/prompts/resources/folder-resource"},{"title":"Task Resource","href":"/ai/prompts/resources/task-resource"},{"title":"Event Resource","href":"/ai/prompts/resources/event-resource"},{"title":"Country Resource","href":"/ai/prompts/resources/country-resource"},{"title":"City Resource","href":"/ai/prompts/resources/city-resource"},{"title":"Address Resource","href":"/ai/prompts/resources/address-resource"},{"title":"Product Resource","href":"/ai/prompts/resources/product-resource"},{"title":"Coupon Resource","href":"/ai/prompts/resources/coupon-resource"},{"title":"Image Resource","href":"/ai/prompts/resources/image-resource"}]}]}]},{"group":"Framework","icon":"layer-group","pages":[{"group":"The Basics","pages":[{"title":"Routing","href":"/basics/routing"},{"title":"Controller","href":"/components/controller"},{"title":"Middleware","href":"/components/middleware"},{"title":"Request","href":"/basics/request"},{"title":"Validation","href":"/basics/validation"},{"title":"Response","href":"/basics/response"},{"title":"Entity","href":"/components/entity"},{"title":"Database","href":"/components/database"},{"title":"Cache","href":"/components/cache"},{"title":"Exception","href":"/basics/exception"},{"title":"Logger","href":"/components/logger"}]},{"group":"Migrations","pages":[{"title":"Overview","href":"/migrations/overview"},{"title":"Writing migrations","href":"/migrations/writing"},{"title":"Running migrations","href":"/migrations/running"},{"title":"Rolling back","href":"/migrations/rollback"},{"title":"Caching","href":"/migrations/caching"}]},{"group":"Seeds","pages":[{"title":"Overview","href":"/seeds/overview"},{"title":"Writing seeds","href":"/seeds/writing"},{"title":"Running seeds","href":"/seeds/running"},{"title":"Caching","href":"/seeds/caching"}]},{"group":"Advanced","pages":[{"title":"Dependency Injection","href":"/advanced/dependency-injection"},{"title":"Event","href":"/components/event"},{"title":"Queue","href":"/components/queue"},{"title":"Cron","href":"/components/cron"},{"title":"Workflow","href":"/components/workflow"},{"title":"WebSockets","href":"/advanced/websockets"},{"title":"Translation","href":"/components/translation"},{"title":"Testing","href":"/advanced/testing"}]},{"group":"Security","pages":[{"title":"Auth","href":"/components/auth"},{"title":"JWT","href":"/security/jwt"},{"title":"Users","href":"/security/users"},{"title":"Roles","href":"/security/roles"},{"title":"CORS","href":"/security/cors"},{"title":"Permission","href":"/components/permission"}]},{"group":"Module","pages":[{"title":"Overview","href":"/module/overview"},{"title":"Structure","href":"/module/structure"},{"title":"Composition","href":"/module/composition"},{"title":"Create a module","href":"/module/create"},{"title":"Remove a module","href":"/module/remove"}]},{"group":"Microservice","pages":[{"title":"Overview","href":"/microservice/overview"},{"title":"Structure","href":"/microservice/structure"},{"title":"Composition","href":"/microservice/composition"},{"title":"Networking","href":"/microservice/networking"},{"title":"Create a microservice","href":"/microservice/create"},{"title":"Remove a microservice","href":"/microservice/remove"}]},{"group":"Design System","pages":[{"title":"Overview","href":"/design-system/overview"},{"title":"Structure","href":"/design-system/structure"},{"title":"Usage","href":"/design-system/usage"},{"title":"Create","href":"/design-system/create"},{"title":"Remove","href":"/design-system/remove"}]},{"group":"Single Page App","pages":[{"title":"Overview","href":"/spa/overview"},{"title":"Structure","href":"/spa/structure"},{"title":"Features","description":"Build a Single Page App as vertical slices — self-contained features that own their full front-end stack.","href":"/spa/features"},{"title":"Routing","href":"/spa/routing"},{"title":"Data Fetching","description":"Fetch and mutate backend data from the SPA with TanStack Query, where hooks are the only layer that talks to the backend.","href":"/spa/data-fetching"},{"title":"Internationalization","href":"/spa/internationalization"},{"title":"Create a spa","href":"/spa/create"},{"title":"Remove a spa","href":"/spa/remove"}]},{"group":"Components","pages":[{"title":"AI","href":"/components/ai"},{"title":"Analytics","href":"/components/analytics"},{"title":"Auth","href":"/components/auth"},{"title":"Cache","href":"/components/cache"},{"title":"Command","href":"/components/command"},{"title":"Controller","href":"/components/controller"},{"title":"Cron","href":"/components/cron"},{"title":"Database","href":"/components/database"},{"title":"Entity","href":"/components/entity"},{"title":"Event","href":"/components/event"},{"title":"Feature Flag","href":"/components/feature-flag"},{"title":"Logger","href":"/components/logger"},{"title":"Mailer","href":"/components/mailer"},{"title":"Middleware","href":"/components/middleware"},{"title":"Migrations","href":"/components/migrations"},{"title":"Permission","href":"/components/permission"},{"title":"Queue","href":"/components/queue"},{"title":"Rate Limit","href":"/components/rate-limit"},{"title":"Repository","href":"/components/repository"},{"title":"Service","href":"/components/service"},{"title":"Storage","href":"/components/storage"},{"title":"Translation","href":"/components/translation"},{"title":"Workflow","href":"/components/workflow"}]},{"group":"Utilities","pages":[{"title":"Color","href":"/utilities/color"},{"title":"CSV","href":"/utilities/csv"},{"title":"Currencies","href":"/utilities/currencies"},{"title":"Fetcher","href":"/utilities/fetcher"},{"title":"Country","href":"/utilities/country"},{"title":"File System","href":"/utilities/fs"},{"title":"Hour Utils","href":"/utilities/hour-utils"},{"title":"HTML","href":"/utilities/html"},{"title":"HTTP MIMEs","href":"/utilities/http-mimes"},{"title":"JSON","href":"/utilities/json"},{"title":"JWT","href":"/utilities/jwt"},{"title":"PDF","href":"/utilities/pdf"},{"title":"Types","href":"/utilities/types"},{"title":"URL","href":"/utilities/url"},{"title":"Utils","href":"/utilities/utils"},{"title":"Yaml","href":"/utilities/yml"},{"title":"YouTube","href":"/utilities/youtube"},{"title":"YouTube Utils","href":"/utilities/youtube-utils"}]},{"group":"Integrations","pages":[{"title":"Clerk","href":"/integrations/clerk"},{"title":"Linear","href":"/integrations/linear"},{"title":"Polar","href":"/integrations/polar"},{"title":"Stripe","href":"/integrations/stripe"},{"title":"Upstash Cache","href":"/integrations/upstash-cache"},{"title":"PostHog","href":"/integrations/posthog"},{"title":"Upstash Rate Limiter","href":"/integrations/upstash-rate-limiter"},{"title":"Bunny Storage","href":"/integrations/bunny-storage"},{"title":"Cloudflare Storage","href":"/integrations/cloudflare-storage"},{"title":"Terminal Logger","href":"/integrations/terminal-logger"},{"title":"Better Stack Logger","href":"/integrations/betterstack-logger"},{"title":"Better Stack Exceptions","href":"/integrations/betterstack-exception-logger"}]},{"group":"Deployment","pages":[{"title":"Deploy a spa","href":"/deployment/spa"},{"title":"Deploy a microservice","href":"/deployment/microservice"},{"title":"Deploy an API","href":"/deployment/api"},{"title":"Publish to npm","href":"/deployment/npm"},{"title":"Publish to Docker Hub","href":"/deployment/docker"}]}]},{"group":"Command Line","icon":"terminal","pages":[{"title":"Installation","href":"/cli/installation"},{"group":"Commands","pages":[{"title":"Commands","href":"/cli/commands/overview"},{"title":"add","href":"/cli/commands/add"},{"title":"admin:create","href":"/cli/commands/admin-create"},{"title":"admin:remove","href":"/cli/commands/admin-remove"},{"title":"agent:skills:create","href":"/cli/commands/agent-skills-create"},{"title":"ai:chat:create","href":"/cli/commands/ai-chat-create"},{"title":"ai:middleware:create","href":"/cli/commands/ai-middleware-create"},{"title":"ai:skill:create","href":"/cli/commands/ai-skill-create"},{"title":"ai:tool:create","href":"/cli/commands/ai-tool-create"},{"title":"analytics:create","href":"/cli/commands/analytics-create"},{"title":"app:create","href":"/cli/commands/app-create"},{"title":"app:init","href":"/cli/commands/app-init"},{"title":"app:start","href":"/cli/commands/app-start"},{"title":"app:stop","href":"/cli/commands/app-stop"},{"title":"build","href":"/cli/commands/build"},{"title":"cache:create","href":"/cli/commands/cache-create"},{"title":"check","href":"/cli/commands/check"},{"title":"command:create","href":"/cli/commands/command-create"},{"title":"command:run","href":"/cli/commands/command-run"},{"title":"commitlint:check","href":"/cli/commands/commitlint-check"},{"title":"commitlint:init","href":"/cli/commands/commitlint-init"},{"title":"completion:bash","href":"/cli/commands/completion-bash"},{"title":"completion:fish","href":"/cli/commands/completion-fish"},{"title":"completion:zsh","href":"/cli/commands/completion-zsh"},{"title":"controller:create","href":"/cli/commands/controller-create"},{"title":"coverage","href":"/cli/commands/coverage"},{"title":"credentials:create","href":"/cli/commands/credentials-create"},{"title":"cron:create","href":"/cli/commands/cron-create"},{"title":"database:create","href":"/cli/commands/database-create"},{"title":"design:create","href":"/cli/commands/design-create"},{"title":"design:remove","href":"/cli/commands/design-remove"},{"title":"docker:create","href":"/cli/commands/docker-create"},{"title":"docker:credentials:create","href":"/cli/commands/docker-credentials-create"},{"title":"docker:publish","href":"/cli/commands/docker-publish"},{"title":"e2e:create","href":"/cli/commands/e2e-create"},{"title":"e2e:run","href":"/cli/commands/e2e-run"},{"title":"entity:create","href":"/cli/commands/entity-create"},{"title":"event:create","href":"/cli/commands/event-create"},{"title":"flag:create","href":"/cli/commands/flag-create"},{"title":"fmt","href":"/cli/commands/fmt"},{"title":"help","href":"/cli/commands/help"},{"title":"install","href":"/cli/commands/install"},{"title":"issue:check","href":"/cli/commands/issue-check"},{"title":"issue:convert","href":"/cli/commands/issue-convert"},{"title":"issue:create","href":"/cli/commands/issue-create"},{"title":"issue:pull","href":"/cli/commands/issue-pull"},{"title":"issue:push","href":"/cli/commands/issue-push"},{"title":"lint","href":"/cli/commands/lint"},{"title":"logger:create","href":"/cli/commands/logger-create"},{"title":"mailer:create","href":"/cli/commands/mailer-create"},{"title":"marketing:create","href":"/cli/commands/marketing-create"},{"title":"microservice:create","href":"/cli/commands/microservice-create"},{"title":"microservice:remove","href":"/cli/commands/microservice-remove"},{"title":"middleware:create","href":"/cli/commands/middleware-create"},{"title":"migration:create","href":"/cli/commands/migration-create"},{"title":"migration:down","href":"/cli/commands/migration-down"},{"title":"migration:up","href":"/cli/commands/migration-up"},{"title":"module:create","href":"/cli/commands/module-create"},{"title":"module:remove","href":"/cli/commands/module-remove"},{"title":"npm:credentials:create","href":"/cli/commands/npm-credentials-create"},{"title":"npm:publish","href":"/cli/commands/npm-publish"},{"title":"permission:create","href":"/cli/commands/permission-create"},{"title":"project:check","href":"/cli/commands/project-check"},{"title":"queue:create","href":"/cli/commands/queue-create"},{"title":"rate-limit:create","href":"/cli/commands/rate-limit-create"},{"title":"react:component:create","href":"/cli/commands/react-component-create"},{"title":"release:create","href":"/cli/commands/release-create"},{"title":"repository:create","href":"/cli/commands/repository-create"},{"title":"run","href":"/cli/commands/run"},{"title":"sdk:create","href":"/cli/commands/sdk-create"},{"title":"security:check","href":"/cli/commands/security-check"},{"title":"seed:create","href":"/cli/commands/seed-create"},{"title":"seed:run","href":"/cli/commands/seed-run"},{"title":"service:create","href":"/cli/commands/service-create"},{"title":"spa:create","href":"/cli/commands/spa-create"},{"title":"spa:feature:create","href":"/cli/commands/spa-feature-create"},{"title":"spa:remove","href":"/cli/commands/spa-remove"},{"title":"storage:create","href":"/cli/commands/storage-create"},{"title":"storage:pull","href":"/cli/commands/storage-pull"},{"title":"storage:push","href":"/cli/commands/storage-push"},{"title":"storybook:create","href":"/cli/commands/storybook-create"},{"title":"storybook:remove","href":"/cli/commands/storybook-remove"},{"title":"swagger:create","href":"/cli/commands/swagger-create"},{"title":"swagger:remove","href":"/cli/commands/swagger-remove"},{"title":"test","href":"/cli/commands/test"},{"title":"translation:create","href":"/cli/commands/translation-create"},{"title":"update","href":"/cli/commands/update"},{"title":"upgrade","href":"/cli/commands/upgrade"},{"title":"vector-database:create","href":"/cli/commands/vector-database-create"},{"title":"version","href":"/cli/commands/version"},{"title":"workflow:create","href":"/cli/commands/workflow-create"},{"title":"workflow:transition:create","href":"/cli/commands/workflow-transition-create"},{"title":"workspace:check","href":"/cli/commands/workspace-check"},{"title":"workspace:run","href":"/cli/commands/workspace-run"}]}]}]},"basePath":"","title":"Routing - Talos","deploymentId":"dpl_4dgnk6TA5fUgboKHTvWWyeqm3idh","buildId":"dpl_4dgnk6TA5fUgboKHTvWWyeqm3idh","dynamics":[],"chunks":[]}