{"id":28475087,"url":"https://github.com/nothingdao/earth","last_synced_at":"2025-08-09T07:45:59.558Z","repository":{"id":296132664,"uuid":"992279304","full_name":"nothingdao/earth","owner":"nothingdao","description":"Web3 post-apocalyptic survival game with Solana NFT characters, real-time multiplayer, autonomous NPC system, and complex EARTH token economy","archived":false,"fork":false,"pushed_at":"2025-07-02T02:57:33.000Z","size":15827,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-02T03:28:31.408Z","etag":null,"topics":["blockchain-gaming","character-creation","crypto-gaming","gaming-defi","metaverse","multiplayer","netlify-functions","npc-engine","post-apocalyptic","react-game","solana-nft","supabase-realtime","survival-game","token-economy","typescript-game","virtual-economy","web3-game","web3-rpg"],"latest_commit_sha":null,"homepage":"https://earth.ndao.computer","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nothingdao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-28T22:46:19.000Z","updated_at":"2025-07-02T02:57:49.000Z","dependencies_parsed_at":"2025-06-13T15:40:36.183Z","dependency_job_id":"11491416-0ef2-496c-b1cd-4b16324a2475","html_url":"https://github.com/nothingdao/earth","commit_stats":null,"previous_names":["nothingdao/wojak-earth","nothingdao/earth"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nothingdao/earth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nothingdao%2Fearth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nothingdao%2Fearth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nothingdao%2Fearth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nothingdao%2Fearth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nothingdao","download_url":"https://codeload.github.com/nothingdao/earth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nothingdao%2Fearth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269548441,"owners_count":24436106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain-gaming","character-creation","crypto-gaming","gaming-defi","metaverse","multiplayer","netlify-functions","npc-engine","post-apocalyptic","react-game","solana-nft","supabase-realtime","survival-game","token-economy","typescript-game","virtual-economy","web3-game","web3-rpg"],"created_at":"2025-06-07T14:05:17.141Z","updated_at":"2025-08-09T07:45:59.528Z","avatar_url":"https://github.com/nothingdao.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Earth 2089\n\n**Web3 post-apocalyptic survival game** with Solana NFT characters, real-time multiplayer, autonomous NPC system, and complex EARTH token economy.\n\n![Earth 2089 Banner](public/earth-og-image.jpg)\n\n## Overview\n\nEarth 2089 is a blockchain-based survival RPG set in a post-apocalyptic world where players mint NFT characters, explore a dangerous wasteland, mine resources, trade items, and build their survival empire. The game features a sophisticated economy backed by the EARTH token and powered by Solana blockchain technology.\n\n## 🎮 Game Features\n\n### Core Gameplay\n- **Character Creation \u0026 NFT Minting** - Create unique survivors with visual customization (2 SOL mint cost)\n- **Post-Apocalyptic Exploration** - Navigate dangerous zones on an interactive world map\n- **Mining \u0026 Resource Gathering** - Extract valuable materials while managing energy and health\n- **Real-Time Trading** - Buy and sell items in dynamic player-driven markets\n- **Character Progression** - Level up through exploration, mining, and trading\n- **Equipment System** - Customize appearance with clothing, accessories, and gear\n\n### Web3 Integration\n- **Solana NFT Characters** - Each character is a unique NFT with metadata and visual traits\n- **EARTH Token Economy** - In-game currency backed by SOL with transparent tokenomics\n- **Multi-Wallet Support** - Phantom, Solflare, and other Solana wallet adapters\n- **Blockchain Trading** - Secure, transparent item and character trading\n- **Token Bridge** - Exchange between in-game EARTH and external currencies\n\n### Multiplayer Features\n- **Real-Time Chat** - Communicate with other players in your current location\n- **Live Player Tracking** - See who's active in each zone\n- **Leaderboards** - Compete for top rankings in wealth, level, and achievements\n- **Social Economy** - Player-driven markets and collaborative gameplay\n\n### Autonomous NPCs\n- **AI-Powered Characters** - Autonomous NPCs that mine, trade, and interact\n- **Dynamic Economy** - NPCs contribute to market activity and price discovery\n- **Behavioral Variety** - Different NPC personalities and activity patterns\n- **Real-Time Integration** - NPCs operate continuously in the game world\n\n## 🏗️ Technical Architecture\n\n### Frontend\n- **React 19** with TypeScript and Vite build system\n- **Tailwind CSS 4** with shadcn/ui component library\n- **D3.js** for interactive SVG world map\n- **WebSocket** connections for real-time features\n- **React Context** providers for state management\n\n### Backend Infrastructure\n- **Netlify Functions** - 40+ serverless API endpoints\n- **Supabase** - Real-time database with live subscriptions\n- **Solana Web3.js** - Blockchain operations and wallet integration\n- **Node.js NPC Engine** - Autonomous character system\n\n### Database \u0026 Real-Time\n- **PostgreSQL** via Supabase with auto-generated TypeScript types\n- **Real-time subscriptions** for live gameplay features\n- **Location-based data** for world map interactions\n- **Character persistence** with equipment and stats\n\n## 🎯 Getting Started\n\n### Prerequisites\n- Node.js 22+\n- Solana wallet (Phantom recommended)\n- 2+ SOL for character minting\n- Android Studio (for mobile development)\n\n### Development Setup\n\n1. **Clone and install:**\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd earth\n   npm install\n   ```\n\n2. **Environment setup:**\n   ```bash\n   cp .env.example .env\n   # Edit .env with your actual values\n   ```\n   - Configure Supabase credentials\n   - Set up Solana RPC endpoints\n   - Add wallet keypairs for development\n\n3. **Development servers:**\n   ```bash\n   # Frontend development\n   npm run dev\n\n   # Backend functions\n   npm run functions:dev\n\n   # NPC engine\n   npm run npc:dev\n\n   # Generate database types\n   npm run types\n   ```\n\n4. **Access the game:**\n   - Frontend: `http://localhost:5173`\n   - Backend: `http://localhost:8888`\n\n5. **Android development:**\n   ```bash\n   # Build and run Android app\n   npm run build\n   npx cap sync android\n   npx cap run android\n   ```\n\n## 💰 Economy \u0026 Tokenomics\n\n### Character NFT Minting\n- **Cost:** 2 SOL per character NFT\n- **Distribution:**\n  - 1.0 SOL → EARTH token purchase\n  - 0.75 SOL → Development reserve\n  - 0.25 SOL → System inventory backing\n\n### EARTH Token\n- **Backed Currency** - Every EARTH token has SOL backing\n- **Starting Amount** - New characters begin with 1,200 EARTH\n- **Use Cases** - Mining equipment, trading, travel, items\n- **Exchange Rate** - 1 EARTH ≈ $1 USD equivalent\n\n### In-Game Economy\n- **Player-Driven Markets** - Dynamic pricing based on supply/demand\n- **Resource Scarcity** - Limited resources create competitive mining\n- **Economic Zones** - Different areas have varying resource availability\n- **NPC Market Activity** - Autonomous characters contribute to liquidity\n\n## 🗺️ World \u0026 Locations\n\n### Interactive Map\n- **SVG-Based Rendering** - Scalable vector graphics with D3.js\n- **Zone-Based Travel** - Energy costs and health risks vary by region\n- **Real-Time Population** - See active players in each location\n- **Resource Distribution** - Different zones offer unique mining opportunities\n\n### Location Types\n- **Safe Zones** - Low risk, basic resources, player hubs\n- **Mining Regions** - High-value resources, moderate danger\n- **Wasteland** - Extreme risk, rare materials, PvP zones\n- **Trading Posts** - Commercial hubs with NPC merchants\n\n## 🤖 NPC Engine\n\n### Autonomous Behavior\n- **Independent Decision Making** - NPCs choose actions based on AI logic\n- **Economic Participation** - Buy, sell, mine, and accumulate resources\n- **Social Interaction** - Chat and respond to player communications\n- **Realistic Simulation** - Energy, health, and economic constraints\n\n### Configuration\n- **Behavior Profiles** - Different NPC personality types\n- **Activity Schedules** - Mining, trading, and rest cycles\n- **Economic Settings** - Spending patterns and market participation\n- **Location Preferences** - Zone-specific NPC distributions\n\n## 📱 Game Screens\n\n### Core Views\n- **Character Creation** - Visual customization and NFT minting\n- **World Map** - Interactive travel and location selection\n- **Mining Interface** - Resource extraction with risk/reward mechanics\n- **Inventory Management** - Equipment and item organization\n- **Market Trading** - Buy/sell interface with real-time pricing\n- **Chat System** - Location-based communication\n- **Profile \u0026 Stats** - Character progression and achievements\n\n### Admin Dashboard\n- **Economy Overview** - Market data and token metrics\n- **Player Analytics** - Activity, retention, and engagement stats\n- **NPC Management** - Configure autonomous character behavior\n- **Content Management** - Items, locations, and game balance\n\n## 🔧 Development Commands\n\n```bash\n# Development\nnpm run dev              # Start Vite dev server\nnpm run functions:dev    # Start Netlify dev with functions\nnpm run npc:dev         # Run NPC engine in development\n\n# Production\nnpm run build           # Build for production\nnpm run functions:build # Build Netlify functions\nnpm run npc:start      # Start NPC engine in production\n\n# Android Development\nnpx cap sync android    # Sync web assets to Android\nnpx cap run android     # Build and run Android app\nnpx cap open android    # Open Android Studio\n\n# Utilities\nnpm run lint           # ESLint checking\nnpm run types          # Generate Supabase types\n```\n\n## 🎨 Asset System\n\n### Character Customization\n- **Layered Assets** - Modular clothing and accessory system\n- **Gender Options** - Male and female base models\n- **Equipment Variety** - Clothing, outerwear, accessories, tools\n- **Visual Persistence** - Character appearance saved to blockchain\n\n### Asset Categories\n- **Base Models** - Core character foundations\n- **Clothing** - T-shirts, jackets, specialized gear\n- **Accessories** - Sunglasses, jewelry, tools\n- **Equipment** - Mining gear, weapons, survival tools\n\n## 🛠️ Technical Stack\n\n- **Frontend:** React 19, TypeScript, Vite, Tailwind CSS 4\n- **Mobile:** Capacitor for Android app, Solana Mobile Stack compatible\n- **UI Components:** Radix UI, shadcn/ui\n- **Blockchain:** Solana Web3.js, SPL Token, Metaplex\n- **Database:** Supabase (PostgreSQL) with real-time subscriptions\n- **Backend:** Netlify Functions, Node.js NPC engine\n- **Graphics:** D3.js for maps, Canvas for character rendering\n- **Real-Time:** WebSocket connections, Supabase subscriptions\n\n## 📄 Documentation\n\n- **[API Documentation](API.md)** - Complete API reference\n- **[Android Development](ANDROID.md)** - Mobile development and Solana Mobile integration\n- **[Tokenomics](TOKENOMICS.md)** - Economic mechanics and token design\n- **[Map System](MAP.md)** - World geography and location details\n- **[Development Guide](CLAUDE.md)** - Architecture and coding standards\n- **[Roadmap](EARTH%202089-Seasons-Roadmap.md)** - Feature development timeline\n\n## 🚀 Deployment\n\n### Production Environment\n- **Frontend:** Netlify static hosting\n- **Functions:** Netlify serverless functions\n- **Database:** Supabase managed PostgreSQL\n- **Blockchain:** Solana mainnet integration\n\n### Environment Variables\n- `VITE_SUPABASE_URL` - Supabase project URL\n- `VITE_SUPABASE_ANON_KEY` - Supabase anonymous key\n- `VITE_SOLANA_RPC_URL` - Solana RPC endpoint\n- `VITE_ENVIRONMENT` - Environment flag (dev/prod)\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Follow TypeScript and React best practices\n4. Test with local NPC engine\n5. Submit pull request with detailed description\n\n## 📜 License\n\nThis project uses **dual licensing**:\n\n### Code License\nThe source code is licensed under **MIT License** - see [LICENSE](LICENSE) file for details.\n- ✅ Free to use, modify, and distribute\n- ✅ Commercial use allowed\n- ✅ Build your own projects with this code\n\n### Assets License\nAll visual assets, artwork, and creative content are **proprietary** - see [ASSETS_LICENSE](ASSETS_LICENSE) file for details.\n- ❌ Assets cannot be used commercially\n- ❌ Cannot create competing games with our assets\n- ❌ Character designs, logos, and branding are protected\n- ✅ Code study and local development allowed\n\n**Summary:** Use our code to build amazing games, but create your own visual identity and assets!\n\n## 🔗 Links\n\n- **Live Game:** [Coming Soon]\n- **Documentation:** See `/docs` folder\n- **Community:** [Discord Community](https://discord.gg/nothingdao)\n- **Support:** GitHub Issues\n\n---\n\n*Earth 2089 - Survive the wasteland, build your empire, own your destiny.*","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnothingdao%2Fearth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnothingdao%2Fearth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnothingdao%2Fearth/lists"}