A modern, beginner-friendly boilerplate for building Web3 applications using Next.js 14, Ethers.js, and @inkonchain/ink-kit UI components.
- ⚡️ Next.js 14 with App Router
- 🔗 Web3 Integration with Ethers.js
- 🎨 Beautiful UI components from @inkonchain/ink-kit
- 📱 Responsive design out of the box
- 🔒 Type-safe development with TypeScript
- 🎯 Easy to customize and extend
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- Git
- A code editor (we recommend Visual Studio Code)
- Clone this repository:
git clone https://github.com/yourusername/your-repo-name.git
cd your-repo-name
- Install dependencies:
npm install
# or
yarn install
# or
pnpm install
- Start the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
- Open http://localhost:3000 in your browser to see your app!
Before you can start developing, you'll need a Reown Project ID:
- Visit Reown Dashboard
- Sign in with your wallet
- Create a new project or select an existing one
- Navigate to the project settings
- Copy your Project ID
Then create a .env.local
file in your project root:
NEXT_PUBLIC_REOWN_PROJECT_ID=your_project_id_here
This Project ID is required for:
- Accessing Reown's infrastructure
- Deploying smart contracts
- Utilizing Reown's API services
Note: Never commit your .env.local
file to version control. It's already included in .gitignore
for your security.
your-project/
├── src/
│ ├── app/ # App Router pages and layouts
│ ├── components/ # Reusable UI components
│ ├── styles/ # Global styles and theme
│ └── utils/ # Helper functions and constants
├── public/ # Static files
└── package.json # Project dependencies and scripts
- Open
src/styles/theme.ts
- Modify the colors, fonts, and other theme variables
- Your changes will automatically apply throughout the app
- Create a new file in
src/app
directory - The file name will become the route (e.g.,
about.tsx
becomes/about
) - Use this basic template:
'use client'
import {
Button,
Card,
Input,
Tag,
Alert,
InkLayout,
InkPanel
} from "@inkonchain/ink-kit";
// Your page component
function YourContent() {
return (
<InkPanel className="ink:p-4">
<Card>
<h2 className="ink:text-xl ink:font-bold ink:mb-4">Your Title</h2>
<div className="ink:space-y-2">
{/* Your content here */}
<p>Your content goes here</p>
</div>
</Card>
</InkPanel>
);
}
// Main page component
export default function YourPage() {
return (
<YourContent />
);
}
Note:
- Always use the
'use client'
directive at the top of your page components - Import needed components from
@inkonchain/ink-kit
- Use the
ink:
prefix for all styling classes - Wrap your content in
InkPanel
andCard
components for consistent styling
- Find the wallet connection logic in
src/utils/web3.ts
- Update the network settings in
src/utils/constants.ts
- Use the provided hooks in your components
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Check out the Next.js Documentation
- Learn about Ethers.js
- Explore @inkonchain/ink-kit Documentation
Give a ⭐️ if this project helped you!