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-maia,
--preset b1ZOKpgEC) - Drizzle ORM v1 (beta) + PostgreSQL
- Better Auth
βββ apps
β βββ web # TanStack Start web app
βββ packages
β βββ auth # Better Auth
β βββ db # Drizzle ORM + Drizzle Kit + PostgreSQL
β βββ ui # shadcn/ui primitives & utils
βββ tooling
β βββ tsconfig # Shared TypeScript configuration
βββ vite.config.ts
βββ LICENSE
βββ README.md-
Use this template or create a project using our CLI:
pnpm create mugnavo -t monorepo -
Create
.envfiles in/apps/weband/packages/dbbased on their respective.env.examplefiles. -
Generate the initial migration with drizzle-kit, then apply to your database:
pnpm db generate pnpm db migrate
-
Run the development server:
pnpm dev
The 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 "pnpm run --recursive --parallel dev"
# or
./dev.sh web # runs "pnpm run --filter=@repo/web dev"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.
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.
Important
Task caching is currently disabled in the root vite.config.ts since Vite+ only replays terminal output for now, not build artifacts. If your platform preserves build outputs between deployments, you can re-enable it. See this issue for more details.
- Router/Start issues - TanStack Start is in RC.
- Devtools releases - TanStack Devtools is in alpha and may still have breaking changes.
- Nitro v3 beta - This template is configured with Nitro v3 beta by default.
- Drizzle ORM v1 Beta - Drizzle ORM v1 is in beta with relations v2.
- Better Auth experimental Drizzle adapter - We're using a separate branch of Better Auth's Drizzle adapter that supports Drizzle relations v2.
- Vite+ issues - Vite+ is in alpha.
We use Vite+ Commit Hooks to run git hooks with the following tools:
vp staged- Run Oxfmt to format staged files on commit (pre-commit).
This template is configured for pnpm by default. 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.pnpm ui add button)format,lint- Run Oxfmt and Oxlint, or both viapnpm check.deps- Selectively upgrade dependencies via taze.
Note
To switch to another package manager (e.g., bun or npm), you'll need to replace or remove pnpm-workspace.yaml, which uses pnpm catalogs. Bun and Yarn have their own equivalents, but the file formats may differ.
/auth/src/tanstack/middleware.ts- Sample middleware for forcing authentication on server functions./web/src/components/theme-toggle.tsx,/ui/lib/theme-provider.tsx- A theme toggle and provider for toggling between light and dark mode.
Code in this template is public domain via Unlicense. Feel free to remove or replace for your own project.
- @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, MCP, shoogle.dev - Component directories & registries for shadcn/ui.