Tip
We're working on a monorepo version of this template with Turborepo. See the next branch if you want to try it out. (#45)
A minimal starter template for ποΈ TanStack Start. β Preview here
- React 19 + React Compiler
- TanStack Start + Router + Query
- Tailwind CSS + shadcn/ui + Base UI
- Vite 8 (beta) + Nitro v3 (nightly)
- Drizzle ORM + PostgreSQL
- Better Auth
-
Use this template or clone this repository with gitpick:
npx gitpick mugnavo/tanstarter myapp cd myapp -
Install dependencies:
pnpm install
-
Create a
.envfile based on.env.example. -
Push the schema to your database with drizzle-kit:
pnpm db push
-
Run the development server:
pnpm dev
The development server should now be running at http://localhost:3000.
The vite config is currently configured to use Nitro v3 to deploy on Netlify, but supports many other deployment presets like Vercel and Node.
While Nitro provides a great multi-provider default, the official @netlify/vite-plugin-tanstack-start is also available for Netlify deployments.
Refer to the TanStack Start hosting docs for deploying to other platforms.
- Router/Start issues - TanStack Start is in RC.
- Devtools releases - TanStack Devtools is in alpha and may still have breaking changes.
- Vite 8 beta - We're using Vite 8 beta which is powered by Rolldown.
- Nitro v3 nightly - The template is configured with Nitro v3 nightly by default.
We use pnpm by default, but you can modify these scripts in package.json to use your preferred package manager.
auth:generate- Regenerate the auth db schema if you've made changes to your Better Auth config.db- Run drizzle-kit commands. (e.g.pnpm db generate,pnpm db studio)ui- The shadcn/ui CLI. (e.g.pnpm ui add button)format,lint,check-types- Run Prettier, ESLint, and check TypeScript types respectively.check- Run all three above. (e.g.pnpm check)
deps- Selectively upgrade dependencies via taze.
auth/middleware.ts- Sample middleware for forcing authentication on server functions. (see #5 and #17)theme-toggle.tsx,theme-provider.tsx- A theme toggle and provider for toggling between light and dark mode. (#7)
Code in this template is public domain via Unlicense. Feel free to remove or replace for your own project.
- TanStack CLI & MCP - The official CLI, MCP server, and AI toolkit for TanStack. Create and customize TanStack Start apps, search docs, integrate with AI agents, and more.
- awesome-tanstack-start - A curated list of awesome resources for TanStack Start.
- shadcn/ui Directory, MCP, shoogle.dev - Component directories & registries for shadcn/ui.