This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
- Start Development Server:
pnpm devornpm run dev - Build Project:
pnpm buildornpm run build - Start Production Server:
pnpm startornpm run start - Lint Code:
pnpm lintornpm run lint
Mini-memes is a Farcaster Mini App for creating, sharing, and potentially minting memes as NFTs. It's built using Next.js, React, and OnchainKit/MiniKit integration.
-
MemeGenerator (
components/meme-generator.tsx): Main orchestrator that manages:- Template selection
- Text editing
- Meme generation
- Sharing/minting options
-
MemeEditor (
components/meme-editor.tsx): Handles the canvas editing experience:- Places text on meme templates
- Supports draggable text positioning
- Manages text properties (size, position)
- Creates the final meme image
-
MemeTemplateSelector (
components/meme-template-selector.tsx): Displays available meme templates in a grid gallery -
Draggable Text Features:
components/draggable-text-box.tsx: Handles text positioningcomponents/draggable-text-input.tsx: Manages text input
-
Share/Mint Options:
- Share to Farcaster (using Frame SDK)
- Mint to Zora (integration in progress)
- Uses Zustand for global state management
- Main store in
lib/stores/use-meme-store.ts - Manages selected template, text items, generated meme, and active tabs
/api/upload-meme/route.ts: Handles meme image uploads to Vercel Blob/api/notify/route.ts: Handles Farcaster notifications/api/webhook/route.ts: Webhook endpoint for Farcaster integrations
- Meme Templates: Defined in
lib/meme-templates.ts - Redis Integration:
lib/redis.tsfor storing notification preferences - Notification System:
lib/notification.ts: Core notification functionslib/notification-client.ts: Client-side notification utilities
- Farcaster: Frame SDK integration for sharing and notifications
- Vercel Blob: For storing generated meme images
- Upstash Redis: For notification handling
- Zora: For NFT minting (in progress)
- User selects a meme template from the gallery
- User adds and positions text on the meme
- User generates the final meme
- User can share to Farcaster or mint as NFT
Important environment variables required for the app to function:
# Required for Frame metadata
NEXT_PUBLIC_URL=
NEXT_PUBLIC_VERSION=
NEXT_PUBLIC_ONCHAINKIT_PROJECT_NAME=
NEXT_PUBLIC_ICON_URL=
NEXT_PUBLIC_IMAGE_URL=
NEXT_PUBLIC_SPLASH_IMAGE_URL=
NEXT_PUBLIC_SPLASH_BACKGROUND_COLOR=
# Required to allow users to add your frame
FARCASTER_HEADER=
FARCASTER_PAYLOAD=
FARCASTER_SIGNATURE=
# Required for webhooks and background notifications
REDIS_URL=
REDIS_TOKEN=
These variables enable frame metadata, account association for notifications, and Redis-backed storage for notifications.