Web product · Education
Game rewards that cannot be faked, for a children’s learning app
Coins and points in Shravya Playhouse used to be granted by the browser, so anyone could award themselves anything. We moved every award to the server without making the games feel slower.
- 10reward formulas, configured per game from an admin console
- 0rewards a browser can grant itself
- 1set of rules for every app’s rewards
The problem
Rewards were written from the player’s own browser. That made them trivial to forge, and made the whole balance meaningless - a problem that grows the moment rewards unlock anything real.
Each game scores differently: a chess result, a sudoku time, a crossword’s accuracy. One flat rate would be either stingy or exploitable.
What we did
- The browser reports what happened in a game; the server decides what it is worth. Awards have deterministic ids, so replaying the same result cannot pay twice.
- Ten formula types - flat, result, margin, time, accuracy, attempts and others - with parameters set per game in the admin console, plus daily caps per game and across the platform.
- The formula code is shared between the browser and the server, copied at build time, so a guest’s preview and a member’s real award are the same arithmetic.
- Guests see what they would have earned and are invited to sign up; only members are paid.
The result
Rewards across every Shravya app are now configured in one place and granted only by the server, with an audit trail of who changed what.
Game designers adjust how generous a game is from the console, without a code change or a deploy.
Built with
Cloud FunctionsFirestore transactionsShared TypeScriptAdmin consoleFigures checked against the live product on 21 September 2026.