Skip to content
Source
Sign inSign up
TanStack/router

update solid start docs #5347

Mergedbrenelz(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/5347/headmerged by brenelz(GitHub profile, opens in a new tab)

Updating the Tanstack Start for Solid docs by copying them over and making changes. I also made tweaks to two pages in the react docs

I didn't end up previewing them with Tanstack.com as I was getting an error. I will try again here shortly

Summary by CodeRabbit

  • Documentation
    • Major overhaul of Solid framework docs: new/expanded guides for Getting Started, Build from Scratch, Routing, Server Functions/Routes, Selective SSR, Static Prerendering, Authentication, Environment Variables, Execution Model, Code Execution Patterns, Client Entry Point, Observability, Tailwind integration, plus examples, patterns, and production checklists.
    • React docs: updated path-alias guidance to reference Vite config and clarified server-route examples.
  • Style
    • Improved code block formatting for clarity in server-route docs.
    1. Walkthrough

      Large documentation migration: many React-targeted Start docs were rewritten or replaced with Solid-specific front matter and comprehensive Solid/TanStack Start guides; minor React docs update switching config references to vite.config.ts and small formatting tweaks. No runtime code changes.

      Changes

      Cohort / File(s)Summary
      Solid framework docs overhaul
      docs/start/framework/solid/*
      Replaces React remap front-matter with Solid-specific ids/titles and expands many pages into full Solid/TanStack Start guides (auth, build-from-scratch, client entry, execution patterns, env vars, execution model, getting started, hosting, observability, quick-start, routing, selective-SSR, server-functions mapping, server-routes, static-prerendering, tailwind-integration). Adds examples, patterns, and config snippets; documentation-only edits.
      React docs adjustments
      docs/start/framework/react/path-aliases.md, docs/start/framework/react/server-routes.md, docs/start/framework/react/fetching-external-api.md, docs/start/framework/react/reading-writing-file.md
      Swap references from app.config.ts to vite.config.ts and update example import to defineConfig from vite; reformat code fences in server-routes docs. No runtime changes.
      Server functions replacement map update
      docs/start/framework/solid/server-functions.md
      Extends replacement map to include @tanstack/react-router → @tanstack/solid-router alongside existing React→Solid mappings. Documentation-only change.

      Sequence Diagram(s)

      sequenceDiagram
        autonumber
        actor U as User
        participant C as Solid Client
        participant SF as Server Functions
        participant S as Session Store
        participant SR as Server Routes
      
        U->>C: submit login form
        C->>SF: serverFn.login(credentials)
        activate SF
        SF->>SF: validate credentials
        SF-->>S: set session cookie
        SF-->>C: return user
        deactivate SF
      
        C->>SR: request protected route (with cookie)
        SR->>S: read session
        alt authenticated
          SR-->>C: 200 + data
        else not authenticated
          SR-->>C: 302 redirect to /login
        end
      
        U->>C: click logout
        C->>SF: serverFn.logout()
        SF->>S: clear session
        SF-->>C: success

      Estimated code review effort

      🎯 4 (Complex) | ⏱️ ~60 minutes

      Suggested labels

      package: solid-start, package: react-start

      Suggested reviewers

      • schiller-manuel

      Poem

      Hop hop, docs pop—Solid’s pages bloom, I swapped old leaves, cleared every room. Routes and auth, cookies snug and neat, Tailwind stitches make the style complete. A carrot of docs—crisp, clear, and sweet. 🥕🐇

      Pre-merge checks and finishing touches

      ✅ Passed checks (3 passed)
      Check nameStatusExplanation
      Description Check✅ PassedCheck skipped - CodeRabbit's high-level summary is enabled.
      Title Check✅ PassedThe title clearly and concisely summarizes the primary change of updating the Solid Start documentation, which aligns with the bulk of the PR’s content and objectives.
      Docstring Coverage✅ PassedNo functions found in the changes. Docstring coverage check skipped.
      ✨ Finishing touches
      🧪 Generate unit tests
      • Create PR with unit tests
      • Post copyable unit tests in a comment

      📜 Recent review details

      Configuration used: CodeRabbit UI

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between 4393ed159431cbcb3ba0f204002b6813af1bfa99 and 33da42ae4f12b9e818a5e800a97c06abcacd2c10.

      📒 Files selected for processing (3)
      • docs/start/framework/react/fetching-external-api.md (1 hunks)
      • docs/start/framework/react/path-aliases.md (1 hunks)
      • docs/start/framework/react/reading-writing-file.md (1 hunks)
      ✅ Files skipped from review due to trivial changes (2)
      • docs/start/framework/react/reading-writing-file.md
      • docs/start/framework/react/fetching-external-api.md
      🧰 Additional context used
      📓 Path-based instructions (2)
      docs/**/*.{md,mdx}

      📄 CodeRabbit inference engine (AGENTS.md)

      Use internal docs links relative to the docs/ folder (e.g., ./guide/data-loading)

      Files:

      • docs/start/framework/react/path-aliases.md
      docs/{router,start}/**

      📄 CodeRabbit inference engine (AGENTS.md)

      Place router docs under docs/router/ and start framework docs under docs/start/

      Files:

      • docs/start/framework/react/path-aliases.md
      ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
      • GitHub Check: Preview

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands and usage tips.
    2. View your CI Pipeline Execution ↗ for commit 33da42ae4f12b9e818a5e800a97c06abcacd2c10

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded<1sView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded1sView ↗

      ☁️ Nx Cloud last updated this comment at 2025-10-03 01:48:40 UTC

    3. More templates

      @tanstack/arktype-adapter

      npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5347

      @tanstack/directive-functions-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5347

      @tanstack/eslint-plugin-router

      npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5347

      @tanstack/history

      npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5347

      @tanstack/nitro-v2-vite-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@5347

      @tanstack/react-router

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5347

      @tanstack/react-router-devtools

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5347

      @tanstack/react-router-ssr-query

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5347

      @tanstack/react-start

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5347

      @tanstack/react-start-client

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5347

      @tanstack/react-start-server

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5347

      @tanstack/router-cli

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5347

      @tanstack/router-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5347

      @tanstack/router-devtools

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5347

      @tanstack/router-devtools-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5347

      @tanstack/router-generator

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5347

      @tanstack/router-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5347

      @tanstack/router-ssr-query-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5347

      @tanstack/router-utils

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5347

      @tanstack/router-vite-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5347

      @tanstack/server-functions-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5347

      @tanstack/solid-router

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5347

      @tanstack/solid-router-devtools

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5347

      @tanstack/solid-start

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5347

      @tanstack/solid-start-client

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5347

      @tanstack/solid-start-server

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5347

      @tanstack/start-client-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5347

      @tanstack/start-plugin-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5347

      @tanstack/start-server-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5347

      @tanstack/start-static-server-functions

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@5347

      @tanstack/start-storage-context

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5347

      @tanstack/valibot-adapter

      npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5347

      @tanstack/virtual-file-routes

      npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5347

      @tanstack/zod-adapter

      npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5347

      commit: 33da42a

    4. Actionable comments posted: 13

      Caution

      Some comments are outside the diff and can’t be posted inline due to platform limitations.

      ⚠️ Outside diff range comments (1)
      docs/start/framework/react/server-routes.md (1)

      456-468: Restore the missing closing brace in the example.

      The server object isn’t closed anymore, so the example no longer parses. Please add the closing }, before the final }).

       export const Route = createFileRoute('/hello')({
         server: {
           handlers: {
             GET: async ({ request }) => {
               return new Response('Hello, World!', {
                 headers: {
                   'Content-Type': 'text/plain',
                 },
               })
             },
           },
      -  })
      +  },
      +})
      🧹 Nitpick comments (2)
      docs/start/framework/solid/quick-start.md (1)

      10-18: Label the shell snippets for markdownlint.

      MD040 is firing because these fences aren’t typed. Adding bash keeps lint green.

      -```
      +```bash
       pnpm create @tanstack/start@latest

      or

      - +bash npm create @tanstack/start@latest

      docs/start/framework/solid/server-routes.md (1)

      103-106: Swap the absolute docs link for a relative one.

      Docs convention prefers relative paths from docs/; the absolute /router/... link breaks that rule. As per coding guidelines.

      -You can read more about this in the [TanStack Router File-based Routing Guide](/router/latest/docs/framework/solid/routing/file-based-routing#s-or-s).
      +You can read more about this in the [TanStack Router File-based Routing Guide](../../../../router/framework/solid/routing/file-based-routing#s-or-s).
      📜 Review details

      Configuration used: CodeRabbit UI

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between ac35dd23822a0eb9f4f8835110d94b5f63c095b8 and 4393ed159431cbcb3ba0f204002b6813af1bfa99.

      📒 Files selected for processing (18)
      • docs/start/framework/react/path-aliases.md (1 hunks)
      • docs/start/framework/react/server-routes.md (3 hunks)
      • docs/start/framework/solid/authentication.md (1 hunks)
      • docs/start/framework/solid/build-from-scratch.md (1 hunks)
      • docs/start/framework/solid/client-entry-point.md (1 hunks)
      • docs/start/framework/solid/code-execution-patterns.md (1 hunks)
      • docs/start/framework/solid/environment-variables.md (1 hunks)
      • docs/start/framework/solid/execution-model.md (1 hunks)
      • docs/start/framework/solid/getting-started.md (1 hunks)
      • docs/start/framework/solid/hosting.md (1 hunks)
      • docs/start/framework/solid/observability.md (1 hunks)
      • docs/start/framework/solid/quick-start.md (1 hunks)
      • docs/start/framework/solid/routing.md (1 hunks)
      • docs/start/framework/solid/selective-ssr.md (1 hunks)
      • docs/start/framework/solid/server-functions.md (1 hunks)
      • docs/start/framework/solid/server-routes.md (1 hunks)
      • docs/start/framework/solid/static-prerendering.md (1 hunks)
      • docs/start/framework/solid/tailwind-integration.md (1 hunks)
      🧰 Additional context used
      📓 Path-based instructions (2)
      docs/**/*.{md,mdx}

      📄 CodeRabbit inference engine (AGENTS.md)

      Use internal docs links relative to the docs/ folder (e.g., ./guide/data-loading)

      Files:

      • docs/start/framework/solid/server-functions.md
      • docs/start/framework/solid/hosting.md
      • docs/start/framework/solid/routing.md
      • docs/start/framework/solid/selective-ssr.md
      • docs/start/framework/solid/client-entry-point.md
      • docs/start/framework/solid/observability.md
      • docs/start/framework/solid/quick-start.md
      • docs/start/framework/solid/execution-model.md
      • docs/start/framework/react/server-routes.md
      • docs/start/framework/solid/static-prerendering.md
      • docs/start/framework/solid/environment-variables.md
      • docs/start/framework/solid/getting-started.md
      • docs/start/framework/solid/code-execution-patterns.md
      • docs/start/framework/solid/tailwind-integration.md
      • docs/start/framework/solid/build-from-scratch.md
      • docs/start/framework/solid/server-routes.md
      • docs/start/framework/react/path-aliases.md
      • docs/start/framework/solid/authentication.md
      docs/{router,start}/**

      📄 CodeRabbit inference engine (AGENTS.md)

      Place router docs under docs/router/ and start framework docs under docs/start/

      Files:

      • docs/start/framework/solid/server-functions.md
      • docs/start/framework/solid/hosting.md
      • docs/start/framework/solid/routing.md
      • docs/start/framework/solid/selective-ssr.md
      • docs/start/framework/solid/client-entry-point.md
      • docs/start/framework/solid/observability.md
      • docs/start/framework/solid/quick-start.md
      • docs/start/framework/solid/execution-model.md
      • docs/start/framework/react/server-routes.md
      • docs/start/framework/solid/static-prerendering.md
      • docs/start/framework/solid/environment-variables.md
      • docs/start/framework/solid/getting-started.md
      • docs/start/framework/solid/code-execution-patterns.md
      • docs/start/framework/solid/tailwind-integration.md
      • docs/start/framework/solid/build-from-scratch.md
      • docs/start/framework/solid/server-routes.md
      • docs/start/framework/react/path-aliases.md
      • docs/start/framework/solid/authentication.md
      🧠 Learnings (3)
      📓 Common learnings
      Learnt from: CR
      PR: TanStack/router#0
      File: AGENTS.md:0-0
      Timestamp: 2025-09-23T17:36:12.598Z
      Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/
      📚 Learning: 2025-09-23T17:36:12.598Z
      Learnt from: CR
      PR: TanStack/router#0
      File: AGENTS.md:0-0
      Timestamp: 2025-09-23T17:36:12.598Z
      Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/

      Applied to files:

      • docs/start/framework/solid/server-functions.md
      📚 Learning: 2025-09-23T17:36:12.598Z
      Learnt from: CR
      PR: TanStack/router#0
      File: AGENTS.md:0-0
      Timestamp: 2025-09-23T17:36:12.598Z
      Learning: Applies to docs/{router,start}/** : Place router docs under docs/router/ and start framework docs under docs/start/

      Applied to files:

      • docs/start/framework/solid/routing.md
      🪛 markdownlint-cli2 (0.18.1)
      docs/start/framework/solid/hosting.md

      10-10: Fenced code blocks should have a language specified

      (MD040, fenced-code-language)


      16-16: Fenced code blocks should have a language specified

      (MD040, fenced-code-language)

      docs/start/framework/solid/quick-start.md

      10-10: Fenced code blocks should have a language specified

      (MD040, fenced-code-language)


      16-16: Fenced code blocks should have a language specified

      (MD040, fenced-code-language)

      docs/start/framework/solid/environment-variables.md

      94-94: Fenced code blocks should have a language specified

      (MD040, fenced-code-language)

      docs/start/framework/solid/build-from-scratch.md

      115-115: Fenced code blocks should have a language specified

      (MD040, fenced-code-language)

      ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
      • GitHub Check: Preview
      • GitHub Check: Test
      OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)
      docs/start/framework/solid/build-from-scratch.md lines 25 to 26
      @@ -21,0 +6,21 @@
      6+> [!NOTE]
      7+> If you chose to quick start with an example or cloned project, you can skip this guide and move on to the [Routing](../routing) guide.
      8+
      9+_So you want to build a TanStack Start project from scratch?_
      10+
      11+This guide will help you build a **very** basic TanStack Start web application. Together, we will use TanStack Start to:
      12+
      13+- Serve an index page
      14+- Display a counter
      15+- Increment the counter on the server and client
      16+
      17+Let's create a new project directory and initialize it.
      18+
      19+```shell
      20+mkdir myApp
      21+cd myApp
      22+npm init -y
      23+```
      24+
      25+> [!NOTE] > We use `npm` in all of these examples, but you can use your package manager of choice instead.
      26+

      ⚠️ Potential issue | 🟡 Minor

      Fix the malformed note block.

      > [!NOTE] > ... won’t render—split the label and content onto separate lines so the admonition shows up.

      -> [!NOTE] > We use `npm` in all of these examples, but you can use your package manager of choice instead.
      +> [!NOTE]
      +> We use `npm` in all of these examples, but you can use your package manager of choice instead.
      📝 Committable suggestion

      ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

      > [!NOTE]
      > We use `npm` in all of these examples, but you can use your package manager of choice instead.
      🤖 Prompt for AI Agents
      In docs/start/framework/solid/build-from-scratch.md around lines 25 to 26, the
      note admonition is malformed because the label and content are on the same line
      (`> [!NOTE] > ...`); split them so the label line contains only `> [!NOTE]` and
      the next line(s) contain the note content (e.g., `> We use npm ...`) to render
      the admonition correctly.
      docs/start/framework/solid/build-from-scratch.md lines 114 to 125
      @@ -21,0 +105,21 @@
      105+
      106+## Add the Basic Templating
      107+
      108+There are 2 required files for TanStack Start usage:
      109+
      110+1. The router configuration
      111+2. The root of your application
      112+
      113+Once configuration is done, we'll have a file tree that looks like the following:
      114+
      115+```
      116+.
      117+├── src/
      118+│ ├── routes/
      119+│ │ └── `__root.tsx`
      120+│ ├── `router.tsx`
      121+│ ├── `routeTree.gen.ts`
      122+├── `vite.config.ts`
      123+├── `package.json`
      124+└── `tsconfig.json`
      125+```

      ⚠️ Potential issue | 🟠 Major

      Add a language tag to the file-tree fence.

      markdownlint (MD040) fails because this fence lacks a language. Tag it (e.g. text) to unblock the pipeline. Based on static analysis hints.

      -```
      +```text
       .
       ├── src/
       │   ├── routes/
       │   │   └── `__root.tsx`
       │   ├── `router.tsx`
       │   ├── `routeTree.gen.ts`
       ├── `vite.config.ts`
       ├── `package.json`
       └── `tsconfig.json`
      🧰 Tools
      🪛 markdownlint-cli2 (0.18.1)

      115-115: Fenced code blocks should have a language specified

      (MD040, fenced-code-language)

      🤖 Prompt for AI Agents
      In docs/start/framework/solid/build-from-scratch.md around lines 114 to 125, the
      fenced code block showing the file tree lacks a language tag causing
      markdownlint MD040; update the opening fence to include a language identifier
      (for example change ``` to ```text) so the block reads as a text code fence,
      preserving the content exactly and leaving the closing ``` unchanged.
      docs/start/framework/solid/environment-variables.md lines 94 to 99
      @@ -5,0 +79,21 @@
      79+export function FeatureGatedComponent() {
      80+ const enableNewFeature = import.meta.env.VITE_ENABLE_NEW_FEATURE === 'true'
      81+
      82+ if (!enableNewFeature) return null
      83+
      84+ return <NewFeature />
      85+}
      86+```
      87+
      88+## Environment File Setup
      89+
      90+### File Hierarchy (Loaded in Order)
      91+
      92+TanStack Start automatically loads environment files in this order:
      93+
      94+```
      95+.env.local # Local overrides (add to .gitignore)
      96+.env.production # Production-specific variables
      97+.env.development # Development-specific variables
      98+.env # Default variables (commit to git)
      99+```

      ⚠️ Potential issue | 🟠 Major

      Label the file-tree fence.

      markdownlint (MD040) flags this unlabeled fence; add a language (e.g. text) so docs build cleanly. Based on static analysis hints.

      -```
      +```text
       .env.local          # Local overrides (add to .gitignore)
       .env.production     # Production-specific variables
       .env.development    # Development-specific variables
       .env                # Default variables (commit to git)
      🧰 Tools
      🪛 markdownlint-cli2 (0.18.1)

      94-94: Fenced code blocks should have a language specified

      (MD040, fenced-code-language)

      🤖 Prompt for AI Agents
      In docs/start/framework/solid/environment-variables.md around lines 94 to 99,
      the fenced code block lacks a language label which triggers markdownlint MD040;
      add a language identifier (e.g., text) immediately after the opening backticks
      so the fence is labeled and the docs build cleanly.
      docs/start/framework/solid/getting-started.md lines 10 to 13
      @@ -1,9 +1,13 @@
      11 ---
      2-ref: docs/start/framework/react/getting-started.md
      3-replace:
      4- {
      5- '@tanstack/react-start': '@tanstack/solid-start',
      6- 'React': 'SolidJS',
      7- 'react-router': 'solid-router',
      8- }
      2+id: getting-started
      3+title: Getting Started
      94 ---
      5+
      6+## Start a new project from scratch
      7+
      8+Choose one of the following options to start building a _new_ TanStack Start project:
      9+
      10+- [TanStack Start CLI] - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable
      11+- [TanStack Builder](#) (coming soon!) - A visual interface to configure new TanStack projects with a few clicks
      12+- [Quick Start Examples](../quick-start) Download or clone one of our official examples
      13+- [Build a project from scratch](../build-from-scratch) - A guide to building a TanStack Start project line-by-line, file-by-file.

      ⚠️ Potential issue | 🟡 Minor

      Add the missing CLI link.

      [TanStack Start CLI] renders as literal text because no href is attached. Give it a real target (e.g. docs or repo URL) so the callout works.

      -- [TanStack Start CLI] - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable
      +- [TanStack Start CLI](https://github.com/TanStack/router/tree/main/packages/create-tanstack-start) - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable
      📝 Committable suggestion

      ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

      - [TanStack Start CLI](https://github.com/TanStack/router/tree/main/packages/create-tanstack-start) - Just run `npm create @tanstack/start@latest`. Local, fast, and optionally customizable
      - [TanStack Builder](#) (coming soon!) - A visual interface to configure new TanStack projects with a few clicks
      - [Quick Start Examples](../quick-start) Download or clone one of our official examples
      - [Build a project from scratch](../build-from-scratch) - A guide to building a TanStack Start project line-by-line, file-by-file.
      🤖 Prompt for AI Agents
      In docs/start/framework/solid/getting-started.md around lines 10 to 13 the
      `[TanStack Start CLI]` text has no href so it renders as literal; update that
      markdown to include a proper link target (for example the CLI docs or the repo
      URL) by turning the bracketed text into a linked form with the chosen URL and
      ensure the link follows the same style as the other entries so the callout
      renders correctly.
      docs/start/framework/solid/hosting.md lines 197 to 205
      @@ -5,0 +185,21 @@
      185+
      186+```
      187+ "nitro": "npm:nitro-nightly",
      188+```
      189+
      190+```tsx
      191+import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
      192+import { defineConfig } from 'vite'
      193+import viteSolid from 'vite-plugin-solid'
      194+import { nitro } from 'nitro/vite'
      195+
      196+export default defineConfig({
      197+ plugins: [
      198+ tanstackStart(),
      199+ nitro(/*
      200+ // nitro config goes here, e.g.
      201+ { config: { preset: 'node-server' } }
      202+ */)
      203+ viteSolid({ssr: true}),
      204+ ],
      205+})

      ⚠️ Potential issue | 🟠 Major

      Add the comma after nitro(...).

      Without the trailing comma the array literal breaks; viteSolid becomes part of the comment and the config fails to compile.

         plugins: [
           tanstackStart(),
      -    nitro(/*
      +    nitro(/*
             // nitro config goes here, e.g.
             { config: { preset: 'node-server' } }
      -    */)
      -   viteSolid({ssr: true}),
      +    */),
      +    viteSolid({ ssr: true }),
         ],
      📝 Committable suggestion

      ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

        plugins: [
          tanstackStart(),
          nitro(/*
            // nitro config goes here, e.g.
            { config: { preset: 'node-server' } }
          */),
          viteSolid({ ssr: true }),
        ],
      })
      🤖 Prompt for AI Agents
      In docs/start/framework/solid/hosting.md around lines 197 to 205, the plugins
      array is missing a trailing comma after the nitro(...) entry causing the
      subsequent viteSolid({ssr: true}) line to be treated as part of the block
      comment and the config to fail; add a comma immediately after the closing
      parenthesis of nitro(...) so the array entries are properly separated and the
      comment no longer swallows the next plugin.
      docs/start/framework/solid/hosting.md lines 251 to 255
      @@ -5,0 +235,21 @@
      235+
      236+### Bun
      237+
      238+Follow the [`Nitro`](#nitro) deployment instructions.
      239+Depending on how you invoke the build, you might need to set the `'bun'` preset in the Nitro configuration:
      240+
      241+```ts
      242+// vite.config.ts
      243+import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
      244+import { defineConfig } from 'vite'
      245+import viteSolid from 'vite-plugin-solid'
      246+import { nitroV2Plugin } from '@tanstack/nitro-v2-vite-plugin'
      247+// alternatively: import { nitro } from 'nitro/vite'
      248+
      249+export default defineConfig({
      250+ plugins: [
      251+ tanstackStart(),
      252+ nitroV2Plugin({ preset: 'bun' })
      253+ // alternatively: nitro( { config: { preset: 'bun' }} ),
      254+ viteSolid({ssr: true}),
      255+ ],

      ⚠️ Potential issue | 🟠 Major

      Also fix the Bun example’s plugin array.

      Same problem here: missing comma leaves the array malformed.

         plugins: [
           tanstackStart(),
      -    nitroV2Plugin({ preset: 'bun' })
      -    // alternatively: nitro( { config: { preset: 'bun' }} ),
      -   viteSolid({ssr: true}),
      +    nitroV2Plugin({ preset: 'bun' }),
      +    // alternatively: nitro( { config: { preset: 'bun' }} ),
      +    viteSolid({ ssr: true }),
         ],
      📝 Committable suggestion

      ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

         plugins: [
           tanstackStart(),
           nitroV2Plugin({ preset: 'bun' }),
           // alternatively: nitro( { config: { preset: 'bun' }} ),
           viteSolid({ ssr: true }),
         ],
      🤖 Prompt for AI Agents
      In docs/start/framework/solid/hosting.md around lines 251 to 255 the plugins
      array is malformed because a comma is missing after nitroV2Plugin({ preset:
      'bun' }), causing the following viteSolid({ssr: true}) entry to be concatenated;
      add a trailing comma after the nitroV2Plugin(...) line so each array element is
      properly separated and the plugins array is valid.
      docs/start/framework/solid/observability.md lines 100 to 135
      @@ -5,0 +115,21 @@
      115+ } catch (error) {
      116+ const duration = Date.now() - startTime
      117+ console.error(
      118+ `[${timestamp}] ${request.method} ${request.url} - Error (${duration}ms):`,
      119+ error,
      120+ )
      121+ throw error
      122+ }
      123+})
      124+
      125+// Apply to all server routes
      126+export const Route = createFileRoute('/api/users')({
      127+ server: {
      128+ middleware: [requestLogger],
      129+ handlers: {
      130+ GET: async () => {
      131+ return json({ users: await getUsers() })
      132+ },
      133+ },
      134+ },
      135+})

      ⚠️ Potential issue | 🟠 Major

      Destructure request in the middleware example.

      request isn’t defined in this scope; destructure it from the handler args so the snippet actually works.

      -const requestLogger = createMiddleware().handler(async ({ next }) => {
      +const requestLogger = createMiddleware().handler(async ({ next, request }) => {
         const startTime = Date.now()
         const timestamp = new Date().toISOString()
      📝 Committable suggestion

      ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

      const requestLogger = createMiddleware().handler(async ({ next, request }) => {
        const startTime = Date.now()
        const timestamp = new Date().toISOString()
      
        console.log(`[${timestamp}] ${request.method} ${request.url} - Starting`)
      
        try {
          const response = await next()
          const duration = Date.now() - startTime
      
          console.log(
            `[${timestamp}] ${request.method} ${request.url} - ${response.status} (${duration}ms)`,
          )
      
          return response
        } catch (error) {
          const duration = Date.now() - startTime
          console.error(
            `[${timestamp}] ${request.method} ${request.url} - Error (${duration}ms):`,
            error,
          )
          throw error
        }
      })
      
      // Apply to all server routes
      export const Route = createFileRoute('/api/users')({
        server: {
          middleware: [requestLogger],
          handlers: {
            GET: async () => {
              return json({ users: await getUsers() })
            },
          },
        },
      })
      🤖 Prompt for AI Agents
      In docs/start/framework/solid/observability.md around lines 100 to 135, the
      middleware example references request but never destructures it from the handler
      args; update the handler signature to destructure request (e.g., change the
      async handler param from ({ next }) to ({ request, next })) so that
      request.method and request.url refer to the incoming request, and keep the rest
      of the logging logic unchanged.
      docs/start/framework/solid/observability.md lines 169 to 176
      @@ -5,0 +156,21 @@
      156+ }
      157+
      158+ return data
      159+ } catch (error) {
      160+ const duration = Date.now() - startTime
      161+ console.error(`[LOADER] Dashboard error after ${duration}ms:`, error)
      162+ throw error
      163+ }
      164+ },
      165+ component: Dashboard,
      166+})
      167+
      168+function Dashboard() {
      169+ const data = Route.useLoaderData()
      170+
      171+ // Track client-side render time
      172+ Solid.createEffect(() => {
      173+ const renderTime = performance.now()
      174+ console.log(`[CLIENT] Dashboard rendered in ${renderTime}ms`)
      175+ })
      176+

      ⚠️ Potential issue | 🟠 Major

      Import and use createEffect directly.

      Solid.createEffect will throw because Solid isn’t defined. Import createEffect (or namespace Solid) before using it.

      -import { createFileRoute } from '@tanstack/solid-router'
      +import { createFileRoute } from '@tanstack/solid-router'
      +import { createEffect } from 'solid-js'
       ...
      -  Solid.createEffect(() => {
      +  createEffect(() => {
      📝 Committable suggestion

      ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

      import { createFileRoute } from '@tanstack/solid-router'
      import { createEffect } from 'solid-js'
      
        const data = Route.useLoaderData()
      
        // Track client-side render time
        createEffect(() => {
          const renderTime = performance.now()
          console.log(`[CLIENT] Dashboard rendered in ${renderTime}ms`)
        })
      🤖 Prompt for AI Agents
      In docs/start/framework/solid/observability.md around lines 169 to 176, the code
      calls Solid.createEffect but the Solid namespace isn't defined; import
      createEffect from "solid-js" (or import * as Solid and use Solid.createEffect)
      at the top of the file and replace Solid.createEffect(...) with
      createEffect(...) (or keep Solid.createEffect if you choose the namespace
      import) so the effect call resolves correctly.
      docs/start/framework/solid/routing.md lines 71 to 115
      @@ -9,0 +95,21 @@
      95+ component: RootComponent,
      96+})
      97+
      98+function RootComponent() {
      99+ return (
      100+ <RootDocument>
      101+ <Outlet />
      102+ </RootDocument>
      103+ )
      104+}
      105+
      106+function RootDocument({ children }: Readonly<{ children: Solid.JSX.Element }>) {
      107+ return (
      108+ <>
      109+ <HeadContent />
      110+ {children}
      111+ <Scripts />
      112+ </>
      113+ )
      114+}
      115+```

      ⚠️ Potential issue | 🟠 Major

      Fix the Solid import/type usage in the root-route snippet.

      import type { solidNode } from 'solid' doesn’t exist, and Solid is undefined when you reference Solid.JSX.Element. Import JSX from solid-js (or namespace Solid) and update the type to keep the sample compilable.

      -import {
      -  Outlet,
      -  createRootRoute,
      -  HeadContent,
      -  Scripts,
      -} from '@tanstack/solid-router'
      -import type { solidNode } from 'solid'
      +import {
      +  Outlet,
      +  createRootRoute,
      +  HeadContent,
      +  Scripts,
      +} from '@tanstack/solid-router'
      +import type { JSX } from 'solid-js'
       ...
      -function RootDocument({ children }: Readonly<{ children: Solid.JSX.Element }>) {
      +function RootDocument({ children }: Readonly<{ children: JSX.Element }>) {
      📝 Committable suggestion

      ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

      // src/routes/__root.tsx
      import {
        Outlet,
        createRootRoute,
        HeadContent,
        Scripts,
      } from '@tanstack/solid-router'
      import type { JSX } from 'solid-js'
      
      export const Route = createRootRoute({
        head: () => ({
          meta: [
            {
              charSet: 'utf-8',
            },
            {
              name: 'viewport',
              content: 'width=device-width, initial-scale=1',
            },
            {
              title: 'TanStack Start Starter',
            },
          ],
        }),
        component: RootComponent,
      })
      
      function RootComponent() {
        return (
          <RootDocument>
            <Outlet />
          </RootDocument>
        )
      }
      
      function RootDocument({ children }: Readonly<{ children: JSX.Element }>) {
        return (
          <>
            <HeadContent />
            {children}
            <Scripts />
          </>
        )
      }
      🤖 Prompt for AI Agents
      In docs/start/framework/solid/routing.md around lines 71 to 115, the snippet
      incorrectly imports and references Solid types: `import type { solidNode } from
      'solid'` and uses `Solid.JSX.Element`, which don't exist; replace that import
      with a proper JSX type import (e.g., `import type { JSX } from 'solid-js'`) and
      update the component prop type to `children: JSX.Element` (or alternatively
      import the namespace `* as Solid from 'solid-js'` and keep `Solid.JSX.Element`)
      so the example compiles.
      docs/start/framework/solid/routing.md lines 156 to 159
      @@ -9,0 +139,21 @@
      139+```
      140+src/
      141+├── routeTree.gen.ts <-- The generated route tree file
      142+```
      143+
      144+This file is automatically generated when you run TanStack Start (via `npm run dev` or `npm run start`). This file contains the generated route tree and a handful of TS utilities that make TanStack Start's type-safety extremely fast and fully inferred.
      145+
      146+**You may gitignore this file, since it is a build artifact.**
      147+
      148+## Nested Routing
      149+
      150+TanStack Router uses nested routing to match the URL with the correct component tree to render.
      151+
      152+For example, given the following routes:
      153+
      154+```
      155+routes/
      156+├── __root.tsx <-- Renders the <Root> component
      157+├── posts.tsx <-- Renders the <Posts> component
      158+├── posts.$postId.tsx <-- Renders the <Post> component
      159+```

      ⚠️ Potential issue | 🟡 Minor

      Correct the dynamic route filename.

      The example shows posts.$postId.tsx, but the actual file should live at posts/$postId.tsx. Update the tree so newcomers don’t create the wrong file.

      -├── posts.$postId.tsx <-- Renders the <Post> component
      +├── posts/$postId.tsx <-- Renders the <Post> component
      📝 Committable suggestion

      ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

      ├── __root.tsx <-- Renders the <Root> component
      ├── posts.tsx    <-- Renders the <Posts> component
      ├── posts/$postId.tsx    <-- Renders the <Post> component
      🤖 Prompt for AI Agents
      In docs/start/framework/solid/routing.md around lines 156 to 159, the route
      example shows an incorrect filename `posts.$postId.tsx`; update the tree to use
      the correct dynamic route path `posts/$postId.tsx` (i.e., change the dotted
      filename to a directory with a dollar-prefixed file) so the example reflects the
      actual filesystem layout newcomers must create.
      docs/start/framework/solid/server-routes.md lines 454 to 468
      @@ -5,0 +448,21 @@
      448+
      449+Sometimes you may need to set headers in the response. You can do this by either:
      450+
      451+- Passing an object as the second argument to the `Response` constructor.
      452+
      453+ ```ts
      454+ // routes/hello.ts
      455+ import { createFileRoute } from '@tanstack/solid-router'
      456+ export const Route = createFileRoute('/hello')({
      457+ server: {
      458+ handlers: {
      459+ GET: async ({ request }) => {
      460+ return new Response('Hello, World!', {
      461+ headers: {
      462+ 'Content-Type': 'text/plain',
      463+ },
      464+ })
      465+ },
      466+ },
      467+ })
      468+ // Visit /hello to see the response

      ⚠️ Potential issue | 🟠 Major

      Close the server block in this snippet.

      The example lost its }, so it won’t compile when copied. Please restore the brace before }).

       export const Route = createFileRoute('/hello')({
         server: {
           handlers: {
             GET: async ({ request }) => {
               return new Response('Hello, World!', {
                 headers: {
                   'Content-Type': 'text/plain',
                 },
               })
             },
           },
      -  })
      +  },
      +})
      📝 Committable suggestion

      ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

        // routes/hello.ts
        import { createFileRoute } from '@tanstack/solid-router'
        export const Route = createFileRoute('/hello')({
          server: {
            handlers: {
              GET: async ({ request }) => {
                return new Response('Hello, World!', {
                  headers: {
                    'Content-Type': 'text/plain',
                  },
                })
              },
            },
          },
        })
        // Visit /hello to see the response
      🤖 Prompt for AI Agents
      In docs/start/framework/solid/server-routes.md around lines 454 to 468, the
      example is missing the closing brace and comma for the server block before the
      final }) call; restore the server block closure by adding the missing `},`
      immediately before the `})` so the object literal is properly closed and the
      snippet compiles.
      docs/start/framework/solid/static-prerendering.md lines 18 to 59
      @@ -5,0 +39,21 @@
      39+
      40+ // Delay between retries in milliseconds
      41+ retryDelay: 1000,
      42+
      43+ // Callback when page is successfully rendered
      44+ onSuccess: ({ page }) => {
      45+ console.log(`Rendered ${page.path}!`)
      46+ },
      47+ },
      48+ // Optional configuration for specific pages (without this it will still automatically
      49+ // prerender all routes)
      50+ pages: [
      51+ {
      52+ path: '/my-page',
      53+ prerender: { enabled: true, outputPath: '/my-page/index.html' },
      54+ },
      55+ ],
      56+ }),
      57+ viteSolid({ ssr: true }),
      58+ ],
      59+})

      ⚠️ Potential issue | 🟠 Major

      Add the missing defineConfig import.

      The snippet calls defineConfig(...) but never imports it from vite, so copying this into vite.config.ts fails. Please add import { defineConfig } from 'vite' above the plugin imports.

      🤖 Prompt for AI Agents
      In docs/start/framework/solid/static-prerendering.md around lines 18 to 59, the
      example calls defineConfig(...) but never imports it; add an import statement
      for defineConfig from 'vite' at the top of the snippet (e.g., import {
      defineConfig } from 'vite') so the example compiles when copied into a
      vite.config.ts file.
    5. birkskyum(GitHub profile, opens in a new tab) approved these changes

Sign in to join this conversation.