项目 / vercel/examples

vercel/examples

行业推荐
语言 TypeScript标签 examplesvercelnextjs数据更新 2026-11-24 06:50:13 · 仓库 2026-11-23

一段话介绍

这是 Vercel 维护的示例与解决方案合集,用来对照现成模式搭建自己的应用。仓库中包括 `solutions`(演示、参考架构和最佳实践)、`starter`(可作为起点的可运行应用)等目录。其中一部分示例会出现在 [Vercel Templates](https://vercel.com/templates),该页面提供更细的筛选。新增示例可先安装依赖再运行 `pnpm new-example`;若手动添加,需符合模板中的 `.gitignore`、`package.json`(许可为 MIT)和 `README.md` 等约定,README 应能提供演示地址,若依赖环境变量则需附带 `.env.example` 和配置说明。相关说明还可对照 [Vercel 文档](https://vercel.com/docs) 和 [Next.js 文档](https://nextjs.org/docs)。许可为 MIT。说明见[仓库 README](https://github.com/vercel/examples)。

本站整理,非 GitHub 官方 description。

官方 description(GitHub API 原样)
Enjoy our curated collection of examples and solutions. Use these patterns to build your own robust and scalable applications.
5,161累计星
1,845Fork
—峰值日增
0上榜次数
总榜
暂未入榜
日榜
暂未入榜
周榜
暂未入榜
月榜
暂未入榜

官方快照(gh_history.db,2026-11-25):总榜 未进 Top50 · 日榜 未进 Top50 · 周榜未满 7 天基线(官方不生成) · 月榜暂无官方口径;下方四卡为站内趋势聚合(周卡按上榜次数,非官方 7 日增量窗)。

行业与场景

按行业选型 →

智能题库与自动阅卷

适配系统:考试系统、题库系统 · 得分 1.3

提供组卷、作答与自动评分链路,可嵌入考试系统降低教师批改成本。

更多信息

以下三段按该项目自己的 GitHub README 章节摘录(可合理截断并标明);README 没有对应章节的留空,不编造。

我的用法
仓库内通过 solutions 目录提供示例演示与参考架构,通过 starter 目录提供可作为起点的可运行应用。
特点或设计要点
希望进入 vercel.com/templates 的示例,还需在 README 顶部补上 front matter,字段取值见仓库内 `internal/fields.json`;相关模板可通过把其他模板的 `slug` 写入 `relatedTemplates`。提交时会经由 Husky 的 pre-commit 钩子跑 Prettier 和 ESLint。仓库还提供 `@vercel/examples-ui`,供 Next.js 示例统一样式和布局。反馈可在 Discussions 提出,缺陷请开 Issue。
星标走势还差一天的数据,明天就能看到曲线
每天 10:30 记一次星标,连续两天后自动生成曲线
首次发现 — · 最近在榜 2026-10-27 · 语言 TypeScript · 贡献者 —
typescript

GitHub 项目主页介绍

来自 GitHub 仓库 README / 主页介绍正文,原样摘录,共 4,202 字节。

<p align="center">
  <a href="https://vercel.com">
    <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96">
    <h3 align="center">Vercel Examples</h3>
  </a>
</p>

- [Solutions](/solutions) – Demos, reference architecture, and best practices
- [Starter](/starter) – Functional applications which can act as a starting point
- And more!

## Vercel Templates

Multiple examples are being featured in [Vercel's Templates](https://vercel.com/templates), visit that page for more advanced filtering options.

### For Vercelians

Examples that have front matter metadata will create a new Draft template in [Contentful](https://app.contentful.com), for more steps on how to publish a template, read [Publishing Templates](./internal/publishing-templates.md).

## Adding a new example

To quickly start contributing with a new example, run the following commands:

```bash
pnpm i
pnpm new-example
```

If the script above isn't used, make sure the example complies with the following:

- It must have a `.gitignore` similar to [plop-templates/example/.gitignore](./plop-templates/example/.gitignore)
- It must have a `package.json` similar to [plop-templates/example/package.json](./plop-templates/example/package.json) (usage of Next.js is optional). The license should be `MIT`
- It must have a `README.md` similar to [plop-templates/example/README.md](./plop-templates/example/README.md). The example has to be able to include a demo URL (the Vercel team will deploy it!) and if it requires environment variables, it must have a `.env.example` file and instructions on how to set them up. Take [bot-protection-datadome](./edge-middleware/bot-protection-datadome/README.md) as an example.
  - To customize the Vercel Deploy Button take a look at the [docs](https://vercel.com/docs/deploy-button), useful if the deployment has required environment variables.
- If using Next.js, it must have a `.eslintrc.json` similar to [plop-templates/example/.eslintrc.json](./plop-templates/example/.eslintrc.json)
- All Next.js examples should be using the same styling and layout provided by `@vercel/examples-ui`, its usage can be seen in the [plop template](./plop-templates/example)

### Adding a template

If you would like the example to be featured in [vercel.com/templates](https://vercel.com/templates) then also add the front matter metadata to the top of the readme, like in [bot-protection-datadome](./edge-middleware/bot-protection-datadome/README.md). To know all the possible values for each metadata take a look at [`internal/fields.json`](./internal/fields.json).

If you want to add related templates to your template, copy the `slug` from the other template into the `relatedTemplates` field, for example for [vercel.com/templates/next.js/monorepo-turborepo](https://vercel.com/templates/next.js/monorepo-turborepo) the slug is `monorepo-turborepo`, as written in [solutions/monorepo/README.md](./solutions/monorepo/README.md)

### The pre-commit hook

We use [Husky](https://typicode.github.io/husky/#/) to manage the pre-commit [Git hook](https://git-scm.com/docs/githooks) in this repo. Husky configures hooks automatically during install, so you don't need to do anything special to get them working, but if it fails to install, you can run the following command to install it manually:

```bash
pnpm run prepare
```

Code changes automatically go through Prettier and ESLint when you make a commit, **please do not skip these steps** unless they're broken and in that case let us known by creating an issue.

## Read the Docs

- [Vercel Docs](https://vercel.com/docs)
- [Next.js Docs](https://nextjs.org/docs)

If you have any questions or suggestions about the docs, feel free to [open a discussion](https://github.com/vercel/examples/discussions), or [submit a PR](https://github.com/vercel/examples/pulls) with your suggestions!

## Provide Feedback

- [Start a Discussion](https://github.com/vercel/examples/discussions) with a question, piece of feedback, or idea you want to share with the team.
- [Open an Issue](https://github.com/vercel/examples/issues) if you believe you've encountered a bug that you want to flag for the team.
↑