TanStarter
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
Getting Started
-
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.
Deploying to production
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.
Issue watchlist
- 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.
Goodies
Scripts
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.
Utilities
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)
License
Code in this template is public domain via Unlicense. Feel free to remove or replace for your own project.
Also check out
- 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.