This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Match Toss — an Expo (SDK 54) React Native app for cricket coin tosses: flip an animated coin with sound/haptics, then scratch a digital card to reveal the winner. Ships to Google Play as com.eatmadi.matchtoss.
npx expo start # dev server (press a = Android, i = iOS, w = web)
npx expo start --web # web build directly (useful for headless screenshots)
npm run lint # expo lintThere are no tests.
Release (see TOOLS.md for the full walkthrough):
eas build -p android --profile production # builds an .aab
eas submit -p android --latest # submits to Play (draft track)app.json, eas.json, and the Play service-account key (matchtoss-*.json) are deliberately gitignored (past commits removed internal info). They exist only on the local machine; never commit them or re-add them to git. The store-relevant version is expo.version in app.json (package.json's version is not used).
Two-screen expo-router app under app/:
app/index.tsx— home/toss screen. Animated coin flip (rotateY), playscoinflip.mp3, then navigates to the reveal screen. The toss result is decided here and passed via route param.app/reveal.tsx— scratch-card reveal. Route is/reveal?outcome=head|tail(defaults to head). Scratching is a PanResponder drawing strokes into an SVG mask over the winner card; progress is tracked on a 30×30 grid. At 50% scratched it auto-reveals, plays a drum roll, shows a short countdown, then navigates home.
Things that are easy to get wrong:
- Brand colors are hardcoded inline in the two screen files, not centralized: gold
#d4af37, green#0f8f57, navy#0d2b45, off-white#f7f7f2, ink#0f172a.constants/theme.tsis unused Expo-template code — don't take it as the app palette. - Product Sans Bold (
assets/fonts/product_sans_bold.ttf) is loaded per-screen withuseFonts, family nameProductSansBold. - Coin faces are photos of a real ₹10 coin (
assets/images/head.png/tail.png) with white corners; they are masked round viaborderRadiusin styles — keep that when touching coin image styles. app/reveal.tsxcontains leftover styles for a Lottie celebration modal that is no longer rendered.
- Icon/splash source art is
assets/images/MatchToss.png(batsman mascot, white background — keep the background as-is per owner preference). It feedsapp-icon.png,adaptive-icon.png(mascot at ~66% on white, so Android's mask doesn't crop it),splash-icon.png, andfavicon.png. store-assets/holds the Play Console listing graphics (512×512 icon, 1024×500 feature graphic, framed phone/7"/10" tablet screenshots). Screenshots were captured from the running web build with headless Chrome/puppeteer and composed into branded HTML frames — regenerate the same way if screens change.- Never add stock imagery with watermarks; a watermarked
toss.pngwas removed for this reason.