web3-frontend

Guide Next.js 16 dApp frontends with wagmi, viem, and RainbowKit.

1|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/kaynetik/skills --skill web3-frontend-kaynetik
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web3-frontend
Source: https://github.com/kaynetik/skills/tree/main/web3-frontend
Command: npx skills add https://github.com/kaynetik/skills --skill web3-frontend-kaynetik

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Modern dApp frontends require careful coordination of wallet integration, server-side rendering, and on-chain interaction to avoid hydration mismatches, leaked secrets, duplicated RPC calls, and poor transaction UX. This Skill codifies production patterns for Next.js 16 app-router projects to wire wallet providers safely, perform cacheable server reads, and deliver resilient client-side signing and transaction flows.

Core Features & Use Cases

  • SSR-safe wallet configuration: Guidance for cookie-based storage, per-request wagmi config, and initial state hydration to eliminate flicker.
  • On-chain reads and multicall: Patterns for server-side viem public clients, multicall batching, and caching using Next.js cache directives.
  • Transaction lifecycle and error handling: End-to-end UX states from signature through mining to receipt, typed error parsing, and explorer linking.
  • Auth and sessions: SIWE flows, nonce management, smart-account verification, and secure sealed cookies for server session handling.
  • Wallet UX and guards: ENS resolution, network guards, connect gates, capability detection, and account-change invalidation.
  • ABI codegen and typing: Recommendations to use codegen for typed ABIs and address tables per chain to avoid silent runtime errors.

Quick Start

Use the web3-frontend skill to get step-by-step guidance for wiring wagmi and viem into a Next.js 16 app with cookie-based SSR storage and SIWE authentication.

Frequently Asked Questions about web3-frontend

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure wagmi for SSR in Next.js to prevent hydration mismatches?

SSR-safe wagmi configuration requires cookie-based storage and per-request wagmi config initialization. Hydrating initial state on the server eliminates client-side flicker and prevents hydration mismatches in Next.js app-router dApps.

How does viem handle server-side on-chain reads with multicall batching?

Viem public clients execute server-side on-chain reads using multicall batching to aggregate multiple contract calls. Combining this with Next.js cache directives ensures cacheable server reads and prevents duplicated RPC requests across renders.

What is the best way to implement SIWE authentication in a Next.js dApp?

SIWE authentication in Next.js dApps requires nonce management, smart-account verification, and secure sealed cookies for server session handling. This flow establishes authenticated sessions that persist safely across server and client boundaries.

Can I use RainbowKit with Next.js 16 app-router for wallet integration?

RainbowKit integrates with Next.js 16 app-router through wagmi and viem configurations. Production-grade dApp frontends use it to manage wallet connections, capability detection, and account-change invalidation within React server and client components.

Why do I need typed ABI codegen for my dApp frontend?

Typed ABI codegen generates typed ABIs and address tables per chain to avoid silent runtime errors during on-chain interactions. It ensures compile-time type safety for contract reads, writes, and event parsing across your dApp.

How do I manage transaction lifecycle UX states in a React dApp?

Transaction lifecycle UX management provides end-to-end states from signature through mining to receipt. It includes typed error parsing and explorer linking to deliver resilient client-side signing and transaction flows in React.