KACHIX

Social gaming · Kachix product

Yalla Room — Arabic party games with server-authoritative scoring

Mobile Application DevelopmentBackend, APIs & Integrations
Yalla Room — Arabic party games with server-authoritative scoring — cover image

Challenge

Party games are trivial to build and very hard to make fair. The moment points, coins, and a leaderboard exist, any score the phone calculates is a score the phone can be persuaded to lie about — and in a game played face-to-face with friends, one person quietly winning every round destroys the product faster than any bug.

The second problem is language. Arabic party games live or die on answer matching, and Arabic spelling is genuinely variable: hamza sits on different carriers, taa marbuta and haa get swapped, alef maqsura and yaa are used interchangeably, diacritics are optional, and tatweel stretches words for decoration. A player who types a correct answer slightly differently and is told they are wrong will not play again.

Solution

Our team made server authority a hard architectural rule rather than a guideline: clients never compute scores and never move coins. Every authoritative write goes through a Cloud Functions callable carrying an idempotency key, so a flaky mobile connection that retries a request cannot double-award anything.

Game rules live as pure TypeScript engines, separated from both the transport and the UI, with Jest tests written before the implementation. That is what makes a mechanic like The Bank testable at all — its whole tension is an unsecured points pool that multiplies on a streak and vanishes on a wrong answer, which is precisely the kind of rule that is easy to get subtly wrong and impossible to verify by playing.

Arabic normalization was given one specification and two implementations — one in the Cloud Functions layer, one in the app — deliberately sharing test vectors, so client-side hinting and server-side judging can never disagree about whether an answer was right.

The platform hosts several games rather than one: a risk-and-reward trivia mode, a comedy-writing battle, a bluffing game, and a Kahoot-style live quiz hall, all reached through rooms that friends join with a short code. Arabic is the default locale with right-to-left layout throughout, not a translation applied afterwards.

Results

The result is a multi-game platform where the fairness guarantees hold regardless of what a client sends. Scores and coins are decided in one place, retries are safe by construction, and the rules that decide who wins are covered by tests that run without a device.

Because each game is an engine behind a shared room, presence, and friends layer, adding a game is a rules problem rather than an app-rebuilding problem.

Yalla Room — Arabic party games with server-authoritative scoring — image 1 of 2
Yalla Room — Arabic party games with server-authoritative scoring — image 2 of 2
Sign-in and account-creation screens of the running app, captured from a release web build — Arabic-first and right-to-left, as shipped.

Want results like these? Tell us what you're trying to build.

Start a project