Skip to content
Experience / SmartWords

SmartWords Games Section

I added live 1v1 duels, daily challenges, a reels-style feed and four leaderboards to an app with 100K+ downloads.

Role
Full Stack Developer
Company
SmartWords, Bussum (remote)
Period
04/2026 – 08/2026
Used
PostgreSQL · Firestore · HTML Canvas
01

Matchmaking

A player should be paired exactly once.

I split the duel across two datastores. The matchmaking queue lives in PostgreSQL, where players are paired inside a transaction under advisory locks. That way every player is paired exactly once and there's no risk of deadlock.

Live match state lives in Firestore. Security rules block writes from the client, so every change goes through the backend.

The duel's datastores and what each one does
LayerStoreHoldsProtected by
MatchmakingPostgreSQLWaiting playersTransaction + advisory lock
MatchFirestoreEphemeral match stateClient writes denied by rules
02

Scoring

The server decides the score.

I moved scoring to the server, so a client can no longer post its own result to a public leaderboard.

While doing that I found and closed a flaw. On 99.9% of the game's 3,600 questions, a malformed request was counted as a correct answer.

03

Concurrency

Three bugs that depended on timing.

I fixed these concurrency and timing bugs in the production flows:

  1. 01

    Lost-update races on read-modify-writes that ran outside a transaction.

  2. 02

    A queue sweep that silently broke reconnecting after a disconnect.

  3. 03

    Clock skew between client and server that mis-scored reconnecting players.

04

Nickname filter

Real names shouldn't get blocked.

I built a nickname filter that works in 8 languages. It folds look-alike characters (homoglyphs), normalizes leetspeak and applies the allow-list based on where letters sit in a name. False rejections of real names went from 23 of 29 to 0, and every evasion attempt in the test set is still blocked.

05

Cost

It had to be cheap to run.

  1. 01

    A synthetic opponent tuned to CEFR levels. It doesn't use an LLM and costs nothing extra, so a duel can start even when few people are online.

  2. 02

    Players get a notification when an opponent is waiting.

  3. 03

    The matchmaking globe is drawn on HTML canvas instead of pulling in a 3D library of about 23 MB.