Welcome to the Galactic Sticker Packs workshop! This is a complete project that will teach you how to build a gamified NFT application on Aptos using Move and React.
Galactic Sticker Packs is an NFT collection game where users can:
- Buy packs for 0.1 APT each
- Open packs to reveal 3 random NFTs
- Collect galactic characters with different rarity levels
- View their collection in an interactive gallery
- 3 unique collections: Alien, Predator, Yoda
- 6 rarity levels: Common (30%), Uncommon (25%), Rare (20%), Epic (12%), Legendary (8%), Mythic (5%)
├── galactic-warriors-web/ //web to interact
├── move/ //aptos modules
└── README.md
- Node.js (version 16 or higher)
- Aptos CLI installed
- Petra Wallet (browser extension)
-
Clone the repository:
git clone <repository-url> cd galactic-sticker-packs
-
Install dependencies:
npm install
-
Configure Aptos CLI:
aptos init --network testnet --profile default --assume-yes
-
Install Petra Wallet:
- Go to petra.app
- Install the browser extension
- Create a new account
-
Get testnet APT:
- Go to aptos.dev/network/faucet
- Request testnet APT for your address
-
Compile, test and deploy the module:
aptos move compile
aptos move testaptos move deploy
-
Set envireoment vars:
- Go to geomi.dev/
- Create new project
- Create New API Resource (testnet)
- Set it as APTOS_API_KEY in .env.local
- CREATOR_PRIVATE_KEY should be defined in move/.aptos/config.yaml as private_key (after aptos init)
-
Start development server:
npm run dev
-
Open your browser at
http://localhost:3000
- Connect your wallet using the "Connect with Petra" button
- Buy a pack for 0.1 APT
- Open the pack to reveal your NFTs
- Explore your gallery to see your collection
init_module(): Initializes the game by creating NFT collections and minting packsbuy_pack(): Allows buying a pack for 0.1 APTopen_pack(): Opens a pack and generates 3 random NFTs with balanced rarity- Rarity system: tier rarity system with weighted probabilities
- Supply limit: Maximum 100 packs available
- Wallet Integration: Connection with Petra Wallet
- Mulit-agent Trensaction: Signatures from server and client
After completing this workshop, you will learn:
- Move Development: Structures, functions, and resources
- NFT Tokens: Aptos Token v2 standard
- Web3 Integration: Connection with wallets and blockchain
- Blockchain APIs: GraphQL queries to Indexer
Enjoy building your galactic collection! 🌟🚀