A minimal monorepo starter template for 🏝️ TanStack Start using Turborepo.
- Turborepo + pnpm
- React 19 + React Compiler
- TanStack Start + Router + Query + Form
- Vite 8 (beta) + Nitro v3 (nightly)
- Tailwind CSS + shadcn/ui + Base UI
- Prisma ORM + PostgreSQL
- Better Auth
- T3 Env
- Use this template or clone this repository with gitpick:
pnpm dlx gitpick shaneyu/tanstack-turbo myapp
cd myapp- Install dependencies:
pnpm install-
Create
.envfiles.-
Create a
./app/web/.envbased on .env.example. -
Create a
./packages/db/.envbased on .env.example.
Per-app
.envfiles make it clearer which vars belong to which task/app and works best with turborepo with it's caching. -
-
Push the schema to your database with prisma:
pnpm db pushhttps://www.prisma.io/docs/guides/data-migration
- Run the development server:
pnpm devThe development server should now be running at http://localhost:3000.
The vite config is currently configured to use Nitro v3 (nightly) to deploy on Vercel, but can be easily switched to other providers.
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 prisma 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 Biome 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/create-start - The official CLI tool from the TanStack team to create Start projects.
- awesome-tanstack-start - A curated list of awesome resources for TanStack Start.
- dotnize/react-tanstarter - Another amazing template that this monorepo template was inspired and based on.