Fork it on Replit.
A modern, full-featured template for building Farcaster Frames v2 applications with OnchainKit. This template provides everything you need to create interactive frame experiences with wallet integration and NFT minting capabilities.
- 🖼️ Built-in Farcaster Frames v2 support
- 🔄 Dynamic frame state management
- 🎨 Customizable frame metadata
- 🖱️ Interactive button handling
- 🏃♂️ Edge runtime support
- 👛 Seamless wallet connection via OnchainKit
- 👤 User profile display with avatars
- 💰 Built-in fund linking
- 🔌 Easy disconnect functionality
- 🎨 NFT minting via OnchainKit
- 💎 Base network support
- 🔒 Secure transaction handling
- 📱 Mobile-responsive design
- Clone and Install
git clone https://github.com/fakepixels/ock-frames-template.git
cd ock-frames-template
npm install- Set Up Environment
Create a
.env.localfile:
NEXT_PUBLIC_ONCHAINKIT_API_KEY=your_api_key_here
NEXT_PUBLIC_HOST=your_host_url # Optional, for production- Start Development
npm run devVisit http://localhost:3000 to see your app.
app/
├── components/ # React components
│ ├── Frame.tsx # Main frame component
│ └── WalletComponents.tsx
├── api/ # API routes
│ └── frame/ # Frame endpoints
├── frames.ts # Frame configuration
├── layout.tsx # Root layout
└── page.tsx # Home page
Edit app/frames.ts to customize your frame:
export const frameMetadata = {
buttons: [
{
label: "Mint NFT",
action: "post"
}
],
image: {
src: "/window.svg",
aspectRatio: "1:1"
}
// ... additional options
};Update the NFT contract in app/components/Frame.tsx:
<NFTMintCardDefault
contractAddress='your_contract_address'
tokenId='your_token_id'
/>The template uses Tailwind CSS with custom animations and glass-morphism effects. Customize the look in:
app/globals.css- Global styles and animationstailwind.config.ts- Tailwind configuration
POST /api/frame- Handles frame interactions
- Returns updated frame state
- Supports dynamic image generation
The WalletComponents component provides:
- Wallet connection/disconnection
- Profile display
- Address management
- Fund linking
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with OnchainKit
- Powered by Farcaster Frames
- Created with Next.js