Skip to content

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

1 watching

Forks

Repository files navigation

OnchainKit Frames v2 Template

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.

✨ Features

Frame Integration

  • 🖼️ Built-in Farcaster Frames v2 support
  • 🔄 Dynamic frame state management
  • 🎨 Customizable frame metadata
  • 🖱️ Interactive button handling
  • 🏃‍♂️ Edge runtime support

Wallet Features

  • 👛 Seamless wallet connection via OnchainKit
  • 👤 User profile display with avatars
  • 💰 Built-in fund linking
  • 🔌 Easy disconnect functionality

NFT Integration

  • 🎨 NFT minting via OnchainKit
  • 💎 Base network support
  • 🔒 Secure transaction handling
  • 📱 Mobile-responsive design

Technical Stack

🚀 Quick Start

  1. Clone and Install
git clone https://github.com/fakepixels/ock-frames-template.git
cd ock-frames-template
npm install
  1. Set Up Environment Create a .env.local file:
NEXT_PUBLIC_ONCHAINKIT_API_KEY=your_api_key_here
NEXT_PUBLIC_HOST=your_host_url # Optional, for production
  1. Start Development
npm run dev

Visit http://localhost:3000 to see your app.

📁 Project Structure

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

🛠️ Configuration

Frame Configuration

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
};

NFT Settings

Update the NFT contract in app/components/Frame.tsx:

<NFTMintCardDefault
  contractAddress='your_contract_address'
  tokenId='your_token_id'
/>

🎨 Styling

The template uses Tailwind CSS with custom animations and glass-morphism effects. Customize the look in:

  • app/globals.css - Global styles and animations
  • tailwind.config.ts - Tailwind configuration

📚 API Reference

Frame Endpoint

  • POST /api/frame
    • Handles frame interactions
    • Returns updated frame state
    • Supports dynamic image generation

Wallet Integration

The WalletComponents component provides:

  • Wallet connection/disconnection
  • Profile display
  • Address management
  • Fund linking

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages