Documentation
Learn how to use Kokoemon to build your next Web3 application
Documentation
Everything you need to know about Kokoemon
Getting Started
Welcome to the Kokoemon documentation. This guide will help you get started with building web3 applications using our framework.
Introduction
Kokoemon is a modern framework for building web3 applications. It provides a set of tools and utilities to help you build decentralized applications quickly and efficiently.
Key Features
- Built on Next.js 15 with App Router
- TypeScript support out of the box
- Tailwind CSS for styling
- Smart contract integration
- Wallet connection utilities
- Multi-chain support
Installation
To get started with Kokoemon, you need to have Node.js 18+ and pnpm installed on your system.
pnpm create kokoemon-app my-app
This will create a new Kokoemon project in the my-app
directory. Navigate to the directory and start the development server:
cd my-app
pnpm dev
Quick Start
After installation, you can start building your application. Here's a simple example of connecting to a wallet and displaying the account address:
import { useWallet } from 'kokoemon';
export default function App() {
const { connect, account, isConnected } = useWallet();
return (
<div>
{!isConnected ? (
<button onClick={connect}>Connect Wallet</button>
) : (
<p>Connected: {account}</p>
)}
</div>
);
}
Project Structure
A typical Kokoemon project has the following structure:
my-app/
├── src/
│ ├── app/ # Next.js App Router
│ ├── components/ # React components
│ ├── hooks/ # Custom hooks
│ ├── lib/ # Utilities and helpers
│ ├── styles/ # Global styles
│ └── types/ # TypeScript types
├── public/ # Static assets
├── contracts/ # Smart contracts
├── tests/ # Test files
├── .env # Environment variables
├── next.config.js # Next.js configuration
├── tailwind.config.js # Tailwind CSS configuration
└── package.json # Project dependencies