️ minimal TanStack Start template with Vite+, Better Auth, Drizzle ORM, shadcn/ui
️ minimal TanStack Start template with Vite+, Better Auth, Drizzle ORM, shadcn/ui
A minimal starter template for ️ TanStack Start. → Preview here
pnpm create mugnavo--preset b1au68YWO)[!TIP] This template is also available as a monorepo, powered by Vite+ and pnpm workspaces. See mugnavo/tanstarter-monorepo.
Use this template or create a project using our CLI:
pnpm create mugnavoCreate a .env.local file with your values, based on .env.schema, then validate them:
vpr env:loadGenerate the initial migration with drizzle-kit, then apply to your database:
vpr db generate
vpr db migrateRun the development server:
vpr devThe development server should now be running at http://localhost:3000.
Varlock keeps the environment-variable contract in .env.schema and generates types from it. Put local values, including secrets, in the uncommitted .env.local, then run vpr env:load to validate them.
In application code, import { ENV } from "varlock/env" instead of reading process.env directly.
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.
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 -Ilw --maturity-period 3.
Check 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.db - Run drizzle-kit commands. (e.g. vpr db generate, vpr db studio)ui - The shadcn/ui CLI. (e.g. vpr ui add button)format, lint - Run Oxfmt and Oxlint, or both via vpr check.deps - Selectively upgrade dependencies via taze.auth/middleware.ts - Sample middleware for enforcing authentication on server functions & API routes.theme-toggle.tsx, theme-provider.tsx - A theme toggle and provider for toggling between light and dark mode.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-in vp test) runs the Vitest unit and local integration tests once.vpr test watch runs Vitest in watch mode.vpr test:e2e builds the app and runs the Playwright end-to-end tests.Code in this template is public domain via Unlicense. Feel free to remove or replace for your own project.
No open issues yet, or sync has not completed.