Skip to content
Source
Sign inSign up
TanStack/router

docs(solid-start): nitro vite plugin example #5577

Mergedbirkskyum(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/5577/headmerged by birkskyum(GitHub profile, opens in a new tab)

Summary by CodeRabbit

  • New Features

    • Added a new Solid Start example project with Nitro backend integration
    • Includes comprehensive routing with nested layouts, dynamic routes, and API endpoints
    • Features error handling, deferred data loading, and request middleware patterns
    • Configured with TypeScript, Tailwind CSS, and development utilities
  • Chores

    • Removed wrangler dependency from existing Netlify example
    1. Walkthrough

      This PR adds a comprehensive Solid Start + Nitro example project with file-based routing, error handling components, API routes, utilities, and full build configuration. It also updates documentation configuration and removes the wrangler dependency from an existing example.

      Changes

      Cohort / File(s)Summary
      Documentation & Configuration
      docs/start/config.json, examples/solid/start-basic-netlify/package.json
      Added new example entry for Nitro Vite Plugin in config; removed wrangler devDependency from Netlify example.
      Build & Tooling Configuration
      examples/solid/start-basic-nitro/vite.config.ts, examples/solid/start-basic-nitro/tailwind.config.mjs, examples/solid/start-basic-nitro/tsconfig.json, examples/solid/start-basic-nitro/postcss.config.mjs, examples/solid/start-basic-nitro/package.json
      Added Vite config with Solid Start, Nitro, and plugin stack; Tailwind and PostCSS configurations; TypeScript config with strict mode and path aliases; npm package.json with scripts and dependencies.
      IDE & Development Files
      examples/solid/start-basic-nitro/.gitignore, examples/solid/start-basic-nitro/.prettierignore, examples/solid/start-basic-nitro/.vscode/settings.json, examples/solid/start-basic-nitro/README.md, examples/solid/start-basic-nitro/public/site.webmanifest
      Added standard ignore patterns, VSCode settings, documentation, and web app manifest.
      Router Setup
      examples/solid/start-basic-nitro/src/router.tsx, examples/solid/start-basic-nitro/src/routeTree.gen.ts
      Exported getRouter factory with catch boundaries and not-found handling; generated comprehensive route tree with route interfaces, augmentations, and route compositions.
      Layout & Root Routes
      examples/solid/start-basic-nitro/src/routes/__root.tsx, examples/solid/start-basic-nitro/src/routes/_pathlessLayout.tsx, examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout.tsx, examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-[a-b].tsx
      Defined root document shell with head metadata and navigation; added pathless and nested layouts with outlet composition.
      Error & Exception Components
      examples/solid/start-basic-nitro/src/components/DefaultCatchBoundary.tsx, examples/solid/start-basic-nitro/src/components/NotFound.tsx, examples/solid/start-basic-nitro/src/components/PostError.tsx, examples/solid/start-basic-nitro/src/components/UserError.tsx
      Added error boundary, 404, and error wrapper components with router integration and history/navigation actions.
      Page Routes
      examples/solid/start-basic-nitro/src/routes/index.tsx, examples/solid/start-basic-nitro/src/routes/posts.tsx, examples/solid/start-basic-nitro/src/routes/posts.index.tsx, examples/solid/start-basic-nitro/src/routes/posts.$postId.tsx, examples/solid/start-basic-nitro/src/routes/posts_.$postId.deep.tsx, examples/solid/start-basic-nitro/src/routes/users.tsx, examples/solid/start-basic-nitro/src/routes/users.index.tsx, examples/solid/start-basic-nitro/src/routes/users.$userId.tsx, examples/solid/start-basic-nitro/src/routes/redirect.tsx, examples/solid/start-basic-nitro/src/routes/deferred.tsx
      Implemented file-based routes with loaders, data fetching, navigation, and deferred rendering for home, posts, users, redirect, and deferred patterns.
      API Routes
      examples/solid/start-basic-nitro/src/routes/api/users.ts, examples/solid/start-basic-nitro/src/routes/api/users.$userId.ts, examples/solid/start-basic-nitro/src/routes/customScript[.]js.ts
      Added server-side API routes with middleware chains, external data fetching, error handling, and custom script serving.
      Utilities
      examples/solid/start-basic-nitro/src/utils/posts.tsx, examples/solid/start-basic-nitro/src/utils/users.tsx, examples/solid/start-basic-nitro/src/utils/seo.ts, examples/solid/start-basic-nitro/src/utils/loggingMiddleware.tsx
      Exported server functions, types, and middleware for data fetching (posts/users), SEO meta generation, and request/response timing logging.
      Styling
      examples/solid/start-basic-nitro/src/styles/app.css
      Added Tailwind CSS directives with light/dark theme base styles and utility layers.

      Estimated code review effort

      🎯 3 (Moderate) | ⏱️ ~35 minutes

      The PR introduces 50+ files, but the majority follow homogeneous patterns (route files, configuration boilerplate). Review effort centers on verifying correct project structure, standard patterns in route setup, API middleware configuration, and build tooling. Some API routes and middleware logic add moderate complexity, but the overall scaffolding nature of the changes limits the depth of reasoning required per file.

      • TanStack/router#5575 — Adds a near-identical parallel Solid Start example (start-basic-netlify) with the same route structure, components, utilities, and configuration patterns.
      • TanStack/router#5567 — Introduces another Solid Start example variant (start-basic-cloudflare) with matching file-based routes, error components, and shared utility patterns.
      • TanStack/router#5260 — Adds parallel example scaffolding with identical routeTree generation, getRouter factory, and DefaultCatchBoundary/NotFound component structure.

      Suggested reviewers

      • schiller-manuel
      • brenelz

      Poem

      🐰 Hops with glee through routes so neat, Nitro engines meet Solid's beat, Layouts nested, errors caught with care, A Start example, fresh and rare! With middleware chains that log and sing, This scaffold makes the server's bells ring! 🎉

      Pre-merge checks and finishing touches

      ❌ Failed checks (1 warning)
      Check nameStatusExplanationResolution
      Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
      ✅ Passed checks (2 passed)
      Check nameStatusExplanation
      Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title Check✅ PassedThe pull request title "docs(solid-start): nitro vite plugin example" accurately reflects the primary change in the changeset. The raw summary indicates that the PR adds a comprehensive new example project at examples/solid/start-basic-nitro/ demonstrating Solid Start with Nitro Vite Plugin integration, and updates docs/start/config.json to register this example. The title is concise, uses appropriate conventional commit formatting ("docs" for documentation), and clearly communicates that this is documentation for a Solid Start nitro vite plugin example. The title is sufficiently specific that a developer scanning the repository history would understand the purpose without requiring additional context.
      ✨ Finishing touches
      • 📝 Generate docstrings
        🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Post copyable unit tests in a comment
      • Commit unit tests in branch `docs(solid-start)--nitro-vite-plugin-example`

      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 da3b7cadc4bd378397a698ff9debb1af433aeef6

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded6m 23sView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded1m 38sView ↗

      ☁️ Nx Cloud last updated this comment at 2025-10-21 22:41:19 UTC

    3. brenelz(GitHub profile, opens in a new tab) approved these changes

    4. More templates

      @tanstack/arktype-adapter

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

      @tanstack/directive-functions-plugin

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

      @tanstack/eslint-plugin-router

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

      @tanstack/history

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

      @tanstack/nitro-v2-vite-plugin

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

      @tanstack/react-router

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

      @tanstack/react-router-devtools

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

      @tanstack/react-router-ssr-query

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

      @tanstack/react-start

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

      @tanstack/react-start-client

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

      @tanstack/react-start-server

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

      @tanstack/router-cli

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

      @tanstack/router-core

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

      @tanstack/router-devtools

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

      @tanstack/router-devtools-core

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

      @tanstack/router-generator

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

      @tanstack/router-plugin

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

      @tanstack/router-ssr-query-core

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

      @tanstack/router-utils

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

      @tanstack/router-vite-plugin

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

      @tanstack/server-functions-plugin

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

      @tanstack/solid-router

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

      @tanstack/solid-router-devtools

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

      @tanstack/solid-router-ssr-query

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

      @tanstack/solid-start

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

      @tanstack/solid-start-client

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

      @tanstack/solid-start-server

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

      @tanstack/start-client-core

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

      @tanstack/start-plugin-core

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

      @tanstack/start-server-core

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

      @tanstack/start-static-server-functions

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

      @tanstack/start-storage-context

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

      @tanstack/valibot-adapter

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

      @tanstack/virtual-file-routes

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

      @tanstack/zod-adapter

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

      commit: da3b7ca

    5. Actionable comments posted: 12

      Caution

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

      ⚠️ Outside diff range comments (1)
      examples/solid/start-basic-netlify/package.json (1)

      12-14: Use workspace:* protocol for internal dependencies.

      The internal TanStack dependencies should use the workspace:* protocol instead of caret ranges. This ensures the example always uses the latest local version during development.

      As per coding guidelines

      Apply this diff:

      -    "@tanstack/solid-router": "^1.133.20",
      -    "@tanstack/solid-router-devtools": "^1.133.20",
      -    "@tanstack/solid-start": "^1.133.20",
      +    "@tanstack/solid-router": "workspace:*",
      +    "@tanstack/solid-router-devtools": "workspace:*",
      +    "@tanstack/solid-start": "workspace:*",
      🧹 Nitpick comments (21)
      examples/solid/start-basic-nitro/src/utils/seo.ts (2)

      1-11: Add explicit return type annotation for better type safety.

      The function lacks an explicit return type. Adding one improves clarity and catches potential mistakes.

      Apply this diff:

       export const seo = ({
         title,
         description,
         keywords,
         image,
       }: {
         title: string
         description?: string
         image?: string
         keywords?: string
      -}) => {
      +}): Array<{ title?: string; name?: string; content?: string }> => {

      26-26: Consider setting a default Twitter card type.

      Twitter card metadata (title, description) is set unconditionally, but twitter:card type is only set when an image exists. Consider specifying a default card type (e.g., summary) when no image is provided for consistency.

      Example adjustment:

           { name: 'twitter:title', content: title },
           ...(description ? [{ name: 'twitter:description', content: description }] : []),
           { name: 'twitter:creator', content: '@tannerlinsley' },
           { name: 'twitter:site', content: '@tannerlinsley' },
      +    { name: 'twitter:card', content: image ? 'summary_large_image' : 'summary' },
           { name: 'og:type', content: 'website' },
           { name: 'og:title', content: title },
           ...(description ? [{ name: 'og:description', content: description }] : []),
           ...(image
             ? [
                 { name: 'twitter:image', content: image },
      -          { name: 'twitter:card', content: 'summary_large_image' },
                 { property: 'og:image', content: image },
               ]
             : []),
      examples/solid/start-basic-nitro/src/components/UserError.tsx (1)

      4-6: Consider using ErrorComponent directly if no customization is needed.

      This wrapper adds no additional functionality beyond passing through the error prop. Unless you plan to customize the error display for user routes, you could use ErrorComponent directly in the route configuration.

      If customization is needed, consider adding it now or adding a comment explaining the wrapper's purpose.

      examples/solid/start-basic-nitro/src/components/NotFound.tsx (2)

      3-3: Use more specific type for children prop.

      The any type reduces type safety. Consider using JSX.Element or a more specific type for the children prop.

      Apply this diff:

      -export function NotFound({ children }: { children?: any }) {
      +export function NotFound({ children }: { children?: JSX.Element }) {

      3-25: Consider extracting shared NotFound component.

      This component is duplicated across multiple examples (start-basic-solid-query, start-basic-cloudflare, and now start-basic-nitro). While keeping examples self-contained has benefits, a shared component in a common location would reduce maintenance burden.

      If you prefer to keep examples self-contained, this duplication is acceptable. Otherwise, consider creating a shared component that can be imported across examples.

      examples/solid/start-basic-nitro/public/site.webmanifest (1)

      2-3: Fill manifest metadata and add start_url/scope.

      Empty name/short_name hurts install UX; adding start_url/scope improves PWA behavior.

      -  "name": "",
      -  "short_name": "",
      +  "name": "TanStack Solid Start (Nitro) Example",
      +  "short_name": "SolidStart",
      +  "start_url": "/",
      +  "scope": "/",

      Optionally add "description" and a maskable icon purpose.

      Also applies to: 16-18

      examples/solid/start-basic-nitro/tailwind.config.mjs (1)

      1-4: Widen content scan and opt into class-based dark mode.

      Catches classes in index.html and standardizes dark mode behavior.

       /** @type {import('tailwindcss').Config} */
       export default {
      -  content: ['./src/**/*.{js,jsx,ts,tsx}'],
      +  darkMode: 'class',
      +  content: ['./index.html', './src/**/*.{js,jsx,ts,tsx}'],
       }
      examples/solid/start-basic-nitro/package.json (1)

      1-10: Declare Node engine (Nitro requires modern Node).

      Locks CI/dev to a compatible runtime.

       {
         "name": "tanstack-solid-start-example-basic-nitro",
         "private": true,
         "sideEffects": false,
         "type": "module",
      +  "engines": {
      +    "node": ">=18.17"
      +  },
         "scripts": {
           "dev": "vite dev",
           "build": "vite build && tsc --noEmit",
           "preview": "vite preview"
         },

      Also applies to: 17-27

      examples/solid/start-basic-nitro/vite.config.ts (1)

      8-10: Make dev port configurable.

      Avoid clashes when multiple examples run.

       export default defineConfig({
         server: {
      -    port: 3000,
      +    port: Number(process.env.PORT) || 3000,
         },
      examples/solid/start-basic-nitro/src/routes/api/users.ts (1)

      1-64: Optional: move API base URL to a constant/env.

      Eases swapping the upstream and documenting example intent.

      const USERS_API = 'https://jsonplaceholder.typicode.com/users'

      Use USERS_API in both list and $userId routes for consistency.

      examples/solid/start-basic-nitro/src/utils/posts.tsx (1)

      27-27: Consider validating API responses at runtime.

      The type assertions as PostType and as Array<PostType> assume the external API returns the expected shape. If the API changes, this could lead to runtime errors downstream.

      Consider adding runtime validation using a library like Zod or Valibot to ensure type safety:

      import { z } from 'zod'
      
      const PostSchema = z.object({
        id: z.number(),
        title: z.string(),
        body: z.string(),
      })
      
      // In fetchPost handler:
      const post = PostSchema.parse(await res.json())
      return post

      Also applies to: 39-39

      examples/solid/start-basic-nitro/README.md (1)

      23-27: Consider clarifying deployment options.

      While Nitro supports multiple deployment targets including Netlify, the current documentation only mentions Netlify deployment. Consider adding context about Nitro's multi-platform support or documenting other deployment options.

      examples/solid/start-basic-nitro/src/router.tsx (1)

      6-16: Add an explicit return type for strict TS.

      Improves API clarity and satisfies strict mode.

      As per coding guidelines

      -export function getRouter() {
      +export function getRouter(): ReturnType<typeof createRouter> {
         const router = createRouter({
           routeTree,
           defaultPreload: 'intent',
           defaultErrorComponent: DefaultCatchBoundary,
           defaultNotFoundComponent: () => <NotFound />,
           scrollRestoration: true,
         })
         return router
       }
      examples/solid/start-basic-nitro/src/styles/app.css (1)

      10-12: A11y: scope outline removal to focus; optional pseudo-element inclusion.

      • Only suppress outlines on focus when using mouse to preserve keyboard focus visibility.
      • Optionally include pseudo-elements in the border-color rule.
      -  * {
      -    @apply border-gray-200 dark:border-gray-800;
      -  }
      +  *, ::before, ::after {
      +    @apply border-gray-200 dark:border-gray-800;
      +  }
      
      -  .using-mouse * {
      -    outline: none !important;
      -  }
      +  .using-mouse *:focus {
      +    outline: none !important;
      +  }

      Note: Ensure your app toggles the using-mouse class on pointer/keyboard events.

      Also applies to: 19-21

      examples/solid/start-basic-nitro/src/routes/posts_.$postId.deep.tsx (1)

      1-12: Add a notFoundComponent for 404s (parity with /posts/$postId).

      Ensures clean 404 rendering when fetchPost throws notFound().

      -import { Link, createFileRoute } from '@tanstack/solid-router'
      +import { Link, createFileRoute } from '@tanstack/solid-router'
       import { fetchPost } from '../utils/posts'
       import { PostErrorComponent } from '~/components/PostError'
      +import { NotFound } from '~/components/NotFound'
      
       export const Route = createFileRoute('/posts_/$postId/deep')({
         loader: async ({ params: { postId } }) =>
           fetchPost({
             data: postId,
           }),
         errorComponent: PostErrorComponent,
      +  notFoundComponent: () => <NotFound>Post not found</NotFound>,
         component: PostDeepComponent,
       })
      examples/solid/start-basic-nitro/src/routes/posts.tsx (1)

      25-27: Dark-mode active color + ellipsis truncation.

      Use theme-aware active color and CSS truncation instead of substring.

      -                  activeProps={{ class: 'text-black font-bold' }}
      +                  activeProps={{ class: 'font-bold text-gray-900 dark:text-gray-100' }}
                       >
      -                  <div>{post.title.substring(0, 20)}</div>
      +                  <div class="truncate max-w-[20ch]">{post.title}</div>

      Optional: For list rendering performance, consider Solid’s <For> when mapping larger arrays.

      examples/solid/start-basic-nitro/src/routes/api/users.$userId.ts (2)

      11-13: Prefer template literals for URL construction.

      Using template literals is more readable and maintainable than string concatenation with the + operator.

      Apply this diff:

      -          const res = await fetch(
      -            'https://jsonplaceholder.typicode.com/users/' + params.userId,
      -          )
      +          const res = await fetch(
      +            `https://jsonplaceholder.typicode.com/users/${params.userId}`,
      +          )

      21-25: Simplify the response object construction.

      Since the User type already has the exact properties being returned, you can simplify the response.

      Apply this diff:

                 return json({
                   id: user.id,
                   name: user.name,
                   email: user.email,
                 })
      +          // Or more simply:
      +          // return json(user)

      Alternatively, if you want to ensure only specific fields are returned:

      -          return json({
      -            id: user.id,
      -            name: user.name,
      -            email: user.email,
      -          })
      +          const { id, name, email } = user
      +          return json({ id, name, email })
      examples/solid/start-basic-nitro/src/routes/users.$userId.tsx (2)

      2-4: Inconsistent import path styles.

      The imports mix absolute path aliases (src/components/) with relative paths (../utils/). Consider using a consistent style throughout the file for better maintainability.

      Apply this diff to use consistent path aliases:

      -import { NotFound } from 'src/components/NotFound'
      -import { UserErrorComponent } from 'src/components/UserError'
      -import type { User } from '../utils/users'
      +import { NotFound } from '~/components/NotFound'
      +import { UserErrorComponent } from '~/components/UserError'
      +import type { User } from '~/utils/users'

      9-9: Prefer template literals for URL construction.

      Using template literals is more readable than string concatenation.

      Apply this diff:

      -      const res = await fetch('/api/users/' + userId)
      +      const res = await fetch(`/api/users/${userId}`)
      examples/solid/start-basic-nitro/src/routes/posts.$postId.tsx (1)

      2-4: Inconsistent import path styles.

      The imports mix relative paths (../) with path aliases (~/). Consider using a consistent style throughout the file.

      Apply this diff to use consistent path aliases:

      -import { fetchPost } from '../utils/posts'
      +import { fetchPost } from '~/utils/posts'
      📜 Review details

      Configuration used: CodeRabbit UI

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between 37ac3adbf64c3b5e9ea7c27817e4c68cc4334b46 and da3b7cadc4bd378397a698ff9debb1af433aeef6.

      ⛔ Files ignored due to path filters (8)
      • examples/solid/start-basic-nitro/public/android-chrome-192x192.png is excluded by !**/*.png
      • examples/solid/start-basic-nitro/public/android-chrome-512x512.png is excluded by !**/*.png
      • examples/solid/start-basic-nitro/public/apple-touch-icon.png is excluded by !**/*.png
      • examples/solid/start-basic-nitro/public/favicon-16x16.png is excluded by !**/*.png
      • examples/solid/start-basic-nitro/public/favicon-32x32.png is excluded by !**/*.png
      • examples/solid/start-basic-nitro/public/favicon.ico is excluded by !**/*.ico
      • examples/solid/start-basic-nitro/public/favicon.png is excluded by !**/*.png
      • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
      📒 Files selected for processing (41)
      • docs/start/config.json (1 hunks)
      • examples/solid/start-basic-netlify/package.json (1 hunks)
      • examples/solid/start-basic-nitro/.gitignore (1 hunks)
      • examples/solid/start-basic-nitro/.prettierignore (1 hunks)
      • examples/solid/start-basic-nitro/.vscode/settings.json (1 hunks)
      • examples/solid/start-basic-nitro/README.md (1 hunks)
      • examples/solid/start-basic-nitro/package.json (1 hunks)
      • examples/solid/start-basic-nitro/postcss.config.mjs (1 hunks)
      • examples/solid/start-basic-nitro/public/site.webmanifest (1 hunks)
      • examples/solid/start-basic-nitro/src/components/DefaultCatchBoundary.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/components/NotFound.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/components/PostError.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/components/UserError.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/routeTree.gen.ts (1 hunks)
      • examples/solid/start-basic-nitro/src/router.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/__root.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/_pathlessLayout.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/api/users.$userId.ts (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/api/users.ts (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/customScript[.]js.ts (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/deferred.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/index.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/posts.$postId.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/posts.index.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/posts.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/posts_.$postId.deep.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/redirect.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/users.$userId.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/users.index.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/routes/users.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/styles/app.css (1 hunks)
      • examples/solid/start-basic-nitro/src/utils/loggingMiddleware.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/utils/posts.tsx (1 hunks)
      • examples/solid/start-basic-nitro/src/utils/seo.ts (1 hunks)
      • examples/solid/start-basic-nitro/src/utils/users.tsx (1 hunks)
      • examples/solid/start-basic-nitro/tailwind.config.mjs (1 hunks)
      • examples/solid/start-basic-nitro/tsconfig.json (1 hunks)
      • examples/solid/start-basic-nitro/vite.config.ts (1 hunks)
      🧰 Additional context used
      📓 Path-based instructions (5)
      **/*.{ts,tsx}

      📄 CodeRabbit inference engine (AGENTS.md)

      Use TypeScript in strict mode with extensive type safety across the codebase

      Files:

      • examples/solid/start-basic-nitro/src/components/NotFound.tsx
      • examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-a.tsx
      • examples/solid/start-basic-nitro/src/routes/__root.tsx
      • examples/solid/start-basic-nitro/src/router.tsx
      • examples/solid/start-basic-nitro/src/routes/users.$userId.tsx
      • examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout.tsx
      • examples/solid/start-basic-nitro/src/routes/index.tsx
      • examples/solid/start-basic-nitro/src/routes/posts.$postId.tsx
      • examples/solid/start-basic-nitro/src/utils/loggingMiddleware.tsx
      • examples/solid/start-basic-nitro/vite.config.ts
      • examples/solid/start-basic-nitro/src/utils/posts.tsx
      • examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-b.tsx
      • examples/solid/start-basic-nitro/src/routes/users.index.tsx
      • examples/solid/start-basic-nitro/src/components/DefaultCatchBoundary.tsx
      • examples/solid/start-basic-nitro/src/utils/seo.ts
      • examples/solid/start-basic-nitro/src/components/PostError.tsx
      • examples/solid/start-basic-nitro/src/routes/deferred.tsx
      • examples/solid/start-basic-nitro/src/components/UserError.tsx
      • examples/solid/start-basic-nitro/src/routes/redirect.tsx
      • examples/solid/start-basic-nitro/src/routes/users.tsx
      • examples/solid/start-basic-nitro/src/routes/posts.tsx
      • examples/solid/start-basic-nitro/src/routeTree.gen.ts
      • examples/solid/start-basic-nitro/src/routes/posts_.$postId.deep.tsx
      • examples/solid/start-basic-nitro/src/utils/users.tsx
      • examples/solid/start-basic-nitro/src/routes/posts.index.tsx
      • examples/solid/start-basic-nitro/src/routes/_pathlessLayout.tsx
      • examples/solid/start-basic-nitro/src/routes/customScript[.]js.ts
      • examples/solid/start-basic-nitro/src/routes/api/users.$userId.ts
      • examples/solid/start-basic-nitro/src/routes/api/users.ts
      examples/{react,solid}/**

      📄 CodeRabbit inference engine (AGENTS.md)

      Keep example applications under examples/react/ and examples/solid/

      Files:

      • examples/solid/start-basic-nitro/src/components/NotFound.tsx
      • examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-a.tsx
      • examples/solid/start-basic-nitro/src/routes/__root.tsx
      • examples/solid/start-basic-nitro/src/router.tsx
      • examples/solid/start-basic-nitro/README.md
      • examples/solid/start-basic-netlify/package.json
      • examples/solid/start-basic-nitro/postcss.config.mjs
      • examples/solid/start-basic-nitro/src/routes/users.$userId.tsx
      • examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout.tsx
      • examples/solid/start-basic-nitro/src/routes/index.tsx
      • examples/solid/start-basic-nitro/src/routes/posts.$postId.tsx
      • examples/solid/start-basic-nitro/src/utils/loggingMiddleware.tsx
      • examples/solid/start-basic-nitro/vite.config.ts
      • examples/solid/start-basic-nitro/src/utils/posts.tsx
      • examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-b.tsx
      • examples/solid/start-basic-nitro/src/routes/users.index.tsx
      • examples/solid/start-basic-nitro/src/components/DefaultCatchBoundary.tsx
      • examples/solid/start-basic-nitro/src/utils/seo.ts
      • examples/solid/start-basic-nitro/src/components/PostError.tsx
      • examples/solid/start-basic-nitro/src/routes/deferred.tsx
      • examples/solid/start-basic-nitro/src/components/UserError.tsx
      • examples/solid/start-basic-nitro/src/routes/redirect.tsx
      • examples/solid/start-basic-nitro/src/routes/users.tsx
      • examples/solid/start-basic-nitro/src/routes/posts.tsx
      • examples/solid/start-basic-nitro/src/routeTree.gen.ts
      • examples/solid/start-basic-nitro/src/styles/app.css
      • examples/solid/start-basic-nitro/src/routes/posts_.$postId.deep.tsx
      • examples/solid/start-basic-nitro/src/utils/users.tsx
      • examples/solid/start-basic-nitro/src/routes/posts.index.tsx
      • examples/solid/start-basic-nitro/public/site.webmanifest
      • examples/solid/start-basic-nitro/tailwind.config.mjs
      • examples/solid/start-basic-nitro/src/routes/_pathlessLayout.tsx
      • examples/solid/start-basic-nitro/tsconfig.json
      • examples/solid/start-basic-nitro/src/routes/customScript[.]js.ts
      • examples/solid/start-basic-nitro/src/routes/api/users.$userId.ts
      • examples/solid/start-basic-nitro/package.json
      • examples/solid/start-basic-nitro/src/routes/api/users.ts
      **/src/routes/**

      📄 CodeRabbit inference engine (AGENTS.md)

      Place file-based routes under src/routes/ directories

      Files:

      • examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-a.tsx
      • examples/solid/start-basic-nitro/src/routes/__root.tsx
      • examples/solid/start-basic-nitro/src/routes/users.$userId.tsx
      • examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout.tsx
      • examples/solid/start-basic-nitro/src/routes/index.tsx
      • examples/solid/start-basic-nitro/src/routes/posts.$postId.tsx
      • examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-b.tsx
      • examples/solid/start-basic-nitro/src/routes/users.index.tsx
      • examples/solid/start-basic-nitro/src/routes/deferred.tsx
      • examples/solid/start-basic-nitro/src/routes/redirect.tsx
      • examples/solid/start-basic-nitro/src/routes/users.tsx
      • examples/solid/start-basic-nitro/src/routes/posts.tsx
      • examples/solid/start-basic-nitro/src/routes/posts_.$postId.deep.tsx
      • examples/solid/start-basic-nitro/src/routes/posts.index.tsx
      • examples/solid/start-basic-nitro/src/routes/_pathlessLayout.tsx
      • examples/solid/start-basic-nitro/src/routes/customScript[.]js.ts
      • examples/solid/start-basic-nitro/src/routes/api/users.$userId.ts
      • examples/solid/start-basic-nitro/src/routes/api/users.ts
      docs/{router,start}/**

      📄 CodeRabbit inference engine (AGENTS.md)

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

      Files:

      • docs/start/config.json
      **/package.json

      📄 CodeRabbit inference engine (AGENTS.md)

      Use workspace:* protocol for internal dependencies in package.json files

      Files:

      • examples/solid/start-basic-netlify/package.json
      • examples/solid/start-basic-nitro/package.json
      🧠 Learnings (2)
      📚 Learning: 2025-10-01T18:31:35.420Z
      Learnt from: schiller-manuel
      PR: TanStack/router#5330
      File: e2e/react-start/custom-basepath/src/routeTree.gen.ts:58-61
      Timestamp: 2025-10-01T18:31:35.420Z
      Learning: Do not review files named `routeTree.gen.ts` in TanStack Router repositories, as these are autogenerated files that should not be manually modified.

      Applied to files:

      • examples/solid/start-basic-nitro/.vscode/settings.json
      • examples/solid/start-basic-nitro/src/routeTree.gen.ts
      📚 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 **/*.{ts,tsx} : Use TypeScript in strict mode with extensive type safety across the codebase

      Applied to files:

      • examples/solid/start-basic-nitro/tsconfig.json
      🧬 Code graph analysis (23)
      examples/solid/start-basic-nitro/src/components/NotFound.tsx (2)
      examples/solid/start-basic-solid-query/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-cloudflare/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (3)
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-nitro/src/routes/__root.tsx (4)
      examples/solid/start-basic-nitro/src/routes/customScript[.]js.ts (1)
      • Route (3-15)
      examples/solid/start-basic-nitro/src/utils/seo.ts (1)
      • seo (1-33)
      examples/solid/start-basic-nitro/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/solid/start-basic-nitro/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-nitro/src/router.tsx (2)
      examples/solid/start-basic-nitro/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/solid/start-basic-nitro/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-nitro/src/routes/users.$userId.tsx (4)
      examples/solid/start-basic-nitro/src/routes/api/users.$userId.ts (1)
      • Route (5-33)
      examples/solid/start-basic-nitro/src/utils/users.tsx (1)
      • User (1-5)
      examples/solid/start-basic-nitro/src/components/UserError.tsx (1)
      • UserErrorComponent (4-6)
      examples/solid/start-basic-nitro/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout.tsx (3)
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-nitro/src/routes/index.tsx (3)
      examples/solid/start-basic-nitro/src/routes/api/users.$userId.ts (1)
      • Route (5-33)
      examples/solid/start-basic-nitro/src/routes/api/users.ts (1)
      • Route (41-64)
      examples/solid/start-basic-nitro/src/routes/deferred.tsx (1)
      • Route (18-29)
      examples/solid/start-basic-nitro/src/routes/posts.$postId.tsx (3)
      examples/solid/start-basic-nitro/src/routes/posts_.$postId.deep.tsx (1)
      • Route (5-12)
      examples/solid/start-basic-nitro/src/components/PostError.tsx (1)
      • PostErrorComponent (4-6)
      examples/solid/start-basic-nitro/src/components/NotFound.tsx (1)
      • NotFound (3-25)
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (3)
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-nitro/src/routes/users.index.tsx (3)
      examples/solid/start-basic-nitro/src/routes/api/users.ts (1)
      • Route (41-64)
      examples/solid/start-basic-nitro/src/routes/posts.index.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-nitro/src/routes/users.$userId.tsx (1)
      • Route (6-26)
      examples/solid/start-basic-nitro/src/components/DefaultCatchBoundary.tsx (3)
      e2e/solid-start/server-routes/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/solid/start-basic-cloudflare/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/solid/start-basic/src/components/DefaultCatchBoundary.tsx (1)
      • DefaultCatchBoundary (10-53)
      examples/solid/start-basic-nitro/src/utils/seo.ts (1)
      scripts/llms-generate.mjs (1)
      • title (101-101)
      examples/solid/start-basic-nitro/src/routes/deferred.tsx (3)
      examples/solid/start-basic-nitro/src/routes/index.tsx (1)
      • Route (4-7)
      examples/solid/start-basic-nitro/src/routes/posts.$postId.tsx (1)
      • Route (6-13)
      examples/solid/start-basic-nitro/src/routes/posts.tsx (1)
      • Route (4-7)
      examples/solid/start-basic-nitro/src/routes/redirect.tsx (2)
      examples/solid/start-basic-nitro/src/routes/posts.index.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-nitro/src/routes/posts.tsx (1)
      • Route (4-7)
      examples/solid/start-basic-nitro/src/routes/users.tsx (4)
      examples/solid/start-basic-nitro/src/routes/api/users.$userId.ts (1)
      • Route (5-33)
      examples/solid/start-basic-nitro/src/routes/api/users.ts (1)
      • Route (41-64)
      examples/solid/start-basic-nitro/src/routes/users.$userId.tsx (1)
      • Route (6-26)
      examples/solid/start-basic-nitro/src/utils/users.tsx (1)
      • User (1-5)
      examples/solid/start-basic-nitro/src/routes/posts.tsx (2)
      examples/solid/start-basic-nitro/src/routes/posts.$postId.tsx (1)
      • Route (6-13)
      examples/solid/start-basic-nitro/src/utils/posts.tsx (1)
      • fetchPosts (30-40)
      examples/solid/start-basic-nitro/src/routeTree.gen.ts (2)
      e2e/react-router/js-only-file-based/src/routeTree.gen.js (12)
      • PathlessLayoutRoute (21-24)
      • IndexRoute (30-34)
      • PostsIndexRoute (35-39)
      • PostsPostIdRoute (40-44)
      • PathlessLayoutNestedLayoutRoute (45-49)
      • PathlessLayoutNestedLayoutRouteBRoute (50-55)
      • PathlessLayoutNestedLayoutRouteARoute (56-61)
      • PathlessLayoutRouteWithChildren (86-88)
      • PathlessLayoutNestedLayoutRouteWithChildren (77-80)
      • PathlessLayoutNestedLayoutRouteChildren (72-75)
      • PathlessLayoutRouteChildren (82-84)
      • rootRouteChildren (90-94)
      examples/solid/start-basic-nitro/src/router.tsx (1)
      • getRouter (6-16)
      examples/solid/start-basic-nitro/src/routes/posts_.$postId.deep.tsx (4)
      examples/solid/start-basic-nitro/src/routes/posts.$postId.tsx (1)
      • Route (6-13)
      examples/solid/start-basic-nitro/src/routes/posts.tsx (1)
      • Route (4-7)
      examples/solid/start-basic-nitro/src/utils/posts.tsx (1)
      • fetchPost (10-28)
      examples/solid/start-basic-nitro/src/components/PostError.tsx (1)
      • PostErrorComponent (4-6)
      examples/solid/start-basic-nitro/src/routes/posts.index.tsx (3)
      examples/solid/start-basic-nitro/src/routes/posts.$postId.tsx (1)
      • Route (6-13)
      examples/solid/start-basic-nitro/src/routes/posts.tsx (1)
      • Route (4-7)
      examples/solid/start-basic-nitro/src/routes/users.index.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout.tsx (3)
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout.tsx (1)
      • Route (3-5)
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (1)
      • Route (3-7)
      examples/solid/start-basic-nitro/src/routes/customScript[.]js.ts (1)
      examples/solid/start-basic-nitro/src/routes/__root.tsx (1)
      • Route (16-64)
      examples/solid/start-basic-nitro/src/routes/api/users.$userId.ts (3)
      examples/solid/start-basic-nitro/src/routes/api/users.ts (1)
      • Route (41-64)
      examples/solid/start-basic-nitro/src/routes/users.$userId.tsx (1)
      • Route (6-26)
      examples/solid/start-basic-nitro/src/utils/users.tsx (1)
      • User (1-5)
      examples/solid/start-basic-nitro/src/routes/api/users.ts (3)
      packages/start-server-core/src/request-response.ts (1)
      • getRequestHeaders (77-80)
      examples/solid/start-basic-nitro/src/routes/api/users.$userId.ts (1)
      • Route (5-33)
      examples/solid/start-basic-nitro/src/utils/users.tsx (1)
      • User (1-5)
      🪛 Biome (2.1.2)
      examples/solid/start-basic-nitro/src/routes/deferred.tsx

      [error] 43-43: Avoid passing children using a prop

      The canonical way to pass children in React is to use JSX elements

      (lint/correctness/noChildrenProp)


      [error] 53-53: Avoid passing children using a prop

      The canonical way to pass children in React is to use JSX elements

      (lint/correctness/noChildrenProp)

      ⏰ 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
      🔇 Additional comments (23)
      examples/solid/start-basic-nitro/tsconfig.json (1)

      1-23: Well-configured TypeScript setup for Solid Start example.

      The configuration enables strict mode, appropriate JSX settings for Solid.js, modern compilation targets, and helpful path aliasing — all aligned with the codebase's type safety guidelines. The noEmit option is correct since Vite/Nitro handles compilation, and moduleResolution: "Bundler" is appropriate for the build setup.

      examples/solid/start-basic-nitro/.gitignore (1)

      1-10: LGTM!

      The .gitignore entries appropriately cover Node.js project artifacts, build outputs, environment configuration, and deployment tooling (.wrangler, .netlify, .nitro) for the Solid Start example.

      examples/solid/start-basic-nitro/.vscode/settings.json (1)

      1-11: LGTM!

      The VSCode settings appropriately exclude the autogenerated routeTree.gen.ts file from watchers, searches, and mark it as readonly. This prevents accidental edits and reduces noise.

      Based on learnings

      examples/solid/start-basic-nitro/src/routes/users.index.tsx (1)

      7-16: LGTM!

      The component correctly uses an HTML anchor tag for the API endpoint link, which will trigger a full navigation to view the JSON response. This is the appropriate approach for non-route endpoints.

      docs/start/config.json (1)

      337-340: LGTM!

      The new Nitro Vite Plugin example entry is correctly structured and follows the existing pattern. The placement and labeling are appropriate.

      examples/solid/start-basic-nitro/postcss.config.mjs (1)

      1-6: LGTM!

      Standard PostCSS configuration for Tailwind CSS and Autoprefixer. The empty configuration objects will use the default settings from both plugins, which is appropriate for this example.

      examples/solid/start-basic-nitro/src/routes/customScript[.]js.ts (1)

      3-15: LGTM!

      The server route correctly demonstrates serving custom JavaScript content with the appropriate Content-Type header. This is a useful example of handling non-HTML responses in file-based routing.

      examples/solid/start-basic-nitro/src/routes/posts.index.tsx (1)

      1-9: LGTM: correct index route for /posts.

      Matches file-based routing conventions and mirrors users.index.tsx.

      examples/solid/start-basic-nitro/vite.config.ts (1)

      7-19: Plugin order is correct—no changes needed.

      The current plugin order matches all other Solid examples in the repository. tanstackStart() correctly runs before viteSolid({ ssr: true }) across all variants (basic, cloudflare, netlify, and nitro-based examples).

      examples/solid/start-basic-nitro/src/utils/loggingMiddleware.tsx (1)

      1-41: LGTM! Clean timing middleware implementation.

      The middleware composition and timing logic are well-structured. The client-server round-trip timing measurements (duration, durationToServer, durationFromServer) are correctly calculated.

      examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-b.tsx (1)

      1-11: LGTM! Consistent with sibling routes.

      The route definition follows the established pattern and correctly implements a nested layout route.

      examples/solid/start-basic-nitro/.prettierignore (1)

      1-4: LGTM! Appropriate ignore patterns.

      The ignore patterns correctly exclude generated files, lock files, and build artifacts from Prettier formatting.

      examples/solid/start-basic-nitro/src/utils/users.tsx (1)

      1-5: LGTM! Clean type definition.

      The User type is well-defined and appropriately simple.

      examples/solid/start-basic-nitro/src/routes/redirect.tsx (1)

      1-9: LGTM! Correct redirect implementation.

      The redirect route correctly uses the beforeLoad hook with throw redirect() pattern.

      examples/solid/start-basic-nitro/src/routes/_pathlessLayout.tsx (1)

      1-16: LGTM! Well-structured layout component.

      The pathless layout route correctly uses Outlet for nested routes and follows Solid.js conventions with the class attribute.

      examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-a.tsx (1)

      3-11: LGTM — child route wiring is correct.

      Path, component export, and file-based route naming match the parent layout.

      examples/solid/start-basic-nitro/src/components/PostError.tsx (1)

      4-6: LGTM — minimal, typed error wrapper.

      Straightforward and consistent with other error components.

      examples/solid/start-basic-nitro/src/components/DefaultCatchBoundary.tsx (1)

      1-53: LGTM! Consistent with other examples.

      The DefaultCatchBoundary implementation correctly follows the established pattern used in other Solid Start examples (start-basic, start-basic-cloudflare, e2e/solid-start/server-routes), providing appropriate error logging and user-friendly recovery options.

      examples/solid/start-basic-nitro/src/routes/users.tsx (1)

      25-28: Good test case for error handling.

      The addition of a non-existent user is a useful demonstration of error handling in the child route. This helps showcase the notFoundComponent and errorComponent behavior.

      examples/solid/start-basic-nitro/src/routes/deferred.tsx (1)

      41-48: Static analysis warning can be safely ignored.

      The static analyzer flagged the children prop on the Await component, but in Solid.js (unlike React), this is a valid and idiomatic pattern. The Await component from @tanstack/solid-router is designed to accept children as a render prop.

      However, if you prefer to align with the analyzer's suggestion, you could use the component's render prop pattern instead:

      <Await promise={loaderData().deferredPerson}>
        {(data) => (
          <div data-testid="deferred-person">
            {data.name} - {data.randomNumber}
          </div>
        )}
      </Await>

      But the current usage is perfectly valid for Solid.js.

      examples/solid/start-basic-nitro/src/routes/index.tsx (1)

      1-24: LGTM! Clean implementation.

      The home route correctly demonstrates server function usage with createServerFn and proper data loading through the route's loader. The use of navigator.userAgent in the server context is appropriate.

      examples/solid/start-basic-nitro/src/routes/__root.tsx (1)

      117-118: Good demonstration of type-safe routing.

      The intentional use of @ts-expect-error for a non-existent route effectively demonstrates the type-safety features of TanStack Router.

      examples/solid/start-basic-nitro/src/routeTree.gen.ts (1)

      1-447: Skipping review: Auto-generated file

      This file is auto-generated by TanStack Router and should not be manually modified or reviewed. As stated in the file header (lines 7-9), changes will be overwritten.

      Based on learnings

      examples/solid/start-basic-nitro/package.json lines 11 to 16
      @@ -0,0 +1,16 @@
      1+{
      2+ "name": "tanstack-solid-start-example-basic-nitro",
      3+ "private": true,
      4+ "sideEffects": false,
      5+ "type": "module",
      6+ "scripts": {
      7+ "dev": "vite dev",
      8+ "build": "vite build && tsc --noEmit",
      9+ "preview": "vite preview"
      10+ },
      11+ "dependencies": {
      12+ "@tanstack/solid-router": "^1.133.20",
      13+ "@tanstack/solid-router-devtools": "^1.133.20",
      14+ "@tanstack/solid-start": "^1.133.20",
      15+ "solid-js": "^1.9.5"
      16+ },

      🛠️ Refactor suggestion | 🟠 Major

      Use workspace:* for internal TanStack packages.

      Aligns with repo policy and prevents version skew during local development.

      As per coding guidelines.

         "dependencies": {
      -    "@tanstack/solid-router": "^1.133.20",
      -    "@tanstack/solid-router-devtools": "^1.133.20",
      -    "@tanstack/solid-start": "^1.133.20",
      +    "@tanstack/solid-router": "workspace:*",
      +    "@tanstack/solid-router-devtools": "workspace:*",
      +    "@tanstack/solid-start": "workspace:*",
           "solid-js": "^1.9.5"
         },
      📝 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.

        "dependencies": {
          "@tanstack/solid-router": "workspace:*",
          "@tanstack/solid-router-devtools": "workspace:*",
          "@tanstack/solid-start": "workspace:*",
          "solid-js": "^1.9.5"
        },
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-nitro/package.json around lines 11 to 16, the
      internal TanStack dependencies should use workspace:* instead of explicit
      versions to follow repo policy and avoid version skew; update the three
      @tanstack packages ("@tanstack/solid-router", "@tanstack/solid-router-devtools",
      "@tanstack/solid-start") to use "workspace:*" while leaving external packages
      like "solid-js" as-is, and save the modified package.json so installs resolve to
      the workspace packages during local development.
      examples/solid/start-basic-nitro/package.json lines 17 to 19
      @@ -0,0 +1,19 @@
      1+{
      2+ "name": "tanstack-solid-start-example-basic-nitro",
      3+ "private": true,
      4+ "sideEffects": false,
      5+ "type": "module",
      6+ "scripts": {
      7+ "dev": "vite dev",
      8+ "build": "vite build && tsc --noEmit",
      9+ "preview": "vite preview"
      10+ },
      11+ "dependencies": {
      12+ "@tanstack/solid-router": "^1.133.20",
      13+ "@tanstack/solid-router-devtools": "^1.133.20",
      14+ "@tanstack/solid-start": "^1.133.20",
      15+ "solid-js": "^1.9.5"
      16+ },
      17+ "devDependencies": {
      18+ "nitro": "^3.0.1-alpha.0",
      19+ "@types/node": "^22.5.4",

      ⚠️ Potential issue | 🔴 Critical

      🧩 Analysis chain

      Sanity-check nitro version.

      Alpha versions can churn. Confirm 3.0.1-alpha.0 is intended for the example; otherwise prefer a stable 3.x.


      🏁 Script executed:

      #!/bin/bash
      # Compare nitro versions used across examples and check for non-alpha usage.
      rg -n --glob 'examples/**/package.json' '"nitro":\s*".*"' -N -C1

      Length of output: 221


      I'll search for information about the current stable nitro version to help assess whether using the alpha version here is appropriate.

      Let me check if there's broader context about whether this project is intentionally using Nitro v3 alpha:

      Update the example to use Nitro v2 (stable) instead of v3 alpha.

      The current stable release is Nitro v2, while Nitro v3 is still under active development and features/APIs can change before final release. Version 3.0.1-alpha.0 was published 11 days ago, confirming active churn. For a foundational example like "start-basic-nitro," using an alpha version introduces unnecessary instability and breaking-change risk for developers learning the framework. Switch to Nitro v2 (the current stable release).

      🤖 Prompt for AI Agents
      In examples/solid/start-basic-nitro/package.json around lines 17-19, the
      devDependency pins "nitro" to an alpha release ("^3.0.1-alpha.0"); replace that
      with the stable Nitro v2 range to avoid introducing an unstable alpha into the
      example (e.g., change the version string to a v2 stable range like "^2.x" or the
      current v2 exact release), update lockfile if present, and run npm/yarn install
      to verify no dependency conflicts.
      examples/solid/start-basic-nitro/README.md line 1
      @@ -0,0 +1 @@
      1+# Start Basic Netlify

      ⚠️ Potential issue | 🟡 Minor

      Fix title to match directory name.

      The README title is "Start Basic Netlify" but the directory is named start-basic-nitro. This creates confusion about what the example demonstrates.

      Apply this diff to align the title with the directory name:

      -# Start Basic Netlify
      +# Start Basic Nitro
      📝 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.

      # Start Basic Nitro
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-nitro/README.md around line 1, the heading "Start
      Basic Netlify" doesn't match the directory name; change the top-level title to
      "Start Basic Nitro" so the README matches the start-basic-nitro directory name
      (replace the first line with "# Start Basic Nitro").
      examples/solid/start-basic-nitro/src/routes/__root.tsx lines 27 to 29
      @@ -0,0 +9,21 @@
      9+import { HydrationScript } from 'solid-js/web'
      10+import type * as Solid from 'solid-js'
      11+import { DefaultCatchBoundary } from '~/components/DefaultCatchBoundary'
      12+import { NotFound } from '~/components/NotFound'
      13+import appCss from '~/styles/app.css?url'
      14+import { seo } from '~/utils/seo'
      15+
      16+export const Route = createRootRoute({
      17+ head: () => ({
      18+ meta: [
      19+ {
      20+ charset: 'utf-8',
      21+ },
      22+ {
      23+ name: 'viewport',
      24+ content: 'width=device-width, initial-scale=1',
      25+ },
      26+ ...seo({
      27+ title:
      28+ 'TanStack Start | Type-Safe, Client-First, Full-Stack React Framework',
      29+ description: `TanStack Start is a type-safe, client-first, full-stack React framework. `,

      ⚠️ Potential issue | 🟡 Minor

      Title refers to React instead of Solid.

      The SEO title and description reference "React Framework" but this is a Solid.js example. Consider updating it to reflect the correct framework.

      Apply this diff:

             ...seo({
               title:
      -          'TanStack Start | Type-Safe, Client-First, Full-Stack React Framework',
      -        description: `TanStack Start is a type-safe, client-first, full-stack React framework. `,
      +          'TanStack Start | Type-Safe, Client-First, Full-Stack Solid Framework',
      +        description: `TanStack Start is a type-safe, client-first, full-stack Solid framework. `,
             }),
      📝 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.

              title:
                'TanStack Start | Type-Safe, Client-First, Full-Stack Solid Framework',
              description: `TanStack Start is a type-safe, client-first, full-stack Solid framework. `,
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-nitro/src/routes/__root.tsx around lines 27 to 29,
      the SEO title and description incorrectly mention "React"; update both strings
      to reference "Solid" (e.g., change "TanStack Start | Type-Safe, Client-First,
      Full-Stack React Framework" to "TanStack Start | Type-Safe, Client-First,
      Full-Stack Solid Framework" and update the description to "TanStack Start is a
      type-safe, client-first, full-stack Solid framework."), preserving punctuation
      and formatting.
      examples/solid/start-basic-nitro/src/routes/__root.tsx line 51
      @@ -0,0 +31,21 @@
      31+ ],
      32+ links: [
      33+ { rel: 'stylesheet', href: appCss },
      34+ {
      35+ rel: 'apple-touch-icon',
      36+ sizes: '180x180',
      37+ href: '/apple-touch-icon.png',
      38+ },
      39+ {
      40+ rel: 'icon',
      41+ type: 'image/png',
      42+ sizes: '32x32',
      43+ href: '/favicon-32x32.png',
      44+ },
      45+ {
      46+ rel: 'icon',
      47+ type: 'image/png',
      48+ sizes: '16x16',
      49+ href: '/favicon-16x16.png',
      50+ },
      51+ { rel: 'manifest', href: '/site.webmanifest', color: '#fffff' },

      ⚠️ Potential issue | 🟡 Minor

      Invalid HTML attribute on manifest link.

      The color attribute is not a valid attribute for <link> elements. If you want to set a theme color, use a separate <meta> tag with name="theme-color".

      Apply this diff:

      -      { rel: 'manifest', href: '/site.webmanifest', color: '#fffff' },
      +      { rel: 'manifest', href: '/site.webmanifest' },
             { rel: 'icon', href: '/favicon.ico' },

      If you need a theme color, add it to the meta array:

             ...seo({
               title:
                 'TanStack Start | Type-Safe, Client-First, Full-Stack React Framework',
               description: `TanStack Start is a type-safe, client-first, full-stack React framework. `,
             }),
      +      {
      +        name: 'theme-color',
      +        content: '#fffff',
      +      },
           ],
      📝 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.

            { rel: 'manifest', href: '/site.webmanifest' },
             { rel: 'icon', href: '/favicon.ico' },
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-nitro/src/routes/__root.tsx around line 51, the
      <link rel="manifest"> entry incorrectly includes a nonstandard color attribute;
      remove the color property from that link entry and, if a theme color is needed,
      add a separate meta entry to the meta array with name="theme-color" and the
      desired color value (e.g. "#ffffff"), ensuring the manifest link only contains
      valid attributes.
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout.tsx lines 12 to 27
      @@ -0,0 +7,21 @@
      7+function LayoutComponent() {
      8+ return (
      9+ <div>
      10+ <div>I'm a nested layout</div>
      11+ <div class="flex gap-2 border-b">
      12+ <Link
      13+ to="/route-a"
      14+ activeProps={{
      15+ class: 'font-bold',
      16+ }}
      17+ >
      18+ Go to route A
      19+ </Link>
      20+ <Link
      21+ to="/route-b"
      22+ activeProps={{
      23+ class: 'font-bold',
      24+ }}
      25+ >
      26+ Go to route B
      27+ </Link>

      ⚠️ Potential issue | 🔴 Critical

      🧩 Analysis chain

      Fix Link targets to child routes (current paths likely 404).

      These Links point to root paths and bypass the nested layout. Target the file-route paths (or use relative "route-a"/"route-b").

      Apply this diff:

      -        <Link
      -          to="/route-a"
      +        <Link
      +          to="/_pathlessLayout/_nested-layout/route-a"
                 activeProps={{
                   class: 'font-bold',
                 }}
               >
                 Go to route A
               </Link>
      ...
      -        <Link
      -          to="/route-b"
      +        <Link
      +          to="/_pathlessLayout/_nested-layout/route-b"
                 activeProps={{
                   class: 'font-bold',
                 }}
               >
                 Go to route B
               </Link>

      Alternative: use relative targets:

      • to="route-a"
      • to="route-b"

      🏁 Script executed:

      #!/bin/bash
      # Find the target file and explore the routing structure
      echo "=== Target file content ==="
      cat "examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout.tsx"
      
      echo -e "\n=== Routing directory structure ==="
      find "examples/solid/start-basic-nitro/src/routes/" -type f -name "*.tsx" -o -name "*.ts" | sort
      
      echo -e "\n=== Pathless layout directory contents ==="
      ls -la "examples/solid/start-basic-nitro/src/routes/_pathlessLayout/" 2>/dev/null || echo "Directory not found"
      
      echo -e "\n=== Nested layout route contents ==="
      ls -la "examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/" 2>/dev/null || echo "Directory not found"

      Length of output: 2458


      🏁 Script executed:

      #!/bin/bash
      # Check the child route files
      echo "=== route-a.tsx ==="
      cat "examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-a.tsx"
      
      echo -e "\n=== route-b.tsx ==="
      cat "examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout/route-b.tsx"
      
      echo -e "\n=== Check if root-level route-a/route-b exist ==="
      ls -la "examples/solid/start-basic-nitro/src/routes/route-a.tsx" 2>/dev/null || echo "No route-a.tsx at root"
      ls -la "examples/solid/start-basic-nitro/src/routes/route-b.tsx" 2>/dev/null || echo "No route-b.tsx at root"

      Length of output: 623


      Fix Link targets to nested child routes (current paths will 404).

      Links point to non-existent root paths /route-a and /route-b, but child routes only exist at /_pathlessLayout/_nested-layout/route-a and /_pathlessLayout/_nested-layout/route-b. Use relative paths for clarity:

              <Link
      -          to="/route-a"
      +          to="route-a"
                 activeProps={{
                   class: 'font-bold',
                 }}
               >
                 Go to route A
               </Link>
               <Link
      -          to="/route-b"
      +          to="route-b"
                 activeProps={{
                   class: 'font-bold',
                 }}
               >
                 Go to route B
               </Link>
      🤖 Prompt for AI Agents
      In
      examples/solid/start-basic-nitro/src/routes/_pathlessLayout/_nested-layout.tsx
      around lines 12 to 27, the Link targets use absolute paths (/route-a, /route-b)
      that 404 because the actual child routes are relative to this nested layout;
      change the Link destinations to relative child paths (e.g., "route-a" and
      "route-b" or "./route-a" and "./route-b") so they resolve under the current
      nested route.
      examples/solid/start-basic-nitro/src/routes/api/users.ts lines 6 to 13
      @@ -0,0 +1,13 @@
      1+import { createFileRoute } from '@tanstack/solid-router'
      2+import { getRequestHeaders } from '@tanstack/solid-start/server'
      3+import { createMiddleware, json } from '@tanstack/solid-start'
      4+import type { User } from '~/utils/users'
      5+
      6+const userLoggerMiddleware = createMiddleware().server(async ({ next }) => {
      7+ console.info('In: /users')
      8+ console.info('Request Headers:', getRequestHeaders())
      9+ const result = await next()
      10+ result.response.headers.set('x-users', 'true')
      11+ console.info('Out: /users')
      12+ return result
      13+})

      ⚠️ Potential issue | 🟠 Major

      Do not log full request headers (PII/cookies).

      Redact sensitive headers or log only names; gate with NODE_ENV.

       const userLoggerMiddleware = createMiddleware().server(async ({ next }) => {
         console.info('In: /users')
      -  console.info('Request Headers:', getRequestHeaders())
      +  if (process.env.NODE_ENV !== 'production') {
      +    const h = getRequestHeaders() as Record<string, unknown>
      +    const redacted = Object.fromEntries(
      +      Object.entries(h).map(([k, v]) =>
      +        ['authorization', 'cookie', 'set-cookie'].includes(k.toLowerCase())
      +          ? [k, '[redacted]']
      +          : [k, v],
      +      ),
      +    )
      +    console.info('Request Headers:', redacted)
      +  }
         const result = await next()
         result.response.headers.set('x-users', 'true')
         console.info('Out: /users')
         return result
       })
      📝 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 userLoggerMiddleware = createMiddleware().server(async ({ next }) => {
        console.info('In: /users')
        if (process.env.NODE_ENV !== 'production') {
          const h = getRequestHeaders() as Record<string, unknown>
          const redacted = Object.fromEntries(
            Object.entries(h).map(([k, v]) =>
              ['authorization', 'cookie', 'set-cookie'].includes(k.toLowerCase())
                ? [k, '[redacted]']
                : [k, v],
            ),
          )
          console.info('Request Headers:', redacted)
        }
        const result = await next()
        result.response.headers.set('x-users', 'true')
        console.info('Out: /users')
        return result
      })
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-nitro/src/routes/api/users.ts around lines 6 to
      13, the middleware currently logs full request headers (which may include
      PII/cookies); change it to avoid printing sensitive header values by gating
      header logging behind a NODE_ENV check (only log in development), and when
      logging only include either the header names or a filtered copy that redacts
      values for sensitive keys (e.g. Authorization, Cookie, Set-Cookie,
      Proxy-Authorization, and any header containing "token" or "cookie"); keep the
      existing flow (call next, set x-users) but replace the console.info('Request
      Headers', ...) with a safe log showing either Object.keys(headers) or a
      sanitized headers object and only execute that logging when process.env.NODE_ENV
      === 'development'.
      examples/solid/start-basic-nitro/src/routes/api/users.ts lines 45 to 61
      @@ -0,0 +41,21 @@
      41+export const Route = createFileRoute('/api/users')({
      42+ server: {
      43+ middleware: [testMiddleware, userLoggerMiddleware],
      44+ handlers: {
      45+ GET: async ({ request }) => {
      46+ console.info('GET /api/users @', request.url)
      47+ console.info('Fetching users... @', request.url)
      48+ const res = await fetch('https://jsonplaceholder.typicode.com/users')
      49+ if (!res.ok) {
      50+ throw new Error('Failed to fetch users')
      51+ }
      52+
      53+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
      54+ const data = (await res.json()) as Array<User>
      55+
      56+ const list = data.slice(0, 10)
      57+
      58+ return json(
      59+ list.map((u) => ({ id: u.id, name: u.name, email: u.email })),
      60+ )
      61+ },

      ⚠️ Potential issue | 🟠 Major

      Harden external fetch: timeout + structured errors.

      Prevents hung requests and returns clear 5xx on failures.

      -      GET: async ({ request }) => {
      +      GET: async ({ request }) => {
               console.info('GET /api/users @', request.url)
      -        console.info('Fetching users... @', request.url)
      -        const res = await fetch('https://jsonplaceholder.typicode.com/users')
      -        if (!res.ok) {
      -          throw new Error('Failed to fetch users')
      -        }
      -
      -        // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
      -        const data = (await res.json()) as Array<User>
      -
      -        const list = data.slice(0, 10)
      -
      -        return json(
      -          list.map((u) => ({ id: u.id, name: u.name, email: u.email })),
      -        )
      +        console.info('Fetching users... @', request.url)
      +        const ac = new AbortController()
      +        const to = setTimeout(() => ac.abort(), 5000)
      +        try {
      +          const res = await fetch('https://jsonplaceholder.typicode.com/users', {
      +            signal: ac.signal,
      +          })
      +          if (!res.ok) {
      +            return json({ error: 'Upstream error' }, { status: res.status })
      +          }
      +          // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
      +          const data = (await res.json()) as Array<User>
      +          const list = (Array.isArray(data) ? data : []).slice(0, 10)
      +          return json(list.map((u) => ({ id: u.id, name: u.name, email: u.email })))
      +        } catch (e: any) {
      +          const status = e?.name === 'AbortError' ? 504 : 502
      +          console.error('Fetch users failed:', e)
      +          return json({ error: 'Failed to fetch users' }, { status })
      +        } finally {
      +          clearTimeout(to)
      +        }
             },
      📝 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.

            GET: async ({ request }) => {
              console.info('GET /api/users @', request.url)
              console.info('Fetching users... @', request.url)
              const ac = new AbortController()
              const to = setTimeout(() => ac.abort(), 5000)
              try {
                const res = await fetch('https://jsonplaceholder.typicode.com/users', {
                  signal: ac.signal,
                })
                if (!res.ok) {
                  return json({ error: 'Upstream error' }, { status: res.status })
                }
                // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
                const data = (await res.json()) as Array<User>
                const list = (Array.isArray(data) ? data : []).slice(0, 10)
                return json(list.map((u) => ({ id: u.id, name: u.name, email: u.email })))
              } catch (e: any) {
                const status = e?.name === 'AbortError' ? 504 : 502
                console.error('Fetch users failed:', e)
                return json({ error: 'Failed to fetch users' }, { status })
              } finally {
                clearTimeout(to)
              }
            },
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-nitro/src/routes/api/users.ts around lines 45 to
      61, the external fetch can hang and returns unclear errors; add an
      AbortController-driven timeout (e.g., 5s) around the fetch, wrap the fetch in
      try/catch, clear the timeout on success, and convert failures into structured
      5xx responses: return a JSON error body and appropriate status (504 for timeout,
      502 for upstream non-OK, 500 for other exceptions). Ensure you still parse and
      map successful responses the same way, and do not leak the raw thrown Error —
      use the framework json response helper with { error: '...' } and status codes.
      examples/solid/start-basic-nitro/src/utils/posts.tsx lines 10 to 28
      @@ -0,0 +8,21 @@
      8+}
      9+
      10+export const fetchPost = createServerFn({ method: 'POST' })
      11+ .inputValidator((d: string) => d)
      12+ .handler(async ({ data }) => {
      13+ console.info(`Fetching post with id ${data}...`)
      14+ const res = await fetch(
      15+ `https://jsonplaceholder.typicode.com/posts/${data}`,
      16+ )
      17+ if (!res.ok) {
      18+ if (res.status === 404) {
      19+ throw notFound()
      20+ }
      21+
      22+ throw new Error('Failed to fetch post')
      23+ }
      24+
      25+ const post = await res.json()
      26+
      27+ return post as PostType
      28+ })

      ⚠️ Potential issue | 🟠 Major

      Use GET method for read operations.

      fetchPost uses POST method to fetch a post, which violates REST conventions. GET should be used for read operations, while POST is intended for creating resources. This could prevent caching and cause confusion.

      Apply this diff:

      -export const fetchPost = createServerFn({ method: 'POST' })
      +export const fetchPost = createServerFn({ method: 'GET' })
         .inputValidator((d: string) => d)
         .handler(async ({ data }) => {
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-nitro/src/utils/posts.tsx around lines 10 to 28,
      the server function is using method: 'POST' for a read operation; change the
      method to 'GET' and adjust the input handling accordingly so the post id is
      accepted via the GET input (query/params) rather than implying a body — keep the
      same inputValidator for a string id, update any client calls to invoke the GET
      endpoint, and ensure the handler still reads the id from the request input
      (data) and performs the same fetch and error handling; this preserves REST
      conventions and enables caching.
      examples/solid/start-basic-nitro/src/utils/seo.ts lines 14 to 15
      @@ -0,0 +1,15 @@
      1+export const seo = ({
      2+ title,
      3+ description,
      4+ keywords,
      5+ image,
      6+}: {
      7+ title: string
      8+ description?: string
      9+ image?: string
      10+ keywords?: string
      11+}) => {
      12+ const tags = [
      13+ { title },
      14+ { name: 'description', content: description },
      15+ { name: 'keywords', content: keywords },

      ⚠️ Potential issue | 🟠 Major

      Handle undefined values in meta tag content.

      When description or keywords are not provided, these tags will have content: undefined, which may render as empty or literal "undefined" strings in the HTML.

      Filter out tags with undefined content:

         const tags = [
           { title },
      -    { name: 'description', content: description },
      -    { name: 'keywords', content: keywords },
      +    ...(description ? [{ name: 'description', content: description }] : []),
      +    ...(keywords ? [{ name: 'keywords', content: keywords }] : []),
           { name: 'twitter:title', content: title },
      -    { name: 'twitter:description', content: description },
      +    ...(description ? [{ name: 'twitter:description', content: description }] : []),
           { name: 'twitter:creator', content: '@tannerlinsley' },
           { name: 'twitter:site', content: '@tannerlinsley' },
           { name: 'og:type', content: 'website' },
           { name: 'og:title', content: title },
      -    { name: 'og:description', content: description },
      +    ...(description ? [{ name: 'og:description', content: description }] : []),

      Also applies to: 17-17, 22-22

      🤖 Prompt for AI Agents
      In examples/solid/start-basic-nitro/src/utils/seo.ts around lines 14-15 (and
      also address lines 17 and 22), meta tag entries are being created with content
      potentially undefined which can render as empty or "undefined" in HTML; ensure
      you only include meta objects when their content is defined by either
      conditionally adding the { name: 'description', content: description } and {
      name: 'keywords', content: keywords } entries only if description/keywords are
      non-null/undefined, or build the array then filter out items with undefined
      content (e.g., .filter(tag => tag.content != null)) so no meta tag is emitted
      with undefined content.
      examples/solid/start-basic-nitro/src/utils/seo.ts lines 20 to 22
      @@ -0,0 +2,21 @@
      2+ title,
      3+ description,
      4+ keywords,
      5+ image,
      6+}: {
      7+ title: string
      8+ description?: string
      9+ image?: string
      10+ keywords?: string
      11+}) => {
      12+ const tags = [
      13+ { title },
      14+ { name: 'description', content: description },
      15+ { name: 'keywords', content: keywords },
      16+ { name: 'twitter:title', content: title },
      17+ { name: 'twitter:description', content: description },
      18+ { name: 'twitter:creator', content: '@tannerlinsley' },
      19+ { name: 'twitter:site', content: '@tannerlinsley' },
      20+ { name: 'og:type', content: 'website' },
      21+ { name: 'og:title', content: title },
      22+ { name: 'og:description', content: description },

      ⚠️ Potential issue | 🟠 Major

      Use property attribute for Open Graph tags.

      Open Graph protocol specifies property instead of name for OG meta tags. Using name may cause these tags to be ignored by social media crawlers.

      Apply this diff:

      -    { name: 'og:type', content: 'website' },
      -    { name: 'og:title', content: title },
      -    { name: 'og:description', content: description },
      +    { property: 'og:type', content: 'website' },
      +    { property: 'og:title', content: title },
      +    ...(description ? [{ property: 'og:description', content: description }] : []),
      📝 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.

          { property: 'og:type', content: 'website' },
          { property: 'og:title', content: title },
          ...(description ? [{ property: 'og:description', content: description }] : []),
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-nitro/src/utils/seo.ts around lines 20 to 22, the
      Open Graph meta entries use the `name` attribute instead of the required
      `property` attribute; update those entries to use `property` keys (e.g., replace
      `{ name: 'og:type', ... }` with `{ property: 'og:type', ... }`, and likewise for
      `og:title` and `og:description`) so social crawlers recognize them, keeping the
      content values unchanged and leaving non-OG meta entries as-is.
      examples/solid/start-basic-nitro/src/utils/seo.ts lines 23 to 29
      @@ -0,0 +9,21 @@
      9+ image?: string
      10+ keywords?: string
      11+}) => {
      12+ const tags = [
      13+ { title },
      14+ { name: 'description', content: description },
      15+ { name: 'keywords', content: keywords },
      16+ { name: 'twitter:title', content: title },
      17+ { name: 'twitter:description', content: description },
      18+ { name: 'twitter:creator', content: '@tannerlinsley' },
      19+ { name: 'twitter:site', content: '@tannerlinsley' },
      20+ { name: 'og:type', content: 'website' },
      21+ { name: 'og:title', content: title },
      22+ { name: 'og:description', content: description },
      23+ ...(image
      24+ ? [
      25+ { name: 'twitter:image', content: image },
      26+ { name: 'twitter:card', content: 'summary_large_image' },
      27+ { name: 'og:image', content: image },
      28+ ]
      29+ : []),

      ⚠️ Potential issue | 🟠 Major

      Use property for Open Graph image tag.

      Line 27 should use property instead of name for consistency with Open Graph protocol.

      Apply this diff:

           ...(image
             ? [
                 { name: 'twitter:image', content: image },
                 { name: 'twitter:card', content: 'summary_large_image' },
      -          { name: 'og:image', content: image },
      +          { property: 'og:image', content: image },
               ]
             : []),
      🤖 Prompt for AI Agents
      In examples/solid/start-basic-nitro/src/utils/seo.ts around lines 23 to 29, the
      Open Graph image meta entry is using the `name` key but should use `property` to
      conform to the Open Graph protocol; update the object { name: 'og:image',
      content: image } to use property: 'og:image' (i.e., replace the `name` key with
      `property`) so the generated meta tag uses property="og:image" while leaving the
      twitter and card entries unchanged.

Sign in to join this conversation.