A modern Web3 application launcher built with Next.js 15, TypeScript, and the latest Web3 technologies.
- Next.js 15 - Latest version with App Router and TypeScript
- RainbowKit + Wagmi - Modern wallet connection and Web3 interactions
- TanStack Query - Powerful data fetching and caching
- Redux Toolkit - State management with modern Redux
- shadcn/ui - Beautiful and accessible UI components
- Tailwind CSS - Utility-first CSS framework
- TypeScript - Full type safety
- Yarn - Fast and reliable package manager
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- Web3: RainbowKit, Wagmi, Viem
- State Management: Redux Toolkit
- Data Fetching: TanStack Query
- Package Manager: Yarn
- Clone the repository:
git clone https://github.com/M3gA-Mind/nextjs-dapp-frontend-template.git- Install dependencies:
yarn install- Set up environment variables:
cp .env.example .env.local- Update the
.env.localfile with your configuration:
# WalletConnect Project ID (get one at https://cloud.walletconnect.com)
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=your_project_id_here- Start the development server:
yarn dev- Open http://localhost:3000 in your browser.
To use WalletConnect features, you need to get a Project ID from WalletConnect Cloud:
- Go to WalletConnect Cloud
- Sign up or log in
- Create a new project
- Copy the Project ID
- Add it to your
.env.localfile
The application is configured to support the following chains:
- Ethereum Mainnet
- Polygon
- Optimism
- Arbitrum
- Base
- Zora
You can modify the chain configuration in src/lib/wagmi.ts.
src/
├── app/ # Next.js App Router pages
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/ # React components
│ ├── ui/ # shadcn/ui components
│ ├── connect-wallet.tsx # Wallet connection component
│ └── providers.tsx # App providers
└── lib/ # Utility functions and configurations
├── hooks.ts # Redux hooks
├── query.ts # TanStack Query configuration
├── store.ts # Redux store
├── utils.ts # Utility functions
└── wagmi.ts # Wagmi configuration
This project uses shadcn/ui for UI components. To add new components:
npx shadcn@latest add <component-name>Available components:
- Button
- Card
- Input
- Label
The app uses RainbowKit for wallet connection. Users can connect with:
- MetaMask
- WalletConnect
- Coinbase Wallet
- And many more
- Redux Toolkit: For global application state
- TanStack Query: For server state and caching
- Wagmi: For Web3 state management
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy
The app can be deployed to any platform that supports Next.js:
- Netlify
- Railway
- DigitalOcean App Platform
- AWS Amplify
yarn dev- Start development serveryarn build- Build for productionyarn start- Start production serveryarn lint- Run ESLintyarn type-check- Run TypeScript type checking
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.