TanStarter Monorepo
August 13, 2026 ยท View on GitHub
A minimal monorepo starter for ๐๏ธ TanStack Start, based on mugnavo/tanstarter.
pnpm create mugnavo -t monorepo
- Vite Plus + pnpm workspaces with catalogs
- React 19 + React Compiler
- TanStack Start + Router + Query + Form
- Vite 8 + Nitro v3
- Tailwind CSS + shadcn/ui + Base UI (base-rhea,
--preset b1au68YWO) - Drizzle ORM v1 + PostgreSQL
- Better Auth
โโโ apps
โ โโโ web # TanStack Start web app
โโโ packages
โ โโโ auth # Better Auth
โ โโโ db # Drizzle ORM + Drizzle Kit + PostgreSQL
โ โโโ ui # shadcn/ui primitives & utils
โโโ tools
โ โโโ tsconfig # Shared TypeScript configuration
โโโ vite.config.ts
โโโ LICENSE
โโโ README.md
Table of Contents
Getting Started
Prerequisites
Setup
-
Use this template or create a project using our CLI:
pnpm create mugnavo -t monorepo -
Create a
.envfile in/apps/webbased on.env.example. -
Generate the initial migration with drizzle-kit, then apply to your database:
vpr db generate vpr db migrate -
Run the development server:
vpr devThe development server should now be running at http://localhost:3000.
Tip
If you want to run a local Postgres instance via Docker Compose with the dev server, you can use the dev.sh script:
./dev.sh # runs "vp run --recursive --parallel dev"
# or
./dev.sh web # runs "vp run --filter=@repo/web dev"
Deploying to production
The vite config is configured to use Nitro by default, which supports many deployment presets like Netlify, Vercel, Node.js, and more.
Refer to the TanStack Start hosting docs for more information.
Build caching
Vite+ has support for caching via Vite Task. A build task is configured in apps/web/vite.config.ts that can enable faster builds via caching. When deploying, use vp run build as the build command.
Issue watchlist
- Router/Start issues - TanStack Start is in RC.
- Devtools releases - TanStack Devtools is in alpha and may still have breaking changes.
- Nitro v3 nightly - This template is configured with Nitro v3 nightly by default. Consider switching to v3 stable once it's released.
- Drizzle ORM v1 RC - Drizzle ORM v1 is in RC with relations v2.
- Better Auth releases - We're using Better Auth v1.7 RC which supports Drizzle Relations v2.
- Vite+ releases - Vite+ is in beta.
Goodies
Upgrading dependencies
Dependency versions are pinned, so they may be slightly outdated when you create your project. To selectively upgrade packages, run vpr deps or vpx taze@latest -Ilwr --maturity-period 3.
Scripts
Check the root package.json and each workspace package's package.json for the full list of available scripts.
auth:generate- Regenerate the auth db schema if you've made changes to your Better Auth config.ui- The shadcn/ui CLI. (e.g.vpr ui add button)format,lint- Run Oxfmt and Oxlint, or both viavpr check.deps- Selectively upgrade dependencies via taze.
Utilities
/auth/src/tanstack/middleware.ts- Sample middleware for enforcing authentication on server functions & API routes./web/src/components/theme-toggle.tsx,/ui/lib/theme-provider.tsx- A theme toggle and provider for toggling between light and dark mode.
Testing
The testing foundation uses Vitest and Playwright and is intentionally lightweight. For short-lived prototypes, it can be safely ignored or removed.
vpr test(or Vite+'s built-invp test) runs the Vitest unit and local integration tests once.vpr test watchruns Vitest in watch mode.vpr test:e2ebuilds the app and runs the Playwright end-to-end tests.
License
Code in this template is public domain via Unlicense. Feel free to remove or replace for your own project.
Ecosystem
- @tanstack/intent - Up-to-date skills for your AI agents, auto-synchronized from your installed dependencies.
- awesome-tanstack-start - A curated list of awesome resources for TanStack Start.
- shadcn/ui Directory, shoogle.dev - Component directories & registries for shadcn/ui.
Related templates
- mugnavo/tanstarter - The original minimal version that this template is based on.
- tsu-moe/tsu-stack - An opinionated and batteries-included monorepo template from Luzefiru, built on tanstarter-monorepo, with Paraglide.js (i18n), Hono, oRPC, and more.