A Next.js application integrated with Farcaster SDK and Base network support.
- 🚀 Next.js 14 with App Router
- 🔗 Farcaster Mini App SDK integration
- ⛓️ Base network support via OnchainKit
- 💼 Wallet connection with Wagmi
- 📱 TypeScript support
- 🎮 Tap Tap Game - 10-level tapping game with points system
- Node.js 18+ installed
- npm or yarn package manager
- A Farcaster account
- Optional: Coinbase Developer Platform (CDP) API key
- Install dependencies:
npm install- Copy the environment variables template:
copy .env.example .env-
Update
.envwith your configuration:- Add your CDP Client API key if you have one
- Set your app URLs (for deployment)
-
Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
farcaster-base-app/
├── app/
│ ├── layout.tsx # Root layout with providers
│ ├── page.tsx # Main page component
│ └── globals.css # Global styles
├── components/
│ ├── OnchainKitProvider.tsx # OnchainKit provider setup
│ └── TapTapGame.tsx # Tap Tap Game component (10 levels)
├── hooks/
│ ├── useFarcasterSDK.ts # Farcaster SDK hook
│ └── useBaseWallet.ts # Wallet connection hook
├── .env.example # Environment variables template
├── next.config.js # Next.js configuration
├── package.json # Dependencies
└── tsconfig.json # TypeScript configuration
NEXT_PUBLIC_BASE_RPC_URL: Base network RPC URLNEXT_PUBLIC_CDP_CLIENT_API_KEY: Coinbase Developer Platform API keyNEXT_PUBLIC_URL: Your deployed app URLNEXT_PUBLIC_IMAGE_URL: App image URL (optional)NEXT_PUBLIC_SPLASH_IMAGE_URL: Splash screen image URL (optional)NEXT_PUBLIC_SPLASH_BACKGROUND_COLOR: Splash screen background color (optional)
- Install Vercel CLI:
npm install -g vercel- Deploy:
vercel- Update your
.envfile with the deployed URL
- Deploy your app (e.g., to Vercel)
- Copy your deployed URL
- Use Warpcast Frames Developer Tools to preview and test your Mini App
The app includes a fun 10-level tap game where players earn points by tapping a button:
- 10 Progressive Levels: Each level requires more taps (10 to 200)
- Points System: Earn points based on your current level (Level × 10 points per tap)
- Time Limits: Each level has a countdown timer
- High Score Tracking: Your best score is saved locally
- Visual Feedback: Progress bars, animations, and level indicators
- Click "Start Game" on the home page
- Tap the red button as fast as you can to earn points
- Complete the required number of taps before time runs out
- Advance through 10 increasingly challenging levels
- Try to beat your high score!
Your repository is already initialized with Git! To push to GitHub:
- Go to GitHub and sign in
- Click the + icon in the top right → New repository
- Name your repository (e.g.,
farcaster-base-app) - Don't initialize with README, .gitignore, or license (we already have these)
- Click Create repository
- Copy the repository URL (e.g.,
https://github.com/yourusername/farcaster-base-app.git) - Run these commands in your project directory:
cd C:\Users\om\Desktop\farcaster-base-app
git remote add origin https://github.com/yourusername/farcaster-base-app.git
git branch -M main
git push -u origin mainIf you have GitHub CLI installed:
cd C:\Users\om\Desktop\farcaster-base-app
gh repo create farcaster-base-app --public --source=. --remote=origin --pushMIT