CLAUDE.md
CLAUDE.mdCLAUDE.mdroot
Quality
66/100
Scores the file, not the repository.Length
460 words
18 headings · 2 code blocksRepository
18
— · pushed 208 days agoLast changed
3 days ago
First indexed 3 days ago.1# CLAUDE.md23This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.45## Common Development Commands67### Frontend Development8```bash9# Install dependencies10cd frontend && npm install1112# Start development server (uses Expo)13cd frontend && npx expo start1415# Start with specific Starknet environment16cd frontend && npm run start:devnet # For local devnet17cd frontend && npm run start:sepolia # For Sepolia testnet18cd frontend && npm run start:mainnet # For mainnet1920# Run on specific platforms21cd frontend && expo run:android22cd frontend && expo run:ios2324# Linting25cd frontend && npx expo lint26cd frontend && npx expo lint --fix2728# Run tests (Jest)29cd frontend && npm test30```3132### Smart Contract Development33```bash34# Build contracts35cd onchain && scarb build3637# Run tests38cd onchain && snforge test3940# Deploy contracts41cd onchain/scripts && ./deploy-devnet.sh # Deploy to devnet42cd onchain/scripts && ./deploy-sepolia.sh # Deploy to Sepolia43cd onchain/scripts && ./deploy-mainnet.sh # Deploy to mainnet4445# Setup contracts after deployment46cd onchain/scripts && ./setup-contracts.sh47```4849## Architecture Overview5051### Frontend Architecture52POW! is a React Native mobile game using Expo Router for file-based navigation. The frontend follows a modular architecture with:5354- **State Management**: Zustand stores in `/frontend/app/stores/` manage game state, user data, blockchain interactions, and UI state55- **Blockchain Integration**: Multiple React contexts in `/frontend/app/contexts/` handle different blockchain connections (StarknetJS, AVNU SDK)56- **Game Logic**: Custom hooks in `/frontend/app/hooks/` encapsulate game mechanics, timers, and state calculations57- **Component Structure**: Page components use store observers for reactive updates and delegate logic to hooks5859Key architectural patterns:60- Store observers trigger re-renders when relevant state changes61- Hooks calculate derived state from stores and manage game intervals62- Context providers wrap the app to provide blockchain connectivity63- Environment variables control which blockchain network to connect to6465### Smart Contract Architecture66The onchain contracts use Cairo and follow a modular component-based design:6768- **Core Contract**: `pow_game` contract in `/onchain/src/pow_game.cairo` is the main entry point69- **Component System**: Separate components for different game features (upgrades, prestige, builders, staking)70- **Upgradeability**: Uses OpenZeppelin's upgradeable contract pattern71- **Security**: Leverages OpenZeppelin components for standard security features7273Contract interaction flow:741. Frontend uses Starknet.js to call contract methods752. Embedded wallet (AVNU SDK) sponsors gas fees for users763. Game state is stored on-chain and synced to frontend stores774. Events emitted by contracts update frontend state7879### Key Integration Points80- **Account Creation**: Uses OpenZeppelin Smart Account with AVNU paymasters for gasless transactions81- **State Sync**: Frontend polls blockchain for state updates and caches in Zustand stores82- **Asset Management**: Game assets (images, sounds, fonts) are bundled with the app83- **Configuration**: JSON files define game mechanics, balancing, and progression curves
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.4k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 3 days ago | |
| Adit-Jain-srm/NightmareNetCLAUDE.md · 45 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 3 days ago | |
| microsoft/playwrightCLAUDE.md · 94k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 3 days ago | |
| dotCMS/coreCLAUDE.md · 949 | CLAUDE.md | setupbuildteststyle+7 | 99/100 | today | |
| lollipopkit/flutter_server_boxCLAUDE.md · 8.3k | CLAUDE.md | buildteststylearch+2 | 98/100 | 3 days ago | |
| carrot-foundation/middle-earthCLAUDE.md · 0 | CLAUDE.md | setupbuildtestlint-format+6 | 97/100 | 3 days ago | |
| caliber-ai-org/ai-setupCLAUDE.md · 1.2k | CLAUDE.md | buildtestlint-formatstyle+1 | 97/100 | 3 days ago |
