ViteReactSaaS启动器

cove — Vite SaaS模板

作者 mugnavo

Cove 是一个基于 TanStack Start 的最小化启动模板,集成 React、Tailwind CSS、shadcn/ui、Drizzle ORM 与 Better Auth,适合快速搭建带认证和数据库的全栈应用。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

2 个预览视图
桌面端首页1 / 2
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 2

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-02查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

基于 TanStack Start 的最小化全栈启动模板,集成 React、TanStack Router 与 Query

02

使用 Tailwind CSS、shadcn/ui 和 Base UI 预设构建界面

03

内置 Drizzle ORM 与 PostgreSQL 数据库层,配合 drizzle-kit 管理迁移

04

集成 Better Auth 认证,并提供认证中间件示例

05

通过 Vite Plus 与 Nitro 支持多种部署预设,如 Netlify、Vercel、Node.js

06

代码采用 Unlicense 公有领域许可,可自由修改或替换

模板详细介绍

Cove 是 mugnavo 维护的 TanStack Start 最小化启动模板,前身为 TanStarter。它把 React、TanStack Start/Router/Query、Tailwind CSS、shadcn/ui(Base UI 预设)、Drizzle ORM + PostgreSQL、Better Auth、Vite Plus 与 Nitro 组合在一起,用于快速创建带认证和数据库的全栈项目。

模板提供 CLI 创建方式(pnpm create cove),也支持通过 GitHub 模板仓库生成项目。环境变量由 Varlock 管理,在 .env.schema 中定义契约并生成类型,本地值写入 .env.local。数据库迁移使用 drizzle-kit,通过 vpr db generate 和 vpr db migrate 完成。开发服务器默认运行在 localhost:3000。

模板内置认证中间件示例、明暗主题切换组件,以及基于 Vitest 和 Playwright 的轻量测试基础。日志通过 evlog 接入 Nitro,每个请求输出一条结构化事件,生产环境需要自行添加 drain。部署方面,vite.config.ts 默认使用 Nitro,支持 Netlify、Vercel、Node.js 等预设。

需要注意:TanStack Start 处于 RC 阶段,TanStack Devtools 处于 alpha,Nitro v3 为 beta,Drizzle ORM v1 为 RC,依赖版本被固定,创建项目时可能略有过时。代码采用 Unlicense 许可,属于公有领域,可自由修改或替换。

ViteReactSaaS启动器

适合你的项目吗?

适用场景

  • 快速创建带用户认证和 PostgreSQL 数据库的全栈 Web 应用原型
  • 作为 TanStack Start 项目的起点,按需增删功能模块
  • 学习 TanStack Start、Drizzle ORM 与 Better Auth 的集成方式
  • 需要可自由修改、无版权限制的启动模板时使用

适合人群

  • 熟悉 React、TypeScript 和 pnpm 的前端或全栈开发者
  • 希望使用 TanStack Start 生态构建 SaaS 或启动器类项目的团队
  • 需要轻量、可定制、无强制版权约束的模板的个人或组织

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    需要 Node.js >= 24、pnpm >= 12 以及 Vite Plus(vp)

  2. 2

    通过 pnpm create cove 或 GitHub 模板创建项目

  3. 3

    根据 .env.schema 创建 .env.local 并运行 vpr env:load 校验环境变量

  4. 4

    使用 vpr db generate 和 vpr db migrate 生成并应用数据库迁移

  5. 5

    运行 vpr dev 启动开发服务器,默认地址为 http://localhost:3000

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 Unlicense 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费复制、修改、发布、使用、编译、销售和分发该版本代码,包括商业用途。
  • 作者通过公有领域贡献声明放弃相关版权;该声明的法律效果取决于适用司法辖区。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 使用前必须自行创建 .env.local 并按 .env.schema 填写环境变量(含密钥),否则无法运行。
  • 需要自备 PostgreSQL 数据库并执行迁移,模板本身不提供数据库服务。
  • 生产环境日志需自行接入第三方 drain 服务,可能产生外部服务费用。
  • TanStack Start 处于 RC 阶段,可能存在不稳定性或破坏性变更。
  • TanStack Devtools 处于 alpha,可能有破坏性变更。
  • 默认使用 Nitro v3 beta,属于测试版软件。
  • Drizzle ORM v1 为 RC 版本,可能存在变更。
  • 依赖版本被固定,创建项目时可能已略有过时,需自行升级。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 Unlicense 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

for any purpose, commercial or non-commercial, and by any means

许可证原文

Create a `.env.local` file with your values, based on [`.env.schema`](./.env.schema), then validate them

README 原文

Generate the initial migration with drizzle-kit, then apply to your database

README 原文

Add a [drain](https://www.evlog.dev/integrate/adapters/overview) when production needs logs sent to your chosen provider.

README 原文

TanStack Start is in RC.

README 原文

TanStack Devtools is in alpha and may still have breaking changes.

README 原文

The template is configured with Nitro v3 beta by default.

README 原文

Drizzle ORM v1 is in RC with relations v2.

README 原文

Dependency versions are pinned, so they may be slightly outdated when you create your project.

README 原文
https://github.com/mugnavo/cove/blob/main/LICENSEhttps://github.com/mugnavo/cove/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-02。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 100 / 100
技术栈
Vite · React
网站类型
SaaS · 启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-10-02
截图检查日期
2026-10-02

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Vite。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。

查看当时使用的来源资料

SHA-256: bf4a9d62f4349b42c1ded77af9dc2e0896f75563cbe55cf1a7fb6233609c2571

2026-10-02T22:04:02.062Z

来源文件 / 仓库
# [Cove Stack](https://github.com/mugnavo/cove)

<!-- scaffold:description -->

A minimal starter stack for 🏝️ TanStack Start. [→ Preview here](https://cove.mugnavo.com/)

> [!NOTE]
> [TanStarter is now Cove Stack.](https://github.com/mugnavo/cove/issues/96)

```bash
pnpm create cove
```

- [React](https://react.dev) + TanStack [Start](https://tanstack.com/start/latest) + [Router](https://tanstack.com/router/latest) + [Query](https://tanstack.com/query/latest)
- [Tailwind CSS](https://tailwindcss.com/) + [shadcn/ui](https://ui.shadcn.com/) + [Base UI](https://base-ui.com/) (base-rhea, [`--preset b1au68YWO`](https://ui.shadcn.com/create?preset=b1au68YWO&base=base&template=start&pointer=true))
- [Drizzle ORM](https://orm.drizzle.team/) + PostgreSQL
- [Better Auth](https://better-auth.com/)
- [Vite Plus](https://viteplus.dev/) + [Nitro](https://nitro.build/)

> [!TIP]
> This template is also available as a monorepo, powered by Vite+ and pnpm workspaces. See [mugnavo/cove-monorepo](https://github.com/mugnavo/cove-monorepo).

## Getting Started

#### Prerequisites

- [Node.js](https://nodejs.org/en/download) >= 24
- [pnpm](https://pnpm.io/installation) >= 12
- [Vite Plus](https://viteplus.dev/guide/#install-vp) (`vp`)

#### Setup

1. [Use this template](https://github.com/new?template_name=cove&template_owner=mugnavo) or create a project using our CLI:

   ```bash
   pnpm create cove
   ```

2. Create a `.env.local` file with your values, based on [`.env.schema`](./.env.schema), then validate them:

   ```sh
   vpr env:load
   ```

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

   ```sh
   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](http://localhost:3000).

## Environment variables

[Varlock](https://varlock.dev/) 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.

## Logging

[evlog](https://www.evlog.dev/) is wired into the app through Nitro and emits one structured event per request. Add a [drain](https://www.evlog.dev/integrate/adapters/overview) when production needs logs sent to your chosen provider.

## Deploying to production

[![Netlify Status](https://api.netlify.com/api/v1/badges/66acdee6-8e42-436f-9943-a67cad998f63/deploy-status)](https://app.netlify.com/projects/mugnavo-cove/deploys)

The [vite config](./vite.config.ts) is configured to use Nitro by default, which supports many [deployment presets](https://nitro.build/deploy) like Netlify, Vercel, Node.js, and more.

Refer to the [TanStack Start hosting docs](https://tanstack.com/start/latest/docs/framework/react/guide/hosting) for more information.

## Issue watchlist

- [Router/Start issues](https://github.com/TanStack/router/issues) - TanStack Start is in RC.
- [Devtools releases](https://github.com/TanStack/devtools/releases) - TanStack Devtools is in alpha and may still have breaking changes.
- [Nitro v3 beta](https://nitro.build/blog/v3-beta) - The template is configured with Nitro v3 beta by default.
- [Drizzle ORM v1 RC](https://orm.drizzle.team/docs/relations-v1-v2) - Drizzle ORM v1 is in RC with relations v2.

## 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](./package.json) for the full list of available scripts.

- **`auth:generate`** - Regenerate the [auth db schema](./src/lib/db/schema/auth.schema.ts) if you've made changes to your Better Auth [config](./src/lib/auth/auth.ts).
- **`db`** - Run [drizzle-kit](https://orm.drizzle.team/docs/kit-overview) 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`](./src/lib/auth/middleware.ts) - Sample middleware for enforcing authentication on server functions & API routes.
- [`theme-toggle.tsx`](./src/components/theme-toggle.tsx), [`theme-provider.tsx`](./src/components/theme-provider.tsx) - A theme toggle and provider for toggling between light and dark mode.

#### Testing

The [testing foundation](./.agents/testing.md) 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](./LICENSE). Feel free to remove or replace for your own project.

## Ecosystem

- [@tanstack/intent](https://tanstack.com/intent/latest/docs/getting-started/quick-start-consumers) - Up-to-date skills for your AI agents, auto-synchronized from your installed dependencies.
- [awesome-tanstack-start](https://github.com/Balastrong/awesome-tanstack-start) - A curated list of awesome resources for TanStack Start.
- [shadcn/ui Directory](https://ui.shadcn.com/docs/directory), [shoogle.dev](https://shoogle.dev/) - Component directories & registries for shadcn/ui.

## Related templates

- [mugnavo/cove-monorepo](https://github.com/mugnavo/cove-monorepo) - A minimal monorepo version of this template, powered by Vite+ and pnpm workspaces.
- [tsu-moe/tsu-stack](https://github.com/tsu-moe/tsu-stack) - An opinionated and batteries-included monorepo template from Luzefiru, built on cove-monorepo, with Paraglide.js (i18n), Hono, oRPC, and more.
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。