Back to templates

Template details

NextJS Wagmi Boilerplate Web3

A Next.js boilerplate for Web3 dApps with Wagmi, Ant Design, Tailwind CSS, and smart contract integration examples.

About this template

NextJS Wagmi Boilerplate Web3 is a Next.js starter template that wires up Wagmi, Ant Design, Tailwind CSS, and TypeScript to speed up the creation of Web3 dApps with multi-wallet support and ready-to-run smart contract examples.

What is NextJS Wagmi Boilerplate Web3?

NextJS Wagmi Boilerplate Web3 is an enterprise-oriented boilerplate built on Next.js that combines the Wagmi library (version 1.4.6) for wallet and contract interactions, Ant Design plus Tailwind CSS for UI styling, and TypeScript for type safety. As a template, it takes a Web3 developer's project skeleton and produces a runnable dApp foundation with wallet connection flows, chain switching, and example hooks. The project is maintained on GitHub by account galihpermana29 and includes a demo video showing the wallet connection flow.

Key Features

  • Multi-wallet connect/disconnect — Supports Metamask, CoinWallet, and CoinBase provider wallets out of the box with a single connection flow.
  • Wagmi@1.4.6 setup — Includes full feature configuration for Wagmi hooks, allowances, and contract reads/writes.
  • Chain network switching — Provides UI and logic to switch between supported blockchain networks.
  • Ant Design + Tailwind CSS — Combines Ant Design components with Tailwind utility classes for rapid styling.
  • Smart contract integration examples — Includes write examples for NFT SetApproveAll() with one state and with multiple states, plus a read example for IsApproveAll().
  • Custom useWrite hook — A reusable hook that wraps Wagmi's write action and handles error and loading states centrally.
  • Loading & error handling — Example pages demonstrate consistent patterns for async contract interaction feedback.

Who is it for?

  • Web3 dApp developers — Get a pre-configured Next.js project with Wagmi so they can skip repetitive wallet boilerplate and focus on app-specific logic.
  • Smart contract integrators — Use the included NFT approval read/write examples as a reference for wiring their own contracts to Wagmi hooks.
  • Enterprise teams — The combination of TypeScript, Ant Design, and structured hooks supports larger codebases that need consistent UI and state patterns.

What can you do with it?

  • Connect wallets in minutes: Wire up Metamask, CoinBase, or CoinWallet connections with the included provider setup.
  • Demo NFT approvals: Run through the SetApproveAll() write examples to understand how Wagmi hooks manage transaction states.
  • Build a styled dApp dashboard: Use Ant Design components with Tailwind styling to assemble pages without writing CSS from scratch.
  • Switch networks dynamically: Use the chain-switching feature to let users move between supported test networks.

How does the template work?

After cloning the repository, run npm install to install dependencies and npm run dev to start the Next.js development server. The project then exposes the example pages that demonstrate wallet connection, chain switching, and the smart contract interactions.

FAQ

What wallets are supported?

The boilerplate supports Metamask, CoinWallet, and CoinBase wallets through Wagmi's provider connectors, with connect and disconnect actions included.

What version of Wagmi is used?

The template is configured with Wagmi@1.4.6, and the custom hooks are built against that version's API.

How do I run the project?

Run npm install followed by npm run dev in the project root to start the Next.js development server.

Does the template include smart contract code?

It includes example integration code that calls an NFT SetApproveAll() function and reads IsApproveAll(), but the contract itself is not bundled; the examples show how to interact with an external contract via Wagmi.

screenshot of NextJS Wagmi Boilerplate Web3 on template0.com