Native React Native + Expo mobile client for ChessPlay.
This is not a WebView or Capacitor wrapper. It is a TypeScript Expo app with native navigation, secure token storage, TanStack Query data fetching, Zustand state, Socket.IO multiplayer, and local chess move validation with chess.js.
- Expo SDK 54
- React Native 0.81
- TypeScript
- Expo Router
- TanStack Query
- Zustand
- Expo SecureStore
- socket.io-client
- chess.js
npm install
cp .env.example .envSet local .env values:
EXPO_PUBLIC_API_URL=https://api.getchessplay.com/api
EXPO_PUBLIC_SOCKET_URL=https://api.getchessplay.comThen validate:
npm run typecheck
npm run lint.env.example intentionally ships with blank values so local and CI environments must choose their target explicitly. Do not use localhost for production builds.
Use https://api.getchessplay.com/api and https://api.getchessplay.com for production. The legacy Render URL is only a temporary staging target.
npm startOpen the project in Expo Go for quick JavaScript-level testing. Use a development build for native behavior that Expo Go does not cover.
Run EAS project setup once before hosted builds:
npx eas initBuild Android development APK:
npx eas build -p android --profile developmentBuild iOS simulator development app:
npx eas build -p ios --profile development- Splash and onboarding
- Login, register, and forgot-password request
- JWT/session token storage with SecureStore
- Auth-guarded app routes
- Home dashboard
- Local practice chess board for legal-move validation
- Online matchmaking, create room, join room
- Live chess board with touch selection, legal move highlights, move history, draw offer, resign
- Promotion picker for pawn promotion
- Live room chat
- Profile, profile editing, and recent game history
- Leaderboard
- Friends, player search, message threads, and conversation detail
- Puzzle training screen using backend puzzle APIs
- Settings sync with dark/light theme and sound preferences
- Loading, empty, error, and network failure handling
- EAS-ready config
The mobile app uses the existing ChessPlay backend as-is. Missing mobile-specific APIs are documented in docs/backend-mobile-gaps.md, with broader implementation sequencing in docs/mobile-roadmap.md.
Install EAS CLI if needed:
npm install -g eas-cliConfigure the real production environment in your shell or EAS environment:
export EXPO_PUBLIC_API_URL=https://api.getchessplay.com/api
export EXPO_PUBLIC_SOCKET_URL=https://api.getchessplay.comReplace placeholder assets in assets/ before store submission:
assets/icon.pngassets/adaptive-icon.pngassets/splash.pngassets/favicon.png
Validate locally:
npm run typecheck
npm run lint
npx expo export --platform android --output-dir dist-validation
rm -rf dist-validationBuild Android App Bundle:
npx eas init
npx eas build -p android --profile productionSubmit after Play Console setup:
npx eas submit -p android --profile productionThe production Android profile emits an .aab.
An Apple Developer account is required.
export EXPO_PUBLIC_API_URL=https://api.getchessplay.com/api
export EXPO_PUBLIC_SOCKET_URL=https://api.getchessplay.com
npx eas init
npx eas build -p ios --profile productionThen submit to App Store Connect:
npx eas submit -p ios --profile productionSee docs/release-ios.md for TestFlight and App Store steps.
- Google Play release guide
- iOS release guide
- Privacy policy draft
- Store listing draft
- Backend mobile gaps
npm run typecheck
npm run lint
npx expo config --type public
npx expo export --platform android --output-dir dist-validationFor device testing:
npm startThen open the app in Expo Go or a development build.