Problem
Test prep in Uzbekistan is mostly solo and boring. ZAKO turns it into a game: live duels against friends or the whole country, seasons, leagues and a battle pass, with fresh questions generated from real textbooks.
What I built
The whole Flutter app and about half of the Fastify backend, working with the client’s backend developer.
Front · Flutter
- 22 feature modules: duel, exam, leaderboard, store, pass, treasure, AI tests, friends, chat and more.
- Real-time duels over WebSockets with an ELO rating separate from XP.
- StoreKit 2 in-app purchases, AdMob rewarded ads verified on the server, Google / Apple / native Telegram login.
Behind · Servers
- Fastify 5 with TypeScript, raw PostgreSQL and Redis, run under PM2.
- Season and pass XP accumulated by a database trigger; an advisory-lock job runner for long AI jobs.
- Payments through Payme, Click and Apple IAP.
Inside · AI
- An admin uploads a textbook PDF; the text is extracted, an LLM parses the table of contents and topics, then writes questions per topic.
- Every question must quote its source page (checked without spending tokens) and pass an LLM judge rubric before approval.
- A three-provider adapter (Anthropic, OpenAI, Gemini) keeps the pipeline running when one provider fails. A 300-page book costs about $1.5.
Hard problems
- Duel timer drift between two phones — fixed by trusting server timestamps and correcting for clock offset.
- UTC vs Tashkent day boundaries breaking streaks and seasons — fixed at the source.
- App Store review — account deletion, Sign in with Apple and IAP rules all had to be right before approval.
Results
Live on Google Play and the App Store with 500+ users.





