monorepo 结构,分为 apps/web-app 与 apps/contracts 两个组件
boilerplate — Next.js 启动器模板
作者 semaphore-protocol
Semaphore 官方提供的 dApp 启动模板,采用 monorepo 结构,包含 Next.js 前端与合约两部分,演示匿名创建身份、加入群组并发送反馈的完整流程。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 2
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
演示创建 Semaphore 身份、加入群组并匿名发送反馈的流程
提供 GitHub 模板用法,可直接生成并克隆自己的仓库
包含合约部署与 Etherscan 验证的命令说明
使用 Prettier 进行代码格式检查与自动格式化
采用 MIT 许可,允许免费使用、修改、商用和分发
模板详细介绍
该仓库是 Semaphore 协议的启动器模板,用于快速搭建基于 Semaphore 的 dApp。仓库被划分为两个组件:apps/web-app(Web 应用)与 apps/contracts(合约)。按照 README 的说明,应用允许用户创建自己的 Semaphore 身份、加入群组,然后匿名发送反馈,当前部署在 Sepolia 测试网。
使用方式上,仓库被设计为 GitHub 模板,可直接生成自己的仓库并克隆,随后用 yarn 安装依赖。需要将 .env.example 复制为 .env 并填入环境变量,或在本地网络中运行应用。本地启动使用 yarn dev。
合约部分需要进入 apps/contracts 目录部署,部署命令需传入 Semaphore 合约地址与网络参数,之后把新的合约地址和 group id 更新到 apps/web-app/.env.production,并将 apps/contracts/artifacts/contracts 下的合约产物复制到 apps/web-app/contract-artifacts。合约可通过 yarn verify 在 Etherscan 上验证,验证前需在 .env 中设置 Etherscan API Key。代码格式检查与自动格式化分别使用 yarn prettier 和 yarn prettier:write。
模板采用 MIT 许可,允许免费使用、修改、商用和分发,分发时需保留版权声明与许可声明。演示图片、字体、图标等第三方素材以及域名、托管等外部服务需另行核对各自的许可与费用。
适合你的项目吗?
适用场景
- 基于 Semaphore 协议搭建匿名反馈类 dApp
- 学习 Semaphore 身份、群组与零知识证明在前后端如何配合
- 在 Sepolia 测试网上部署并验证相关合约
- 作为 monorepo 模板快速初始化自己的项目结构
适合人群
- 需要 Semaphore 起步模板的 dApp 开发者
- 希望了解 Semaphore 前端与合约配合方式的开发者
- 需要以 monorepo 组织 Next.js 应用与合约代码的团队
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
将仓库作为 GitHub 模板生成并克隆后,在项目根目录执行 yarn 安装依赖
- 2
复制 .env.example 为 .env 并填写环境变量,或改为在本地网络运行
- 3
本地启动使用 yarn dev;合约部署需在 apps/contracts 目录执行 yarn deploy 并传入 Semaphore 地址与网络
- 4
部署后更新 apps/web-app/.env.production 中的合约地址与 group id,并复制合约产物到 apps/web-app/contract-artifacts
- 5
Etherscan 验证前需在 .env 中设置 Etherscan API Key
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 使用前需将 .env.example 复制为 .env 并填写环境变量,或在本地网络中运行应用。
- 部署合约需在 apps/contracts 目录执行 yarn deploy,并传入 Semaphore 合约地址与网络参数(如 sepolia)。
- 在 Etherscan 上验证合约前,必须在 .env 文件中设置 Etherscan API Key。
- 部署后需将新的合约地址与 group id 更新到 apps/web-app/.env.production 文件。
- 需将 apps/contracts/artifacts/contracts 下的合约产物复制到 apps/web-app/contract-artifacts 目录。
- 示例应用当前部署在 Sepolia 测试网,并非主网生产环境。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
add your environment variables or run the app in a local network
README 原文
yarn deploy --semaphore <semaphore-address> --network sepolia
README 原文
Remember to set the Etherscan API Key in your .env file.
README 原文
Update the `apps/web-app/.env.production` file with your new contract address and the group id.
README 原文
Copy your contract artifacts from `apps/contracts/artifacts/contracts` folder to `apps/web-app/contract-artifacts` folder.
README 原文
https://github.com/semaphore-protocol/boilerplate/blob/main/LICENSEhttps://github.com/semaphore-protocol/boilerplate/blob/main/README.mdsend their feedback anonymously (currently on Sepolia)
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-02。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 87 / 100
- 技术栈
- Next.js · React
- 网站类型
- 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2025-12-13
- 截图检查日期
- 2026-10-02
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Next.js。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: ffe036e89ca407cce536ca17efc520657865eb9caad893dd03191dfadfdd7c0d
2026-10-02T16:42:21.258Z
来源文件 / 仓库<h1 align="center">
Semaphore Boilerplate
</h1>
<p align="center">
<a href="https://github.com/semaphore-protocol" target="_blank">
<img src="https://img.shields.io/badge/project-Semaphore-blue.svg?style=flat-square">
</a>
<a href="https://github.com/semaphore-protocol/boilerplate/blob/main/LICENSE">
<img alt="Github license" src="https://img.shields.io/github/license/semaphore-protocol/boilerplate.svg?style=flat-square">
</a>
<a href="https://github.com/semaphore-protocol/boilerplate/actions?query=workflow%3Astyle">
<img alt="GitHub Workflow style" src="https://img.shields.io/github/actions/workflow/status/semaphore-protocol/boilerplate/style.yml?branch=main&label=style&style=flat-square&logo=github">
</a>
<a href="https://eslint.org/">
<img alt="Linter eslint" src="https://img.shields.io/badge/linter-eslint-8080f2?style=flat-square&logo=eslint">
</a>
<a href="https://prettier.io/">
<img alt="Code style prettier" src="https://img.shields.io/badge/code%20style-prettier-f8bc45?style=flat-square&logo=prettier">
</a>
<a href="https://www.gitpoap.io/gh/semaphore-protocol/boilerplate" target="_blank">
<img src="https://public-api.gitpoap.io/v1/repo/semaphore-protocol/boilerplate/badge">
</a>
</p>
| The repository is divided into two components: [web app](./apps/web-app) and [contracts](./apps/contracts). The app allows users to create their own Semaphore identity, join a group and then send their feedback anonymously (currently on Sepolia). |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
## 🛠 Install
Use this repository as a Github [template](https://github.com/semaphore-protocol/boilerplate/generate).
Clone your repository:
```bash
git clone https://github.com/<your-username>/<your-repo>.git
```
and install the dependencies:
```bash
cd <your-repo> && yarn
```
## 📜 Usage
Copy the `.env.example` file as `.env`:
```bash
cp .env.example .env
```
and add your environment variables or run the app in a local network.
### Local server
You can start your app locally with:
```bash
yarn dev
```
### Deploy the contract
1. Go to the `apps/contracts` directory and deploy your contract:
```bash
yarn deploy --semaphore <semaphore-address> --network sepolia
```
2. Update the `apps/web-app/.env.production` file with your new contract address and the group id.
3. Copy your contract artifacts from `apps/contracts/artifacts/contracts` folder to `apps/web-app/contract-artifacts` folder.
> [!NOTE]
> Check the Semaphore contract addresses [here](https://docs.semaphore.pse.dev/deployed-contracts).
### Verify the contract
Verify your contract on Etherscan:
```bash
yarn verify <your-contract-address> <semaphore-address> --network sepolia
```
> **Note**
> Remember to set the Etherscan API Key in your .env file.
### Code formatting
Run [Prettier](https://prettier.io/) to check formatting rules:
```bash
yarn prettier
```
or to automatically format the code:
```bash
yarn prettier:write
```
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

ai-website-cloner-template
Clone any website with one command using AI coding agents
Next.js · 启动器

Next.js SaaS Starter
Next.js SaaS Starter 是 Next.js 官方维护的 SaaS 起点模板,定位介于学习资源和可直接部署的脚手架之间。
Next.js · SaaS

Next.js Commerce
Next.js Commerce 是 Vercel 团队维护的电商启动模板,基于 Next.js App Router 构建,采用服务端渲染、React Server Components、Server Actions …
Next.js · 电商

Next-js-Boilerplate
Next-js-Boilerplate 是一个面向 Next.js 16、Tailwind CSS 4 和 TypeScript 的启动器,核心定位是开发者体验优先。
Next.js · 启动器

tailwind-nextjs-starter-blog
tailwind-nextjs-starter-blog 是一个面向个人技术博客的 Next.js 与 Tailwind CSS 启动模板,其 v2 版本基于 App Router 与 React Server Comp…
Next.js · 博客

next-forge
Production-grade Turborepo template for Next.js apps.
Next.js · 启动器
