A thrilling Web3 space exploration game where NFT spaceships embark on dangerous missions for glory and rewards!
Mission Launch: Burn or Glory is an innovative blockchain-based space exploration game where players use NFT spaceships to embark on high-risk, high-reward missions. Each launch is a gamble - your ship might return victorious with GALACTIC tokens, or it might burn up in the void of space!
- 🛸 NFT Spaceships: Three unique ship classes with different rarity levels
- 🎯 Mission System: Launch dangerous space missions with real consequences
- 💰 GALACTIC Rewards: Earn cryptocurrency tokens for successful missions
- 📊 Dynamic Success Rates: Risk vs reward mechanics
- 🏪 Marketplace: Trade and discover new spaceships
- 📈 Fleet Management: Track your ships and mission history
- 🔗 Web3 Integration: Full MetaMask and Ethereum blockchain support
| Ship Type | Rarity | Mint Cost | Success Rate | Reward Multiplier |
|---|---|---|---|---|
| STELLAR VOYAGER | Common | 0.01 ETH | 65% | 1x |
| NEBULA HUNTER | Rare | 0.025 ETH | 55% | 1.5x |
| QUANTUM DESTROYER | Epic | 0.05 ETH | 45% | 2x |
- Select Your Ship: Choose from your NFT fleet
- Launch Mission: Approve your ship for the mission contract
- Risk Assessment: Each mission has a success/failure probability
- Results: Ships either return with rewards or are lost forever
- Rewards: Successful missions earn GALACTIC tokens
Before you begin, ensure you have:
- ✅ Node.js (v18 or higher)
- ✅ MetaMask browser extension
- ✅ Test ETH (for Sepolia testnet)
- ✅ Git for version control
-
Clone the repository
git clone https://github.com/auraCodesKM/code-day-prod.git cd code-day-prod -
Install dependencies
npm install # or yarn install -
Environment setup
cp .env.example .env.local
Configure your environment variables:
NEXT_PUBLIC_ALCHEMY_API_KEY=your_alchemy_api_key NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=your_project_id
-
Run the development server
npm run dev # or yarn dev -
Open your browser Navigate to http://localhost:3000
-
Navigate to smart contracts directory
cd smartcontracts npm install -
Compile contracts
npx hardhat compile
-
Deploy to testnet
npx hardhat run scripts/deploy.js --network sepolia
codeday-game/
├── 📁 app/ # Next.js App Router
│ ├── 📁 fleet/ # Fleet management page
│ ├── 📁 marketplace/ # NFT marketplace
│ ├── 📁 mission/ # Mission launch interface
│ └── 📄 page.tsx # Home page
├── 📁 components/ # Reusable React components
│ ├── 📄 Web3Provider.tsx # Web3 context provider
│ ├── 📄 NFTService.ts # NFT interaction service
│ └── 📄 ... # Other components
├── 📁 services/ # Business logic services
│ └── 📄 SpaceLaunchGameService.ts # Main game service
├── 📁 config/ # Configuration files
│ └── 📄 contracts.ts # Smart contract addresses
├── 📁 smartcontracts/ # Solidity smart contracts
├── 📁 public/ # Static assets
└── 📁 rockets/ # Spaceship assets
- View your NFT spaceship collection
- Track ship statistics and mission history
- Manage ship approvals for missions
- Select ships from your fleet
- Real-time mission probability calculations
- Blockchain transaction handling
- Mission result animations
- Browse available spaceships
- Mint new ships directly
- Trade with other players
- Rarity-based pricing
- Track successful launches
- Monitor GALACTIC token earnings
- View fleet performance metrics
- Mission success rates
- ERC-721 Standard: Full NFT compatibility
- Tiered Minting: Different costs for ship rarities
- Metadata Support: Rich ship attributes and imagery
- Approval System: Secure mission participation
- Mission Logic: Randomized success/failure mechanics
- Reward Distribution: Automatic GALACTIC token rewards
- Event Logging: Complete mission history on-chain
- Security: Ownership verification and approval checks
- ERC-20 Standard: GALACTIC reward tokens
- Mintable: New tokens created for successful missions
- Burnable: Tokens can be burned for special features
- Transferable: Full trading support
- Space Theme: Dark, cosmic visual design
- Smooth Animations: Framer Motion powered transitions
- Responsive Layout: Mobile and desktop optimized
- Interactive Elements: Hover effects and micro-interactions
- Sound Effects: Mission launch and result sounds
- Background Music: Atmospheric space soundtrack
- Audio Controls: Mute/unmute functionality
- Touch Optimized: Mobile-first design approach
- Responsive Grid: Adaptive layouts for all screen sizes
- Performance: Optimized for mobile Web3 browsers
# Smart contract tests
cd smartcontracts
npx hardhat test
# Frontend tests
npm run test- Sepolia Testnet: Primary testing environment
- Local Hardhat: Development and unit testing
- Goerli Testnet: Alternative testing network
# Build for production
npm run build
# Start production server
npm run start# Deploy to Vercel
vercel --prod# Deploy to mainnet (use with caution)
npx hardhat run scripts/deploy.js --network mainnetWe welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow TypeScript best practices
- Write comprehensive tests
- Update documentation
- Follow the existing code style
This project is licensed under the MIT License - see the LICENSE file for details.
Found a bug? Please create an issue with:
- Detailed description
- Steps to reproduce
- Expected vs actual behavior
- Screenshots (if applicable)
Have an idea? We'd love to hear it! Open an issue with:
- Feature description
- Use case explanation
- Implementation suggestions
- Ethereum Foundation for blockchain infrastructure
- Next.js Team for the amazing framework
- OpenZeppelin for secure smart contract libraries
- Alchemy for reliable Web3 infrastructure
- Framer for beautiful animations
Made with ❤️ by the Burn or Glory Team
May your missions be successful and your ships return home safely! 🚀