Next.jsReact启动器

nextjs-boilerplate — Next.js 启动器模板

作者 hadrysm

基于 Next.js 与 React 的启动器模板,集成 TypeScript、Tailwind CSS、Biome、Husky、Vitest、Storybook 与 GitHub Actions,适合快速搭建带完整开发工具链的前端项目。

看看你的网站会是什么样

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

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

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

全部页面与视图 2

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

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

值得关注的模板亮点

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

01

集成 TypeScript、Biome、Husky、lint-staged 等开发工具链

02

内置 Vitest 与 React Testing Library 测试配置,测试目录镜像 src 结构

03

使用 Tailwind CSS 4 的 CSS-first 配置方式

04

提供 Storybook 用于组件文档

05

支持 next-themes 深色模式与 CVA、Base UI 组件变体

06

包含 GitHub Actions 工作流

模板详细介绍

这个模板是面向开发者体验的 Next.js 启动器,使用 App Router,并集成 TypeScript 类型检查、Tailwind CSS 4 的 CSS-first 配置、Biome 代码检查与格式化、Husky Git 钩子、lint-staged 暂存文件检查、Vitest 与 React Testing Library 测试、Storybook 组件文档、next-themes 深色模式、CVA 与 Base UI 组件变体、T3 env 环境变量管理以及 GitHub Actions。项目采用 pnpm 作为包管理器,测试文件位于 __tests__/ 目录并镜像 src/ 结构,共享测试工具在 __tests__/test-utils.tsx。

使用方式支持通过 GitHub 的 Use this template 生成仓库,或运行 pnpm create next-app -e <模板地址> 创建项目。部署到 Vercel 时安装命令为 corepack use pnpm@`pnpm -v` && pnpm i,本地可用 pnpm build 与 pnpm start 查看生产模式效果。

限制方面,README 中列出的 Bundler Analyzer 与 next-pwa 仍处于计划阶段,尚未包含在模板中。模板采用 MIT 许可,免费范围限于该版本代码,演示图片、字体、图标等第三方素材需按各自许可核对,域名、托管、数据库等外部服务可能另外收费。

Next.jsReact启动器

适合你的项目吗?

适用场景

  • 快速启动一个带完整开发工具链的 Next.js 项目
  • 需要 TypeScript 严格模式与代码检查、格式化配置的前端工程
  • 希望使用 Vitest 与 React Testing Library 编写组件测试的项目
  • 需要 Storybook 维护组件文档的团队
  • 计划在 Vercel 上部署并配置 GitHub Actions 的项目

适合人群

  • 使用 Next.js App Router 的前端开发者
  • 重视开发者体验与代码质量工具链的团队
  • 需要测试与组件文档基础设施的新项目
  • 希望通过模板快速生成仓库并自行扩展的开发者

上手与定制指南

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

  1. 1

    可通过 GitHub 的 Use this template 生成仓库,或运行 pnpm create next-app -e <模板地址> 创建项目

  2. 2

    包管理器使用 pnpm,Vercel 安装命令为 corepack use pnpm@`pnpm -v` && pnpm i

  3. 3

    本地可用 pnpm build 与 pnpm start 查看生产模式效果

  4. 4

    测试文件放在 __tests__/ 目录并镜像 src/ 结构,共享测试工具在 __tests__/test-utils.tsx

  5. 5

    README 中 Bundler Analyzer 与 next-pwa 仍为计划项,尚未包含在模板中

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

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

使用时需要遵守

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

额外费用与待核对事项

  • README 的 Plans 部分将 Bundler Analyzer 与 next-pwa 列为计划项,尚未包含在模板中,属于未来可能添加的功能,当前版本不提供。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

- [Bundler Analyzer](https://www.npmjs.com/package/@next/bundle-analyzer) - [next-pwa](https://github.com/shadowwalker/next-pwa)

README 原文
https://github.com/hadrysm/nextjs-boilerplate/blob/main/LICENSEhttps://github.com/hadrysm/nextjs-boilerplate/blob/main/README.md

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

项目核对记录与介绍依据

模板资料

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

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

这个项目需要核对什么

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

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

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

查看具体选型方法 →

介绍的制作与核对状态

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

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

查看当时使用的来源资料

SHA-256: c6ffb05415ef779ff0ca7e5a3d9dfcd64669cba2c4454b4ebebef54fd12cb49a

2026-10-02T09:24:05.788Z

来源文件 / 仓库
# Boilerplate and Starter for Next.js 16, Tailwind CSS 4 and TypeScript

🚀 Boilerplate and Starter for Next.js, Tailwind CSS and TypeScript ⚡️ Made with developer experience first: Next.js (app routing), TypeScript, Biome, Husky, Lint-Staged, Vitest, React Testing Library, PostCSS, Tailwind CSS, Storybook, GH actions.

![Cover](https://svgshare.com/i/idk.svg)

## :rocket: Features

Developer experience first:

- [Next.js](https://nextjs.org) for Static Site Generator
- Type checking [TypeScript](https://www.typescriptlang.org)
- Integrate with [Tailwind CSS 4](https://tailwindcss.com) (CSS-first configuration)
- [Storybook](https://storybook.js.org) for components documentation
- Strict Mode for TypeScript and React 19
- Linter and Code Formatter with [Biome](https://biomejs.dev)
- [Husky](https://typicode.github.io/husky/#/) for Git Hooks
- [Lint-staged](https://github.com/okonet/lint-staged) for running linters on Git staged files
- Testing with [Vitest](https://vitest.dev/) and [React Testing Library](https://testing-library.com/)
- Dark mode with [next-themes](https://github.com/pacocoursey/next-themes)
- Component variants with [CVA](https://cva.style/) and [Base UI](https://base-ui.com/) headless components
- Absolute Imports using `@` prefix
- Nextjs custom layouts
- [T3 env](https://env.t3.gg/) Manage your environment variables with ease
- Message convention for git
- Maximize lighthouse score
- GH actions

## 📅 Plans

- [Bundler Analyzer](https://www.npmjs.com/package/@next/bundle-analyzer)
- [next-pwa](https://github.com/shadowwalker/next-pwa)

## 🧪 Testing

Tests live in the `__tests__/` directory with a mirrored structure matching `src/`. Shared test utilities are in `__tests__/test-utils.tsx`. Run tests with `pnpm test` (Vitest).

## :information_source: How To Use

To use this template you can simply click in **[Use this template](https://github.com/hadrysm/nextjs-boilerplate/generate)** or create your Next.js app based on this template by running:

```bash
pnpm create next-app -e https://github.com/hadrysm/nextjs-boilerplate
```

## 🚀 Deploy to production

Install command on Vercel:

```
corepack use pnpm@`pnpm -v` && pnpm i
```

You can see the results locally in production mode with:

```shell
pnpm build
```

```shell
pnpm start
```

## 🤝 Contributing

1. Fork this repository;
2. Create your branch: `git checkout -b my-awesome-contribution`;
3. Commit your changes: `git commit -m 'feat: Add some awesome contribution'`;
4. Push to the branch: `git push origin my-awesome-contribution`.

## License

Licensed under the MIT License, Copyright © 2024-2026

See [LICENSE](LICENSE) for more information.

---

Made with much :heart: and :muscle: by Mateusz Hadryś :blush: <a href="https://www.linkedin.com/in/mateusz-hadry%C5%9B/">My Contact</a>
反馈内容错误

看看同类模板

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