Next.jsReact启动器

web3-app-template — Next.js 启动器模板

作者 samueldanso

基于 Next.js App Router 与 Wagmi、Privy 的 Web3 应用起步模板,内置钱包连接、余额查询与链切换示例。

看看你的网站会是什么样

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

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

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

全部页面与视图 2

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

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

值得关注的模板亮点

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

01

Next.js 15 App Router 与 React 19,使用 TypeScript

02

Wagmi v2 与 Privy 实现 Web3 集成,React Query 负责数据获取

03

支持 Ethereum 主网与 Sepolia,含链切换与网络检测示例

04

Tailwind CSS 配合 Shadcn/ui,提供主题与暗色模式

05

内置 Error Boundaries 与 Web3 操作错误处理示例

06

提供 bun 脚本:dev、build、start、lint、format、check、type-check

模板详细介绍

该模板用于搭建去中心化应用前端,README 说明其基于 Next.js 15 App Router 与 React 19,使用 TypeScript 和 Tailwind CSS,并集成 Shadcn/ui 组件、主题与暗色模式,同时提供 Error Boundaries 处理错误。Web3 部分通过 Wagmi v2 与 Privy 接入,支持 Ethereum 主网与 Sepolia,并用 React Query 做数据获取。README 的 Web3 集成章节列出钱包连接、余额获取自定义 hook、链切换与网络检测、Web3 操作错误处理等示例。开发脚本包含 dev、build、start、lint、format、check 与 type-check,包管理使用 bun。部署章节给出 Vercel 流程:推送代码到 GitHub、在 Vercel 连接仓库、在控制台添加环境变量后部署。README 未提供合约交互、后端服务或测试相关说明。

Next.js启动器

适合你的项目吗?

适用场景

  • 从零搭建需要钱包连接与余额展示的 DApp 前端
  • 在 Ethereum 主网或 Sepolia 上验证链切换与网络检测逻辑
  • 以 Shadcn/ui 与 Tailwind 为基础定制界面主题和暗色模式
  • 通过 Vercel 部署带 Privy 环境变量的 Web3 前端

适合人群

  • 使用 Next.js App Router 与 TypeScript 的前端开发者
  • 需要 Wagmi 与 Privy 组合接入钱包的 Web3 项目
  • 希望以现成组件与主题起步的 DApp 原型开发

上手与定制指南

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

  1. 1

    克隆仓库后执行 bun install 安装依赖

  2. 2

    复制 .env-example 为 .env,填写 NEXT_PUBLIC_PRIVY_APP_ID 与 NEXT_PUBLIC_CHAIN_ID(Sepolia 为 11155111,主网为 1)

  3. 3

    执行 bun dev 启动开发服务器,访问 http://localhost:3000

  4. 4

    部署到 Vercel 时需在控制台配置上述环境变量

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

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

使用时需要遵守

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

额外费用与待核对事项

  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
  • 使用 Privy 钱包登录需自行在 Privy 控制台申请 NEXT_PUBLIC_PRIVY_APP_ID,属于外部服务账号要求。
  • 需配置 NEXT_PUBLIC_CHAIN_ID 环境变量,Sepolia 用 11155111,主网用 1。
  • 部署到 Vercel 时需在 Vercel 控制台另行添加环境变量。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

- `NEXT_PUBLIC_PRIVY_APP_ID`: Get from [Privy](https://dashboard.privy.io/)

README 原文

- `NEXT_PUBLIC_CHAIN_ID`: Use `11155111` for Sepolia or `1` for Mainnet

README 原文

3. Add your environment variables in Vercel dashboard

README 原文
https://github.com/samueldanso/web3-app-template/blob/main/LICENSE.txthttps://github.com/samueldanso/web3-app-template/blob/main/README.md

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

项目核对记录与介绍依据

模板资料

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

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

这个项目需要核对什么

记录的仓库更新时间
2025-09-16
截图检查日期
2026-10-14

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

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

查看具体选型方法 →

介绍的制作与核对状态

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

审核声明: codex-user-requested-batch-review-20261017 · 2026-10-16

查看当时使用的来源资料

SHA-256: 02f6ac57ce1613fc9c2fea802be960bfe70eb0a51bc6eee8342ab6ec0fa96dd3

2026-10-14T12:43:48.930Z

来源文件 / 仓库
# Web3 Starter Kit

A modern, production-ready starter template for building decentralized applications with sensible defaults.

See deployed website: [web3-app-template.vercel.app](https://web3-app-template.vercel.app/)

## ✨ Features

-   **Next.js 15** with App Router and React 19
-   **Web3 Integration** with Wagmi v2 and Privy
-   **React Query** for data fetching
-   **Ethereum Network** support (Mainnet & Sepolia)
-   **TypeScript** for type safety
-   **Tailwind CSS** with theming and dark mode support
-   **Shadcn/ui** for a large range of fully customizable and themable components
-   **Error Boundaries** for graceful error handling

## 🚀 Quick Start

1. **Clone or use as template**

    ```bash
    git clone https://github.com/samueldanso/web3-app-template.git
    cd web3-app-template
    ```

2. **Install dependencies**

    ```bash
    bun install
    ```

3. **Set up environment variables**

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

    Fill in your environment variables:

    - `NEXT_PUBLIC_PRIVY_APP_ID`: Get from [Privy](https://dashboard.privy.io/)
    - `NEXT_PUBLIC_CHAIN_ID`: Use `11155111` for Sepolia or `1` for Mainnet

4. **Start development server**

    ```bash
    bun dev
    ```

5. **Open your browser**
   Navigate to [http://localhost:3000](http://localhost:3000)

## 🛠️ Development

### Available Scripts

-   `bun dev` - Start development server with Turbopack
-   `bun build` - Build for production
-   `bun start` - Start production server
-   `bun lint` - Run biome lint
-   `bun format` - Run biome format
-   `bun check` - Run biome format and lint
-   `bun type-check` - Run TypeScript type checking

### Web3 Integration

The template includes examples of Web3 integration:

-   Wallet connection with RainbowKit
-   Balance fetching with custom hooks
-   Chain switching and network detection
-   Error handling for Web3 operations

## 🌐 Deployment

### Vercel (Recommended)

1. Push your code to GitHub
2. Connect your repository to [Vercel](https://vercel.com)
3. Add your environment variables in Vercel dashboard
4. Deploy!

## 📚 Documentation

-   [Next.js Documentation](https://nextjs.org/docs)
-   [Wagmi Documentation](https://wagmi.sh)
-   [Privy Documentation](https://docs.privy.io/basics/react/installation)
-   [Shadcn/ui Documentation](https://ui.shadcn.com)
反馈内容错误

看看同类模板

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