- Framework: React with Next.js
- UI Library: Tailwind CSS for styling
- Animation: Framer Motion for fluid cooking animations
- State Management: React Context for game state
- Network: SWR for data fetching and caching
- Authentication: Farcaster for user identity
- Database:
- User profiles and scores: Base Mini App SDK
- Leaderboard data: Redis Realtime Database
- Team statistics: Redis
- NFT Minting: Base NFT API for badges and rewards
- Analytics: Simple analytics to track engagement metrics
- Farcaster SDK: User authentication and social graph access
- Base SDK: For NFT functionality and persistent data storage
- MiniKit: Core framework to handle Mini App lifecycle
-
Entry & Team Selection:
- Immediate team selection on first launch (Ghana 🇬🇭 or Nigeria 🇳🇬)
- Option to view tutorial or jump straight to gameplay
- User preference stored in local storage + Base SDK
-
Game Loop Implementation:
- Game state:
waiting→countdown→playing→scoring→results - Countdown timer with 3-2-1 animation
- Main gameplay loop with 30-second timer
- Score calculation and submission
- Game state:
-
Cooking Mechanics:
- Define sequence of actions for "perfect" cooking
- Track timing precision for each action
- Implement visual feedback for successful/failed actions
- Create combo system for consecutive correct actions
-
Scoring System:
- Base score: Sum of successful actions
- Time multiplier: Faster completion = higher multiplier
- Combo bonus: Consecutive perfect actions
- Accuracy penalty: Wrong actions reduce score
- Daily individual leaderboard
- Weekly team leaderboard (Ghana vs Nigeria)
- All-time high scores
- Friend leaderboard (using Farcaster social graph)
- Daily winner: "Golden Spoon" NFT with metadata including score and date
- Weekly team winners: "Best Jollof Nation" crown NFT for all team participants
- Special achievement NFTs for milestones (perfect game, high combo, etc.)
-
Welcome/Team Selection:
- Split screen design with Ghana/Nigeria flags
- Quick animation showing Jollof from both countries
- One-tap selection to choose team
-
Game Screen:
- Cooking pot centered
- Ingredient buttons around the edges
- Clear visual prompts for next action
- Real-time score and timer
- Visual feedback for correct/incorrect actions
-
Results Screen:
- Final score with breakdown
- Position on leaderboard
- Share button (with customized message)
- "Play Again" and "Challenge Friend" buttons
-
Leaderboard Screen:
- Tabs for different timeframes and categories
- Visual indicator of which team is winning overall
- Friend highlight section
- Bright, vibrant colors matching West African aesthetic
- Simple, clean UI elements for quick recognition
- Satisfying animations for cooking actions
- Team colors subtly incorporated throughout
- Basic UI setup with team selection
- Implement core tap/swipe game mechanics
- Create simple scoring system
- Implement timer and round structure
- Integrate Farcaster authentication
- Implement leaderboard system
- Add social sharing functionality
- Connect NFT reward system
- Performance optimization for smooth animations
- Add sound effects and music
- Implement more advanced cooking sequences
- Expand reward system with more NFT varieties
- Focus on performance testing for smooth gameplay
- Test social features with multiple test accounts
- Verify leaderboard accuracy and persistence
- Test NFT minting process end-to-end
- Build the app with Next.js
- Deploy to Vercel for hosting
- Register as Mini App in Base App ecosystem
- Set up monitoring for initial launch
- Daily Active Users (DAU)
- Average session length
- Retention rate (Day 1, 7, 30)
- NFTs minted
- Social shares per user
- Team competition engagement
interface GameState {
phase: 'waiting' | 'countdown' | 'playing' | 'scoring' | 'results';
timer: number;
score: number;
combo: number;
actions: Action[];
nextAction: Action;
team: 'ghana' | 'nigeria';
}
type Action = {
type: 'tap' | 'swipe';
ingredient?: 'rice' | 'tomato' | 'pepper' | 'onion' | 'spice';
direction?: 'left' | 'right' | 'stir';
timingWindow: number; // ms for perfect timing
}/api/scores/submit- Submit user score/api/leaderboard/daily- Get daily leaderboard/api/leaderboard/weekly- Get weekly team stats/api/rewards/claim- Claim NFT reward
interface LocalStorage {
userId: string;
team: 'ghana' | 'nigeria';
highScore: number;
tutorialComplete: boolean;
claimedRewards: string[];
}