A decentralized farming simulation game built on the Internet Computer Protocol (ICP). Manage your cherry orchards, expand your farm, and become a cherry tycoon!
- ๐ Farm Management - Manage multiple parcels across 16 Polish provinces
- ๐ณ Tree Lifecycle - Realistic 0-40 year tree progression system
- ๐ Harvest System - Dynamic yield calculation based on soil, water, and tree age
- โป๏ธ Organic Farming - 2-season organic conversion with 40% price premium
- ๐ฐ Market Trading - Sell cherries via retail or wholesale channels
- ๐ Progression System - Level up through experience points
- Tree Age Modifier - Trees produce different yields at different ages
- Soil Chemistry - pH levels, fertility, and soil types affect yields
- Water Management - Irrigation system with depletion over seasons
- Infrastructure - Upgradeable facilities (warehouses, cold storage, tractors)
- Seasonal Costs - Realistic operating expenses each season
- Tree Density Limits - Maximum 400 trees per hectare
โโโโโโโโโโโโโโโโโโโ
โ React Frontend โ (Vite + TypeScript + Tailwind)
โโโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโผโโโโโโ
โ ICP SDK โ (@dfinity/agent)
โโโโโโฌโโโโโโ
โ
โโโโโโโโโโผโโโโโโโโโ
โ Motoko Backend โ (Internet Computer Canister)
โโโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโผโโโโโโ
โ Stable โ
โ Storage โ
โโโโโโโโโโโโ
- Node.js 18+ and npm
- DFX (Internet Computer SDK)
- Git
See Environment Setup Guide for detailed installation instructions.
-
Clone the repository
git clone https://github.com/YOUR_USERNAME/mark-vinicius-cherry-tycoon.git cd mark-vinicius-cherry-tycoon -
Install frontend dependencies
cd frontend npm install -
Start local ICP replica (in WSL/Linux)
dfx start --background --clean
-
Deploy backend canister
dfx deploy backend
-
Start frontend dev server
cd frontend npm run dev -
Open browser
http://localhost:5173
mark-vinicius-cherry-tycoon/
โโโ backend/ # Motoko backend
โ โโโ main.mo # Playground entrypoint (classic actor, dfx 0.24.3)
โ โโโ main_mainnet.mo # Mainnet entrypoint (EOP persistent actor, dfx 0.30+)
โ โโโ types.mo # Type definitions
โ โโโ game_logic.mo # Game formulas
โโโ frontend/ # React frontend
โ โโโ src/
โ โ โโโ pages/ # UI pages
โ โ โโโ hooks/ # Custom hooks
โ โ โโโ lib/ # Utilities
โ โ โโโ types/ # TypeScript types
โ โ โโโ providers/ # Context providers
โ โโโ package.json
โโโ docs/ # Documentation
โโโ dfx.json # ICP configuration
โโโ test-backend.ps1 # Test script (20 tests)
โโโ README.md
- Cash: 50,000 PLN
- Parcel: 0.5 hectares in Opole Province
- Trees: 50 cherry trees (5 years old)
- Soil: Sandy-clay (optimal)
- Tree Planting: 50 PLN per tree
- Watering: 200 PLN per action
- New Parcel: 60,000 PLN per hectare
- Cherry Prices: 10-25 PLN/kg (varies by type/channel)
- Organic Premium: +40% price
- Year 0: Newly planted (no harvest)
- Year 1-2: Reduced yield (33%, 66%)
- Year 3-40: Peak production (100%)
- Year 40+: Trees die (must replant)
This project uses a dual-entrypoint architecture to support both the IC Playground (limited cycles) and mainnet (full EOP).
| Target | Entry File | DFX Version | Actor Type | Command |
|---|---|---|---|---|
| Playground | main.mo |
0.24.3 | Classic actor + stable var |
dfx deploy backend --playground |
| Mainnet | main_mainnet.mo |
0.30+ | persistent actor (EOP) |
dfx deploy backend_mainnet --network ic |
# Install multiple dfx versions
dfxvm install 0.24.3
dfxvm install latest
# For playground testing
dfxvm use 0.24.3
dfx deploy backend --playground
# For mainnet/modern local dev
dfxvm use latest
dfx deploy backend_mainnet- Playground: Auto-deploys on push to
masterviadeploy-playground.yml(dfx 0.24.3) - Mainnet: Manual trigger via
deploy-mainnet.yml(dfx 0.30.2, requires confirmation)
Run comprehensive backend tests:
.\test-backend.ps1This runs 20 tests covering:
- Player initialization
- Parcel operations (harvest, water, fertilize, plant)
- Market transactions
- Organic conversion
- Tree density validation
- Season progression
- Setup Guide - Deployment instructions
- Environment Setup - Prerequisites installation
- Project Summary - Complete overview
- Game Design Document - Full GDD
- React 18 - UI framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- React Query - State management
- React Router - Navigation
- Lucide React - Icons
- Motoko - Smart contract language
- Internet Computer - Blockchain platform
- Stable Storage - Data persistence
- @dfinity/agent - ICP SDK
- @dfinity/auth-client - Internet Identity (ready)
- โ Mobile-first responsive design
- โ Vibrant gradients and animations
- โ Loading states with spinners
- โ Error handling with retry
- โ Real-time data updates
- โ Color-coded status indicators
- โ Progress bars (water, fertility)
- โ Interactive sliders
- 2,537 lines of code
- 25 files created
- 18+ backend functions
- 3 UI pages
- 20 comprehensive tests
- Backend with all game mechanics
- Enhanced game systems
- Frontend UI
- Backend integration
- Toast notifications
- Modals and dialogs
- Animations
- Internet Identity auth
- Weather system
- Market dynamics
- AI competitors
- Sports management
- Achievements
- IC mainnet deployment
- Custom domain
- Analytics
- Performance optimization
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with โค๏ธ for the Internet Computer ecosystem
- Inspired by classic farming simulation games
- Produced by JaPiTo Group
- GitHub: @YOUR_USERNAME
- Project: Mark Vinicius Cherry Tycoon
Ready to play! ๐๐