Skip to content

๐ŸŽฏ Complete Dojo Starter: React + TypeScript frontend, Cairo smart contracts, achievement system, wallet integration, GitHub Actions deployment.

Notifications You must be signed in to change notification settings

AkatsukiLabs/Dojo-Game-Starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

46 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Dojo Game Starter

The fastest way to build onchain games on Starknet From zero to deployed in 5 minutes โšก

Dojo Engine ย ย ย  Dojo by Example ย ย ย  Starknet

โœจ What's Included

๐ŸŽจ 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

๐Ÿ› ๏ธ Tech Stack

Frontend: React + Vite + TypeScript + TailwindCSS + Zustand
Backend:  Cairo + Dojo Engine + Torii GraphQL Indexer
Network:  Starknet (Local/Sepolia/Mainnet)
Wallet:   Cartridge Controller

๐Ÿ“ฆ Project Structure

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

๐Ÿ“š Documentation

๐ŸŽจ Frontend Integration

The client/ directory contains a complete React + Dojo integration with comprehensive documentation:

๐Ÿ“– Client Documentation - Start here for frontend development

Complete Integration Guide Series:

โš™๏ธ Backend Development

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

๐ŸŽฎ Game Mechanics

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

๐ŸŽฏ Perfect For

  • ๐Ÿ† 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

๐Ÿš€ Key Features

โšก 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

๐ŸŒŸ Getting Started

  1. For Frontend Development: Start with Client README
  2. For Backend Development: Check Contracts README
  3. For Complete Understanding: Follow the Integration Guide Series

๐Ÿ”— Links


Built with โค๏ธ for the Starknet gaming community

About

๐ŸŽฏ Complete Dojo Starter: React + TypeScript frontend, Cairo smart contracts, achievement system, wallet integration, GitHub Actions deployment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •