A full-featured starter kit for building Farcaster Frames v2 applications with Next.js. This project provides a robust foundation with authentication, notifications, and essential tooling pre-configured.
- 🔐 Authentication - Built-in Farcaster authentication using Frame SDK
- 📨 Notifications - Ready-to-use Frame notifications system
- 🔄 State Management - TanStack Query for efficient server state management
- 🎨 Styling - Tailwind CSS for rapid UI development
- 📊 Analytics - PostHog integration for tracking user interactions
- 🐛 Error Tracking - Sentry integration for monitoring errors
- 🔍 Type Safety - Full TypeScript support
- 🚀 API Routes - Pre-configured API endpoints for user management
- 💾 Database - Redis integration for data persistence
- ⚡ Background Jobs - QStash integration for handling async tasks
- Node.js 18+
- Redis database (Upstash recommended)
- Neynar API key
- PostHog account (optional)
- Sentry account (optional)
- Clone the repository:
git clone https://github.com/builders-garden/frames-v2-starter
cd frames-v2-starter
- Install dependencies:
npm install
# or
yarn install
# or
pnpm install
- Create a
.env
file based on.env.sample
:
NEXT_PUBLIC_URL=http://localhost:3000
JWT_SECRET=your-secret-key
NEYNAR_API_KEY=your-neynar-api-key
KV_API_URL=your-redis-url
KV_API_TOKEN=your-redis-token
QSTASH_TOKEN=your-qstash-token
QSTASH_CURRENT_SIGNING_KEY=your-qstash-signing-key
NEXT_PUBLIC_POSTHOG_KEY=your-posthog-key
NEXT_PUBLIC_POSTHOG_HOST=your-posthog-host
- Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
- Open http://localhost:3000 with your browser to see the result.
- Run yarn frames
- Generate domain account association for http://localhost:3000
- Paste it in your manifest (farcaster.json)
- Debug and Test interactions from the debugger
├── app/ # Next.js app router pages and API routes
├── components/ # React components
├── hooks/ # Custom React hooks
├── lib/ # Utility functions and configurations
├── public/ # Static assets
└── types/ # TypeScript type definitions
components/Demo.tsx
- Example component showing Frame authenticationhooks/use-sign-in.ts
- Hook for handling Farcaster authenticationlib/notifications.ts
- Frame notifications implementationlib/db/index.ts
- Database operationsmiddleware.ts
- API route authentication
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use this starter kit for any project.
If you have any questions or need help, please open an issue in the repository.