The fastest way to build onchain games on Starknet From zero to deployed in 5 minutes ⚡
🎨 Frontend Ready
- React + Vite + TypeScript with complete Dojo integration
- Cartridge Controller wallet integration with session policies
- Real-time game UI with optimistic updates
- Comprehensive hooks for blockchain operations
⚙️ Backend Complete
- Cairo smart contracts with Dojo Engine architecture
- Player progression system with experience, health, and coins
- Integrated achievement system with 5+ achievements
- Production-ready deployment configuration
Frontend: React + Vite + TypeScript + TailwindCSS + Zustand
Backend: Cairo + Dojo Engine + Torii GraphQL Indexer
Network: Starknet (Local/Sepolia/Mainnet)
Wallet: Cartridge Controller
dojo-game-starter/
├── 📱 client/ # Complete React + Dojo integration
│ ├── src/dojo/ # Core Dojo integration files
│ │ ├── bindings.ts # TypeScript interfaces from Cairo
│ │ ├── dojoConfig.ts # Network and connection configuration
│ │ ├── contracts.gen.ts # Auto-generated contract functions
│ │ └── hooks/ # Custom React hooks for blockchain
│ ├── docs/ # 📚 Complete integration documentation
│ └── README.md # Frontend-specific documentation
├── ⚙️ contract/ # Cairo smart contracts
│ ├── src/
│ │ ├── models/ # Data entities (Player model)
│ │ ├── systems/ # Game logic (train, mine, rest)
│ │ ├── achievements/ # Achievement system implementation
│ │ └── store/ # Data layer abstraction
│ └── README.md # Backend development and deployment guide
└── tests/ # Integration tests
The client/ directory contains a complete React + Dojo integration with comprehensive documentation:
📖 Client Documentation - Start here for frontend development
Complete Integration Guide Series:
- 01. Overview - Architecture and concepts
- 02. Architecture - System design patterns
- 03. Core Files - Essential integration files
- 04. Zustand State Management - Optimistic updates
- 05. Cartridge Controller - Gaming wallet UX
- 06. React Hooks Pattern - Blockchain hooks
- 07. Data Flow - Request/response cycles
- 08. Extending the System - Building your game
The contract/ directory contains Cairo smart contracts with Dojo Engine:
📖 Contracts Documentation - Backend development guide
Key Topics Covered:
- Project Structure - Models, Systems, Store architecture
- Game Mechanics - Player actions (spawn, train, mine, rest)
- Achievement System - Complete trophy/task implementation
- Local Development - Katana, Sozo, Torii setup
- Sepolia Deployment - Production deployment process
- Testing Strategy - Integration tests and best practices
The starter demonstrates essential onchain game patterns:
| Action | Effect | Demonstrates |
|---|---|---|
| 🏋️ Train | +10 Experience | Pure advancement mechanics |
| ⛏️ Mine | +5 Coins, -5 Health | Risk/reward decision making |
| 💤 Rest | +20 Health | Resource management systems |
🏆 Achievement System:
- MiniGamer (1 action) → SenseiGamer (50 actions)
- Complete integration with frontend achievement display
- Automatic progress tracking for all game actions
- 🏆 Hackathon teams needing rapid onchain game setup
- 🎮 Game developers entering Web3 with production patterns
- 🏢 Studios prototyping blockchain games with real UX
- 📚 Developers learning Starknet + Dojo with comprehensive examples
⚡ Gaming-First UX
- Cartridge Controller integration eliminates wallet friction
- Session policies enable uninterrupted gameplay
- Optimistic updates provide instant feedback
- Background blockchain confirmation
🔧 Developer Experience
- Complete TypeScript integration end-to-end
- Hot reload with contract changes
- Comprehensive error handling patterns
- Production deployment configurations
🏗️ Scalable Architecture
- Modular component design for easy extension
- Reusable hooks for blockchain operations
- Clean separation between UI and blockchain logic
- Performance optimizations built-in
- For Frontend Development: Start with Client README
- For Backend Development: Check Contracts README
- For Complete Understanding: Follow the Integration Guide Series
Built with ❤️ for the Starknet gaming community