Technology Stack
| Technology | Purpose |
|---|---|
| Next.js 15 | React framework with App Router |
| TypeScript | Type-safe development |
| Starknet.js | Blockchain interaction |
| Framer Motion | Animations |
| @cartridge/connector | Wallet integration |
Project Structure
Key Components
SlotGrid
Renders the 5×3 slot machine grid with spinning animations.PatternOverlay
Displays pattern match animations when patterns are detected.Game Modals
- MarketModal - Buy items with score
- InventoryModal - View owned items
- RelicModal - Equip relics
- InfoModal - Game rules and info
- PrizePoolModal - Current prize pool
Custom Hooks
useController
Manages Cartridge Controller connection:useGameContract
Provides contract interaction functions:State Management
Game state is managed with React hooks:Contract Interaction Flow
Pattern Detection
Patterns are detected client-side for immediate feedback:Animation System
Uses Framer Motion for smooth animations:- Level Up - Celebration animation
- Pattern Highlights - Box highlighting matched symbols
- Score Popups - Floating score numbers
- Relic Activation - Cinematic relic reveal
- 666 Game Over - Dramatic game end

