Prerequisites
Before setting up the frontend, ensure you have the following installed:- Node.js: v18.19.50 or higher (tested with v24.13.1)
- Package Manager: Yarn 3.2.3 (recommended) or npm/pnpm
- Git: For cloning the repository
Installation
Install dependencies
Install the required dependencies using your preferred package manager:
The project uses Yarn 3.2.3 as specified in
package.json. If you use Yarn, it will automatically use the correct version via Corepack.Configure environment variables
Copy the example environment file and configure your variables:See Configuration for details on required environment variables.
Available Scripts
The frontend package includes several useful scripts defined inpackage.json:
| Script | Command | Description |
|---|---|---|
| dev | next dev | Start development server |
| start | next dev | Alias for dev |
| build | next build | Build for production |
| serve | next start | Serve production build |
| lint | next lint | Run ESLint |
| check-types | tsc --noEmit --incremental | TypeScript type checking |
| format | prettier --write . | Format code with Prettier |
Development Workflow
Project Structure
The frontend follows a standard Next.js 15 App Router structure:Key Directories
app/
app/
Contains all Next.js 15 App Router pages and layouts. Each directory represents a route in the application.
components/
components/
Reusable React components including:
scaffold-eth/: Scaffold-ETH 2 framework componentsui/: shadcn/ui component library
hooks/
hooks/
Custom React hooks for blockchain interactions, contract reads/writes, and application state.
services/web3/
services/web3/
Web3 configuration including Wagmi and RainbowKit setup for wallet connections and blockchain interactions.
contracts/
contracts/
Generated contract ABIs and deployment addresses. Auto-updated when contracts are deployed.
Technology Stack
The frontend is built with modern web technologies:Core Framework
- Next.js 15.2.3: React framework with App Router
- React 19.0.0: UI library
- TypeScript 5.8.2: Type safety
Web3 Integration
- Wagmi 2.16.4: React hooks for Ethereum
- Viem 2.34.0: TypeScript Ethereum library
- RainbowKit 2.2.8: Wallet connection UI
Styling
- Tailwind CSS 4.1.3: Utility-first CSS framework
- daisyUI 5.0.9: Component library
- shadcn/ui: Accessible component primitives (Radix UI)
- next-themes: Dark mode support
Additional Libraries
- React Hook Form: Form management
- Zod: Schema validation
- Zustand: State management
- Recharts: Data visualization
- Framer Motion: Animations
Next Steps
Configuration
Configure environment variables, networks, and styling
Deployment
Deploy to Vercel or IPFS
Smart Contracts
Learn about the smart contract architecture
Components
Explore available hooks and components