All projectsVinay Kumar Vemula
LiveIntermediateOngoing

GUESSIFY

Guessify is a number-guessing game for Android. Pick Easy (1–50), Medium (1–100) or Hard (1–1,000), then narrow the secret using four-way directional feedback: too high, high, low, too low. Two tactical hints reveal a tighter range, then parity and digit sum; both cost points. Solo runs are scored on attempts and hints, with a 50-point floor for a win.

ExpoReact NativeTypeScriptFirebaseFirestoreGit
GUESSIFY screenshot 1

A fair game without a game server

Guess-the-number is easy to build badly: a random number, a compare, a win screen. To make it worth replaying, the feedback has to help without giving the answer away, the score has to reward efficient play rather than luck, and a duel has to stay in sync across two phones. The harder constraint was the backend: Firebase Spark rules out Cloud Functions, so every integrity guarantee had to come from security rules, capped writes, idempotent match IDs and a client-side referee model.

One source of truth and a referee

Expo SDK 57 with React Native 0.86, React 19, TypeScript and Expo Router. Firebase Auth handles email/password and anonymous guest sessions; Firestore stores profiles, matches, rooms and leaderboard period documents. AppContext composes auth, settings, solo, duel, board and outbox state, while services wrap auth, Firestore, AsyncStorage and the outbox. Every scoring constant and stage definition lives in src/constants/gameRules.ts, which feeds both the stage picker and the in-app rulebook. In duels, the setter's device keeps the secret in memory and scores each guess; Firestore rules reject the secret while a round is PLAYING, and only the referee can write a result. Weekly and monthly boards are real documents keyed in UTC (2026-W43, 2026-10).

What was actually hard

  • ▸Four-way feedback without leaking the answer — a ±12% window around the target, scaled to the range, turns higher/lower into four signals; the same helper drives solo and duel feedback.
  • ▸Fair duels on Spark — the setter's phone is the referee, the target stays out of Firestore while PLAYING, and a Firestore transaction checks whose turn it is and whether the round is still live before a guess lands.
  • ▸Awards that survive retries — every result uses a client match ID as the document ID and setDoc, so a retry or outbox flush overwrites the same document instead of double-counting points.
  • ▸Period boards that agree across time zones — weekly and monthly keys use UTC calendar parts, so every client rolls over at the same instant instead of local midnight.

What broke (and what I learned)

The 1.0 build shipped with confident copy that the code did not support: the About screen claimed server-side score validation, the rulebook gave the setter a 10-attempt cap that never existed, and the rank card showed a hardcoded "Gold II". v1.1.0 replaced all of it with values derived from gameRules.ts and the player's real stats. The lesson was smaller than the bug: if a rule is shown to a player, it should be read from the same constant that enforces it.

3

Solo stages

3

Duel modes

19

Engine tests

28

Security-rules tests

Gallery

Guessify dashboard showing 695 points, a 50% win rate, and the solo and 1v1 mode cards.
Guessify solo difficulty picker with Easy, Medium and Hard stage cards.
A live Easy solo run with the range narrowed to 52–100 after a 51 guess.
Guessify multiplayer menu with an invite code, host lobby and join game card.
A private 1v1 duel lobby showing the six-character room code and both players ready.
Duel mode selection with Race Mode and both setter-only modes.
A live 1v1 duel showing the match log, remaining shields and a too-high guess.
Weekly leaderboard with Vinnyyy first at 3,700 points and Guest_gQSvY second at 695.
Guessify profile showing Gold tier, 695 points, career stats, achievements and navigation.
Complete project notes
OVERVIEW Guessify is a small Android game with a deliberately narrow loop: pick a stage, narrow a secret number, and get scored on how efficiently you do it. The project became an exercise in making a casual game feel fair without running a game server. The app is built with Expo SDK 57, React Native 0.86, React 19 and TypeScript, with Firebase Auth and Firestore on the free Spark plan. There are no Cloud Functions, no App Check and no paid services. WHAT SHIPPED IN 1.1.0 - Three solo stages: Easy 1–50 (8 guesses, 500 base), Medium 1–100 (10 guesses, 800 base), Hard 1–1,000 (15 guesses, 1,200 base). - Four-way feedback: too high, high, low and too low, with a ±12% "close" window scaled to the stage range. - Two hints per run: a narrowed range, then parity and digit sum. Each costs 50 points. - Score = max(50, base - 25 × (attempts - 1) - 50 × hints used). A loss or surrender scores 0. - Live 1v1 duels with six-character room codes, three modes, 30-second turns, winner +150 and the other player +45. - Weekly, monthly and all-time leaderboards backed by real period documents with UTC rollover. - Six tiers from Bronze to Grandmaster, derived from lifetime points; achievements unlock from real stats. - Email/password or guest play, cloud sync and an offline outbox for awards. - In-app account deletion plus public privacy and deletion pages. - Sound and haptics that respect the in-app toggles. DUELS WITHOUT A SERVER The setter's device holds the secret in memory and acts as referee. The target is rejected by Firestore rules while a round is PLAYING, and only the referee can write a guess result. A Firestore transaction re-checks whose turn it is and whether the round is still live before a guess lands. Rooms carry a five-minute app-enforced expiry. INTEGRITY AND LIMITS Firestore security rules are the boundary: owner-only private data, validated match shape, monotonic and capped leaderboard writes, and referee-only room writes. Awards use a client match ID as the document ID and setDoc, so retries and outbox flushes cannot double-count. This is casual fair play. A modified client could still submit plausible scores. App Check needs a native build, and server-side score validation would need Cloud Functions or another trusted server, so neither is claimed. Room expiry is enforced by the app, not Firestore TTL. Leaderboards and history are capped at 50 rows, accessibility is baseline, and there is no crash reporting or analytics in this release. QUALITY TypeScript strict, ESLint and Expo Doctor 21/21 pass. 19 engine tests cover scoring, feedback, hints, period keys and duel points; 28 rules tests cover cross-user reads, forged matches, caps, replays and room secrecy. The 1.1.0 production AAB is versionCode 2 and is installed and working on a physical Android device. Play Console and closed testing have not started yet. STACK Expo SDK 57 / React Native 0.86 / React 19 / TypeScript, Expo Router, Firebase Auth + Firestore (Spark), AsyncStorage, expo-audio, expo-haptics, Vitest, @firebase/rules-unit-testing, EAS Build.