Next.jsReactSaaS启动器

nextjs-saas-starter — Next.js SaaS模板

作者 Indie-Kit

Indie Kit 的开源 Lite 版 Next.js SaaS 启动器,包含认证、数据库、订阅支付与预置页面,并附带面向 LLM 的 AI 上下文规则。

看看你的网站会是什么样

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

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

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

全部页面与视图 3

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

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

值得关注的模板亮点

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

01

基于 Next.js App Router,搭配 Tailwind CSS 与 Shadcn UI 构建界面

02

使用 Better Auth 提供社交登录与 Magic Link 认证

03

通过 Drizzle ORM 连接 Supabase、Neon 或任意 PostgreSQL 数据库

04

包含 Stripe 订阅 Webhook 与 UploadThing 文件上传的基础实现

05

预置落地页、登录注册页、应用布局与隐私/条款等法律页面

06

仓库内含面向 Cursor、Windsurf、Copilot 的 AI 上下文规则与提示词库

模板详细介绍

这是 Indie Kit Pro 的开源 Lite 版本,仓库采用 MIT 许可,定位为用 Next.js 快速搭建 SaaS 的起点。代码基于 Next.js App Router,配合 Tailwind CSS 与 Shadcn UI 构建界面,认证使用 Better Auth(支持社交登录与 Magic Link),数据层采用 Drizzle ORM 并允许接入 Supabase、Neon 或任意 PostgreSQL 服务,支付侧提供 Stripe 订阅 Webhook,文件上传使用 UploadThing,内置深色模式。模板已包含落地页(Hero、功能、定价、FAQ)、登录注册页、应用布局(顶栏与用户资料)以及隐私与条款等法律页面。

该版本的一个显著特点是面向 AI 编码工具组织代码:仓库内提供 .cursor/rules、.claude/skills 等上下文规则与提示词库,让 Cursor、Windsurf、Copilot 等工具按既有模式生成代码,README 还说明可将 .claude 重命名为 .agent 以适配其他代理工具。

需要留意免费版与 Pro 版的边界:Stripe 订阅在免费版中为基础实现,Dodo Payments、Stripe Payments、Lemon Squeezy、PayPal、多租户、RBAC、用户模拟、超级管理员面板、按量计费、等待列表、MDX 博客与文档、Inngest 邮件序列等均只在 Pro 版提供。免费范围仅指该仓库代码,域名、托管、数据库、支付等外部服务可能另行收费,演示图片、字体、图标等第三方素材需单独核对许可。

Next.jsSaaS启动器

适合你的项目吗?

适用场景

  • 用 Next.js 从零搭建一个带认证与订阅计费的 SaaS 最小可行产品
  • 在 Cursor 或 Windsurf 等 AI 编码工具中,借助仓库内的规则与提示词生成功能代码
  • 需要接入 Supabase 或 Neon 等 PostgreSQL 服务并管理数据库 schema 的项目
  • 希望直接使用现成落地页、定价页与法律页面的独立开发者项目

适合人群

  • 熟悉 Next.js 与 TypeScript、希望快速启动 SaaS 的独立开发者
  • 习惯使用 AI 编码工具并希望代码库带有上下文规则的前端或全栈工程师
  • 需要免费 MIT 许可代码作为学习或二次开发基础的小型团队

上手与定制指南

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

  1. 1

    可通过 npx indiekit@latest 交互式脚手架创建项目,或手动克隆仓库后执行 pnpm install

  2. 2

    复制 .env.example 为 .env,并配置数据库 URL、Better Auth Secret、Stripe 密钥及可选社交登录密钥

  3. 3

    在 src/lib/config.ts 中填写项目名称、描述以及页脚和法律页面使用的邮箱、地址等信息

  4. 4

    新增或修改表结构后运行 pnpm run db:push 同步数据库 schema,再用 pnpm dev 启动开发服务器

  5. 5

    免费版不包含多租户、RBAC、多种支付渠道、MDX 博客文档等 Pro 功能,外部服务与第三方素材需自行核对费用与许可

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

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

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 本仓库仅为开源 Lite 版,Pro 版功能(多租户、RBAC、用户模拟、超级管理员面板、按量计费、等待列表、MDX 博客与文档、Inngest 邮件序列、Dodo/Stripe/Lemon Squeezy/PayPal 支付等)不包含在免费代码中,需另行付费升级。
  • 免费版仅提供基础 Stripe 订阅实现,完整支付能力属于 Pro 版,免费范围内不可获得。
  • 运行需自备 PostgreSQL 数据库(如 Supabase、Neon),数据库服务可能产生外部费用。
  • 支付功能需自行申请并配置 Stripe 密钥,Stripe 为外部付费服务。
  • 认证功能需自行生成并配置 Better Auth Secret。
  • 社交登录为可选项,需自行申请 Google/GitHub 等第三方 OAuth 凭据。
  • 文件上传依赖 UploadThing 外部服务,需自行注册账号并可能产生费用。
  • 项目资料提及可选付费版本或功能;本次仅收录公开免费代码,不包含付费升级。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

This is the **Open Source / Lite Version** of [Indie Kit Pro]

README 原文

**Stripe Subscriptions** | Basic | Full |

README 原文

**Database URL**: Use **Supabase**, **NeonDB**, or any PostgreSQL provider.

README 原文

**Stripe Keys**: For payment processing.

README 原文

**Better Auth Secret**: Run `npx auth secret` to generate.

README 原文

**Social Keys**: (Google/GitHub, optional).

README 原文

📁 **UploadThing** for file storage - Easy file uploads.

README 原文
https://github.com/Indie-Kit/nextjs-saas-starter/blob/main/LICENSE.mdhttps://github.com/Indie-Kit/nextjs-saas-starter/blob/main/README.md

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

项目核对记录与介绍依据

模板资料

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

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

这个项目需要核对什么

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

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

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

查看具体选型方法 →

介绍的制作与核对状态

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

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

查看当时使用的来源资料

SHA-256: ce9822d2732801995ed469fdc212e35b15aabe36d24879ca50d4b77a72852dab

2026-10-01T01:22:56.664Z

来源文件 / 仓库
# Indie Kit - The AI-Native Next.js Starter Kit

![Indie Kit](public/hero.png)

<div align="center">

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/Indie-Kit/nextjs-saas-starter)
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template?template=https://github.com/Indie-Kit/nextjs-saas-starter)

[![Star on GitHub](https://img.shields.io/github/stars/Indie-Kit/nextjs-saas-starter?style=social)](https://github.com/Indie-Kit/nextjs-saas-starter/stargazers)
[![Get Pro Version](https://img.shields.io/badge/Get%20Pro%20Version-Indie%20Kit-blue?style=for-the-badge)](https://indiekit.pro/?utm_source=github-starter&utm_medium=readme&utm_campaign=lite)
[![Join Discord](https://img.shields.io/badge/Discord-Join%20Community-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://indiekit.pro/app/discord)

</div>

# The AI-Native Next.js Starter Kit 🤖

**Engineered for modern development. Optimized for AI.**

This is the **Open Source / Lite Version** of [Indie Kit Pro](https://indiekit.pro/?utm_source=github-starter&utm_medium=readme&utm_campaign=lite). It combines a production-grade tech stack with **"AI Context Rules"** that empower LLMs (Cursor, Windsurf, Copilot) to understand your codebase, write bug-free code, and navigate your project autonomously.

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
[![Next.js](https://img.shields.io/badge/Next.js-16-black?style=for-the-badge)](https://nextjs.org/)
[![TypeScript](https://img.shields.io/badge/TypeScript-5-blue?style=for-the-badge)](https://www.typescriptlang.org/)

## 🚀 Features

### Core Stack - The Right Architecture

- 🏗️ **Next.js 16** (App Router) - Staying ahead of the curve.
- 🎨 **Tailwind CSS v4** + **Shadcn UI** - Beautiful, accessible UI.
- 🔐 **Better Auth** (Social + Magic Link) - Secure and simple.
- 🗄️ **Drizzle ORM** + **Bring Your Own Database** - Connect to **Supabase**, **Neon**, or any Postgres provider.
- 💳 **Stripe** Subscription Webhooks - Ready for monetization.
- 📁 **UploadThing** for file storage - Easy file uploads.
- 🌙 **Dark Mode** built-in - Because developers love it.

### Pre-built Pages

- 🏠 **Landing Page** (Hero, Features, Pricing, FAQ)
- 🔐 **Auth Pages** (Sign In, Sign Up)
- ⚙️ **App Layout** (Header, User Profile)
- 📄 **Legal Pages** (Privacy, Terms)

## 🤖 AI-Optimized Architecture

We've structured the codebase to be easily understood by LLMs (Cursor, Windsurf, Copilot, Antigravity). This means fewer hallucinations and better code generation, regardless of which tool you use.

- **Self-Documenting Code**: Your AI knows _exactly_ where auth lives (`.claude/skills/auth-handler`), how to migrate the DB (`.cursor/rules`), and where to put new components.
- **No Hallucinations**: We force the AI to use existing patterns (like `withAuthRequired`) instead of inventing broken ones.
- **One-Shot Prompts**: Paste a single command like `/bootstrap` and watch it scaffold your entire MVP plan.

💡 **Pro Tip**: To use this kit with Google's Antigravity or other AI agents that expect a `.agent` folder, simply rename `.claude` to `.agent`:

```bash
mv .claude .agent
```

## 🛠️ Getting Started

### ⚡️ Quick Start (Recommended)

Run the following command to scaffold a new project interactively:

```bash
npx indiekit@latest 
# or
pnpm dlx indiekit@latest
# or
yarn dlx indiekit@latest
```

This CLI will:
- 🚀 Scaffold the project instantly (no git history to remove).
- 🛠️ Guide you through setup options.
- 📦 Install dependencies automatically.

### 🐢 Manual Setup

If you prefer to clone the repo manually:

### 1. Clone & Install

```bash
git clone https://github.com/Indie-Kit/nextjs-saas-starter.git my-saas
cd my-saas
pnpm install
```

### 2. Environment Setup

Copy the example environment file and fill in your secrets:

```bash
cp .env.example .env
```

You will need:

- **Database URL**: Use **Supabase**, **NeonDB**, or any PostgreSQL provider.
- **Better Auth Secret**: Run `npx auth secret` to generate.
- **Stripe Keys**: For payment processing.
- **Social Keys**: (Google/GitHub, optional).

Also, update `src/lib/config.ts` with your project name, description, and legal details (email, address) which are used in the footer and legal pages.

### 3. Database Setup

```bash
# Sync database schema to the database after adding new tables or modifying existing tables
pnpm run db:push
```

### 4. Run Development Server

```bash
pnpm dev
```

Open [http://localhost:3000](http://localhost:3000) to see your app.

## 🧠 The AI "Brain" (Exclusive)

This kit is designed to be "read" by LLMs. It includes:

- **`.cursor/rules`**: Context-aware rules for Cursor to understand project structure.
- **Prompt Library**: Pre-written prompts to generate features, DB schemas, and tests.
- **Self-Correction**: Setup to help AI fix its own linting errors.
- **Skills**: Specialized instructions for the AI to handle Auth, DB, and Payments correctly.

## 💎 Indie Kit Pro vs Starter

This starter is perfect for learning and building simple MVPs. For serious production apps, check out **[Indie Kit Pro](https://indiekit.pro/?utm_source=github-starter&utm_medium=readme&utm_campaign=table)**.

| Feature                         | Starter (Free) | Indie Kit Pro |
| :------------------------------ | :------------: | :-----------: |
| **Next.js 16 App Router**       |       ✅       |      ✅       |
| **Better Auth**                 |       ✅       |      ✅       |
| **Postgres + Drizzle**          |       ✅       |      ✅       |
| **Stripe Subscriptions**        |     Basic      |     Full      |
| **AI Navigation Rules**         |     Basic      |   Advanced    |
| **Dodo Payments**               |       ❌       |      ✅       |
| **Stripe Payments**             |       ❌       |      ✅       |
| **Lemon Squeezy Payments**      |       ❌       |      ✅       |
| **PayPal Payments**             |       ❌       |      ✅       |
| **Multi-Tenancy (Teams/Orgs)**  |       ❌       |      ✅       |
| **Role-Based Access Control**   |       ❌       |      ✅       |
| **User Impersonation**          |       ❌       |      ✅       |
| **Super Admin Dashboard**       |       ❌       |      ✅       |
| **Credit System (Usage Based)** |       ❌       |      ✅       |
| **Waitlist System**             |       ❌       |      ✅       |
| **Blog & Docs (MDX)**           |       ❌       |      ✅       |
| **Email Sequences (Inngest)**   |       ❌       |      ✅       |
| **Documentation Site**          |       ❌       |      ✅       |
| **Priority Support**            |       ❌       |      ✅       |

**_Get 1-1 mentorship with CJ for free when you upgrade to Pro._**

[**👉 Upgrade to Pro**](https://indiekit.pro/?utm_source=github-starter&utm_medium=readme&utm_campaign=upgrade)

### See Pro in Action

<a href="https://www.youtube.com/watch?v=Nps1LFxy8A8" target="_blank">
  <img src="https://img.youtube.com/vi/Nps1LFxy8A8/maxresdefault.jpg" width="600" alt="Building SaaS with AI in minutes using Indie Kit" />
</a>

## 🤝 Community & Support

- **[Free Discord Community](https://indiekit.pro/app/discord)**: Join our community of indie hackers to ask questions and share your progress!
- **Twitter**: Follow [@cjsingg](https://x.com/cjsingg) for updates.
- **Issues**: Open a GitHub issue for bugs in the starter.

---

Built with ❤️ by [CJ](https://x.com/cjsingg).
反馈内容错误

看看同类模板

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