Explore a TanStack app
Explore this working example of a TanStack app built with TanStack Router, Sentry, and Claude AI. This chat app uses Claude AI to answer questions.
TanStack Start is a React-based full-stack framework that is optimized for serving dynamic apps with an Enterprise-grade fully-featured routing system. TanStack Start is powered by TanStack Router, which you can use with any JavaScript framework. TanStack Start for Solid.js is also fully supported.
Explore a TanStack app
Explore this working example of a TanStack app built with TanStack Router, Sentry, and Claude AI. This chat app uses Claude AI to answer questions.
TanStack Start apps are fully supported on Netlify. SSR, Server Routes, Server Functions, and middleware are all seamlessly deployed to Netlify serverless functions.
TanStack Router offers a fully-featured routing system with deep TypeScript support and type-safe routing. You can use the TanStack router with any JavaScript based framework.
TanStack Router includes the following benefits:
Learn more about TanStack’s capabilities in the official TanStack docs.
To deploy a new TanStack Start app on Netlify, we recommend our official template but you can also deploy quickly with your own app.
This TanStack template app is built with TanStack Router, Sentry, and Claude AI.
You can deploy this app directly from the Netlify UI or by clicking the Deploy to Netlify button at the top of this page.
To deploy from the Netlify UI:
https://app.netlify.com/teams/<YOUR-TEAM-NAME>/projects
.create-tsrouter-app
From the terminal, you can generate your own TanStack starter app with this command:
npx create-tsrouter-app@latest --template file-router --add-ons tanchat,netlify
Next, you can follow these steps to deploy your app to Netlify or use the Netlify CLI.
If you’ve got your own Tanstack Start app and want to deploy to Netlify you should have the following configured in your project.
npm install -D @netlify/vite-plugin-tanstack-start
vite.config.ts
file, add the plugin:import { defineConfig } from 'vite'import { tanstackStart } from '@tanstack/react-start/plugin/vite'import netlify from '@netlify/vite-plugin-tanstack-start'
export default defineConfig({ plugins: [ // ... tanstackStart(), netlify(), ],})
netlify.toml
to your project with these contents:[build] command = "vite build" publish = "dist/client"
Alternatively, you can configure these build settings in the Netlify Dashboard. For your chosen project, go to project configuration and enter the settings above. Build & deploy Continuous deployment Build settings
Your site should successfully deploy on your next push. 🚀
If you’re using TanStack Start versions before 1.132.0, you’ll need to configure things differently:
Use the target: 'netlify'
option in your vite.config.ts
instead of the Netlify TanStack Start Vite plugin:
import { tanstackStart } from '@tanstack/react-start/plugin/vite'import { defineConfig } from 'vite'
export default defineConfig({ plugins: [tanstackStart({ target: 'netlify' })],})
Set your build command to dist
instead of dist/client
:
[build] command = "vite build" publish = "dist"
Use app.config.ts
instead of vite.config.ts
:
import { defineConfig } from '@tanstack/react-start/config'
export default defineConfig({ server: { preset: 'netlify', },})
Set your build command to vinxi build
instead of vite build
.
The Netlify TanStack Start Vite plugin provides all the benefits of the Netlify Vite plugin: full emulation of the production Netlify platform. This gives you the same platform primitives locally that your site uses in production.
You or an agent can access and build with the following features when running a TanStack Start dev server in your local development flow:
Learn more from the official TanStack docs.
Your feedback helps us improve our docs.