Frontend for GAMESOL, an on-chain space strategy game on Solana.
The current app is a React + TypeScript client for the game_state and
market programs in the main Chained Universe backend repository. Gameplay
uses wallet identity plus a wallet-approved in-app vault for routine actions.
- wallet connection with Phantom, Solflare, and mobile wallet handoff
- first-time homeworld creation
- multi-planet loading and planet switching
- resource production, storage, and energy tracking
- building, research, shipyard, and defense queues
- instant-finish actions powered by ANTIMATTER
- fleet launch and mission resolution flows
- galaxy browsing with owned and foreign planets
- espionage and battle report surfaces
- player-to-player resource and planet market
- alliance creation, join requests, treasury deposits, and leader upgrades
- quest, store, shield, and vault-management UI
The Solana programs and deployment scripts live here:
https://github.com/SrMessiSOL/chained-universe
Program IDs and account layouts are mirrored in src/game-state.ts and
src/market-client.ts. Keep those files aligned with backend deployments.
- React 18
- TypeScript 5
- Vite 8
- Anchor client utilities
@solana/web3.js- Solana wallet adapter
- Capacitor for Android builds
src/App.tsx: app shell, tabs, wallet lifecycle, vault UI, and gameplay actionssrc/game-state.ts: game-state account decoding, PDA derivation, and transactionssrc/market-client.ts: market account decoding, PDA derivation, and transactionssrc/Markettab.tsx: resource and planet market UIsrc/GalaxyTab.tsx: galaxy browser and mission launchersrc/GalaxyMap.tsx: map rendering for owned and foreign planetssrc/mobileWalletAdapter.ts: mobile wallet bridgeandroid/: Capacitor Android project
- Node.js 18 or newer
- npm
- a Solana wallet such as Phantom or Solflare
npm install
npm run devDefault Vite URL:
http://localhost:5173
npm run buildRun the same production checks used by GitHub Actions:
npm ci --legacy-peer-deps
npm run verifyThis compiles TypeScript, builds the production bundle, and fails on high or
critical production dependency advisories. It runs automatically on every pull
request and every push to main.
Before deploying to a new cluster, verify:
GAME_STATE_PROGRAM_IDMARKET_PROGRAM_ID- ANTIMATTER mint
- USDC mint
- treasury/admin wallet assumptions
- RPC endpoint
- Vercel environment variables
After frontend changes:
npx cap sync android
cd android
./gradlew assembleDebugOn Windows, use npm.cmd / npx.cmd if PowerShell blocks script shims.