Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

tanstarter

> 前端框架
Open source

️ minimal TanStack Start template with Vite+, Better Auth, Drizzle ORM, shadcn/ui

1.3K stars0 likes0 views
WebsiteGitHub

About

️ minimal TanStack Start template with Vite+, Better Auth, Drizzle ORM, shadcn/ui

TanStarter

A minimal starter template for ️ TanStack Start. → Preview here

bash
pnpm create mugnavo
  • React + TanStack Start + Router + Query
  • Tailwind CSS + shadcn/ui + Base UI (base-rhea, --preset b1au68YWO)
  • Drizzle ORM + PostgreSQL
  • Better Auth
  • Vite Plus + Nitro

[!TIP] This template is also available as a monorepo, powered by Vite+ and pnpm workspaces. See mugnavo/tanstarter-monorepo.

Getting Started

Prerequisites

  • Node.js >= 24
  • pnpm >= 12
  • Vite Plus (vp)

Setup

  1. Use this template or create a project using our CLI:

    bash
    pnpm create mugnavo
  2. Create a .env.local file with your values, based on .env.schema, then validate them:

    bash
    vpr env:load
  3. Generate the initial migration with drizzle-kit, then apply to your database:

    bash
    vpr db generate
    vpr db migrate

    https://orm.drizzle.team/docs/migrations

  4. Run the development server:

    bash
    vpr dev

    The development server should now be running at http://localhost:3000.

Environment variables

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.

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.

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 beta - The template is configured with Nitro v3 beta by default.
  • Drizzle ORM v1 RC - Drizzle ORM v1 is in RC with 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 -Ilw --maturity-period 3.

Scripts

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.

Utilities

  • 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.

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-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.

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-monorepo - A minimal monorepo version of this template, powered by Vite+ and pnpm workspaces.
  • 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.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptbetter-authboilerplatedrizzlepostgresql

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架