Skip to content

Conversation

@birkskyum
Copy link
Member

@birkskyum birkskyum commented Nov 12, 2025

Summary by CodeRabbit

  • New Features

    • Added a Solid quickstart example with TanStack Router integration, featuring routing, navigation, and Tailwind CSS styling.
  • Documentation

    • Added README with setup and run instructions for the Solid quickstart.
    • Updated router configuration to include the new code-based Solid quickstart example.

@github-actions github-actions bot added the documentation Everything documentation related label Nov 12, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

This pull request introduces a new Solid.js framework quickstart example for TanStack Router, including configuration entries in the documentation site and a complete starter project with build tooling, router setup, and example routes.

Changes

Cohort / File(s) Summary
Documentation Configuration
docs/router/config.json
Added Router Examples entry for Solid framework with a code-based Quickstart link.
Project Infrastructure
examples/solid/quickstart/.gitignore, examples/solid/quickstart/.vscode/settings.json, examples/solid/quickstart/README.md
Added standard project ignores, VSCode workspace settings to exclude generated route tree file, and setup/run instructions.
Build & Development Configuration
examples/solid/quickstart/package.json, examples/solid/quickstart/vite.config.js, examples/solid/quickstart/tsconfig.json, examples/solid/quickstart/postcss.config.mjs
Added project manifest with Solid, TanStack Router, Tailwind, and Vite dependencies; Vite configuration with Solid plugin; TypeScript configuration with strict mode and Solid JSX support; and PostCSS configuration for Tailwind.
Application Entry Point
examples/solid/quickstart/index.html
Added minimal HTML5 document with root element and module script entry point.
Source Code
examples/solid/quickstart/src/main.tsx, examples/solid/quickstart/src/styles.css
Added router initialization with root and child routes, module augmentation for router type safety, and Tailwind-based styling with light/dark theme support.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • package.json — Verify dependency versions align with TanStack Router's Solid support requirements.
  • src/main.tsx — Confirm router tree construction, route structure, and module augmentation pattern match TanStack conventions.
  • Configuration files — Ensure TypeScript, Vite, and PostCSS configs are consistent with project standards.

Possibly related PRs

Suggested reviewers

  • Insik-Han

Poem

🐰 A Solid quickstart hops into view,
With routes and styles so fresh and new,
Tailwind threads and router trees,
Type-safe flows that aim to please! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding a Solid router quickstart example with code-based implementation, matching the primary content of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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-router)--quickstart-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.

@nx-cloud
Copy link

nx-cloud bot commented Nov 12, 2025

View your CI Pipeline Execution ↗ for commit a5ec6fd

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 58s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-12 01:42:00 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 12, 2025

More templates

@tanstack/arktype-adapter

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

@tanstack/directive-functions-plugin

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

@tanstack/eslint-plugin-router

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/server-functions-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/zod-adapter

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

commit: a5ec6fd

@birkskyum birkskyum merged commit 80a9923 into main Nov 12, 2025
5 of 6 checks passed
@birkskyum birkskyum deleted the docs(solid-router)--quickstart-example branch November 12, 2025 01:43
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (4)
examples/solid/quickstart/README.md (1)

1-6: Enhance the README with more context.

The README is functional but quite minimal for a quickstart example. Consider adding:

  • A brief description of what this example demonstrates (code-based routing with Solid Router)
  • Key features shown in the example
  • Link to the full documentation
  • Any notable aspects of the setup (Tailwind CSS v4, router configuration, etc.)

Example enhancement:

# Solid Router Quickstart (Code-Based)

This example demonstrates a basic code-based routing setup with TanStack Solid Router and Tailwind CSS v4.

## Features

- Code-based route configuration
- TanStack Solid Router integration
- Tailwind CSS v4 styling
- Vite build setup

## Running the example

- `npm install` or `yarn`
- `npm start` or `yarn start`

## Learn More

- [TanStack Solid Router Documentation](https://tanstack.com/router/latest/docs/framework/solid/overview)
examples/solid/quickstart/tsconfig.json (1)

1-10: Consider adding common TypeScript compiler options.

While the current configuration works, it's missing some typical settings that could improve the development experience:

 {
   "compilerOptions": {
     "strict": true,
+    "target": "ES2022",
+    "module": "ESNext",
+    "moduleResolution": "bundler",
     "esModuleInterop": true,
     "jsx": "preserve",
     "jsxImportSource": "solid-js",
     "lib": ["DOM", "DOM.Iterable", "ES2022"],
-    "skipLibCheck": true
+    "skipLibCheck": true,
+    "isolatedModules": true,
+    "resolveJsonModule": true
-  }
+  },
+  "include": ["src"]
 }

These additions provide:

  • Explicit target and module settings
  • moduleResolution: "bundler" for Vite compatibility
  • isolatedModules: true ensures each file can be transpiled independently
  • resolveJsonModule: true for importing JSON files
  • include to scope TypeScript to the src directory
examples/solid/quickstart/index.html (1)

6-6: Consider a more descriptive title for the quickstart example.

The generic "Vite App" title could be updated to reflect that this is a TanStack Router quickstart (e.g., "TanStack Router - Solid Quickstart").

examples/solid/quickstart/src/styles.css (1)

3-18: Redundant border-color definitions.

The border color is set in two places:

  1. Lines 4-10: Base layer using var(--color-gray-200, currentcolor)
  2. Lines 16-18: Universal selector using @apply border-gray-200 dark:border-gray-800

The second definition will override the first. Consider removing one approach for clarity. Additionally, the CSS variable --color-gray-200 may not exist in Tailwind v4's default theme, as v4 uses OKLCH color space with different variable naming conventions.

Consider simplifying to just use the @apply approach:

-@layer base {
-  *,
-  ::after,
-  ::before,
-  ::backdrop,
-  ::file-selector-button {
-    border-color: var(--color-gray-200, currentcolor);
-  }
-}
-
 html {
   color-scheme: light dark;
 }

Alternatively, if you need the fallback, just use the base layer without the duplicate @apply:

 @layer base {
   *,
   ::after,
   ::before,
   ::backdrop,
   ::file-selector-button {
-    border-color: var(--color-gray-200, currentcolor);
+    border-color: theme('colors.gray.200');
   }
 }
 
 html {
   color-scheme: light dark;
 }
-* {
-  @apply border-gray-200 dark:border-gray-800;
-}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9727eb4 and a5ec6fd.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (11)
  • docs/router/config.json (1 hunks)
  • examples/solid/quickstart/.gitignore (1 hunks)
  • examples/solid/quickstart/.vscode/settings.json (1 hunks)
  • examples/solid/quickstart/README.md (1 hunks)
  • examples/solid/quickstart/index.html (1 hunks)
  • examples/solid/quickstart/package.json (1 hunks)
  • examples/solid/quickstart/postcss.config.mjs (1 hunks)
  • examples/solid/quickstart/src/main.tsx (1 hunks)
  • examples/solid/quickstart/src/styles.css (1 hunks)
  • examples/solid/quickstart/tsconfig.json (1 hunks)
  • examples/solid/quickstart/vite.config.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
examples/{react,solid}/**

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • examples/solid/quickstart/README.md
  • examples/solid/quickstart/postcss.config.mjs
  • examples/solid/quickstart/package.json
  • examples/solid/quickstart/src/styles.css
  • examples/solid/quickstart/src/main.tsx
  • examples/solid/quickstart/tsconfig.json
  • examples/solid/quickstart/index.html
  • examples/solid/quickstart/vite.config.js
**/package.json

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • examples/solid/quickstart/package.json
docs/{router,start}/**

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • docs/router/config.json
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • examples/solid/quickstart/src/main.tsx
🧠 Learnings (9)
📓 Common learnings
Learnt from: CR
Repo: TanStack/router PR: 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/
Learnt from: CR
Repo: TanStack/router PR: 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
Repo: TanStack/router PR: 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:

  • examples/solid/quickstart/package.json
  • examples/solid/quickstart/src/main.tsx
  • examples/solid/quickstart/tsconfig.json
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-cli,router-generator,router-plugin,virtual-file-routes}/** : Keep CLI, generators, bundler plugins, and virtual file routing utilities in their dedicated tooling package directories

Applied to files:

  • examples/solid/quickstart/package.json
📚 Learning: 2025-11-02T16:16:24.898Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5732
File: packages/start-client-core/src/client/hydrateStart.ts:6-9
Timestamp: 2025-11-02T16:16:24.898Z
Learning: In packages/start-client-core/src/client/hydrateStart.ts, the `import/no-duplicates` ESLint disable is necessary for imports from `#tanstack-router-entry` and `#tanstack-start-entry` because both aliases resolve to the same placeholder file (`fake-start-entry.js`) in package.json during static analysis, even though they resolve to different files at runtime.

Applied to files:

  • examples/solid/quickstart/package.json
  • examples/solid/quickstart/src/main.tsx
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 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/router/config.json
  • examples/solid/quickstart/src/main.tsx
📚 Learning: 2025-10-08T08:11:47.088Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5402
File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21
Timestamp: 2025-10-08T08:11:47.088Z
Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.

Applied to files:

  • examples/solid/quickstart/src/main.tsx
  • examples/solid/quickstart/.vscode/settings.json
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/router-core/** : Keep framework-agnostic core router logic in packages/router-core/

Applied to files:

  • examples/solid/quickstart/src/main.tsx
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 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/quickstart/tsconfig.json
📚 Learning: 2025-10-01T18:31:35.420Z
Learnt from: schiller-manuel
Repo: TanStack/router PR: 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/quickstart/.vscode/settings.json
🔇 Additional comments (12)
examples/solid/quickstart/.gitignore (1)

1-5: LGTM! Standard gitignore entries.

The gitignore entries are appropriate for a Vite-based Solid.js project.

examples/solid/quickstart/vite.config.js (1)

1-7: LGTM! Minimal and correct Vite configuration.

The configuration appropriately sets up Vite with the Solid plugin for this quickstart example.

examples/solid/quickstart/.vscode/settings.json (1)

1-11: LGTM! Appropriate VSCode settings for generated files.

These settings correctly exclude the autogenerated routeTree.gen.ts from watchers and search, and mark it as read-only to prevent accidental modifications.

docs/router/config.json (1)

613-616: LGTM! Correct documentation menu entry.

The new "Quickstart (code-based)" entry for Solid framework follows the existing pattern used for React examples and is properly positioned.

examples/solid/quickstart/postcss.config.mjs (1)

1-5: LGTM! Correct Tailwind CSS v4 configuration.

This PostCSS configuration correctly uses the @tailwindcss/postcss plugin for Tailwind CSS v4's new architecture. The empty configuration object is appropriate since Tailwind v4 moves theme configuration to CSS using the @theme directive.

examples/solid/quickstart/src/main.tsx (5)

1-11: LGTM!

Imports are correctly structured for a Solid.js + TanStack Router application.


31-49: LGTM!

Route definitions are clean and follow proper patterns for TanStack Router.


51-63: LGTM!

Router configuration and type augmentation are correctly implemented, providing good type safety for the application.


65-69: LGTM!

The conditional rendering based on innerHTML is a good practice to prevent double rendering during development with Hot Module Replacement.


17-22: No issues found. The arbitrary variant syntax is correctly implemented.

The Solid Router Link component applies an active class by default, and the [&.active]:font-bold selector correctly targets the link element when it has the active class. This pattern is consistently used throughout the codebase.

examples/solid/quickstart/src/styles.css (2)

1-1: LGTM!

The @import 'tailwindcss'; syntax is correct for Tailwind CSS v4.


19-21: LGTM!

Body styling with light and dark mode variants is correctly implemented.

"dev": "vite --port 3000",
"build": "vite build && tsc --noEmit",
"serve": "vite preview",
"start": "vite"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Clarify the purpose of the "start" script.

The "start" script currently runs vite which is identical to the "dev" script. Typically, "start" would serve a production build. Consider either:

  • Using "start": "vite preview" to serve the production build
  • Removing the "start" script if it's not needed
  • Documenting why it duplicates "dev"
   "scripts": {
     "dev": "vite --port 3000",
     "build": "vite build && tsc --noEmit",
     "serve": "vite preview",
-    "start": "vite"
+    "start": "vite --port 3000"
   },

Note: If you want "start" to serve production, use:

-    "start": "vite"
+    "start": "npm run serve"

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In examples/solid/quickstart/package.json around line 9, the "start" script
duplicates "dev" by running "vite"; change it to a production preview or remove
it: replace with "vite preview" to serve the built production site (and ensure a
build script exists/run before preview), or delete the "start" entry if you
don't need a separate production entry, or add a comment in README explaining
why it intentionally mirrors "dev".

Comment on lines +13 to +14
"@tanstack/solid-router": "^1.135.2",
"@tanstack/solid-router-devtools": "^1.135.2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Use workspace: protocol for internal dependencies.*

According to the coding guidelines, internal TanStack dependencies should use the workspace:* protocol in monorepo package.json files.

As per coding guidelines.

   "dependencies": {
     "@tailwindcss/postcss": "^4.1.15",
-    "@tanstack/solid-router": "^1.135.2",
-    "@tanstack/solid-router-devtools": "^1.135.2",
+    "@tanstack/solid-router": "workspace:*",
+    "@tanstack/solid-router-devtools": "workspace:*",
     "postcss": "^8.5.1",
     "solid-js": "^1.9.10",
     "tailwindcss": "^4.1.15"
   },
📝 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.

Suggested change
"@tanstack/solid-router": "^1.135.2",
"@tanstack/solid-router-devtools": "^1.135.2",
"@tailwindcss/postcss": "^4.1.15",
"@tanstack/solid-router": "workspace:*",
"@tanstack/solid-router-devtools": "workspace:*",
"postcss": "^8.5.1",
"solid-js": "^1.9.10",
"tailwindcss": "^4.1.15"
🤖 Prompt for AI Agents
In examples/solid/quickstart/package.json around lines 13 to 14, the internal
TanStack packages "@tanstack/solid-router" and "@tanstack/solid-router-devtools"
are pinned to explicit versions; change their dependency entries to use the
workspace:* protocol (e.g., "workspace:*") so the monorepo resolves local
packages via workspace references, updating the two lines accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Everything documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants