Back to Projects

Tsai Khuraakh (Цай хураах)

Game board: the bots' tiles on the table, and the player's hand below with the playable tiles lit
Start screen: 4 or 5 players, the optional colour rule and online play
The caller names the janlii before seeing their hand
A trick is won: the winner builds a house (гэр)
Round summary: houses against the quota, tea, debts and slaves
The rules, written from Mongolian Wikipedia and the owner's notes
Online play: sign in with Google, or as a guest with a generated name
Phone-first: the whole table fits one screen, with the hand in thumb reach
1 / 8

Game board: the bots' tiles on the table, and the player's hand below with the playable tiles lit

A browser version of the Mongolian dominoes game Daaluu: play «Tsai khuraakh» against bots, or online with up to five friends in a room with chat and stats.

Tsai Khuraakh ("harvesting tea") is a browser version of Daaluu, the traditional Mongolian dominoes game: 60 tiles, 4 or 5 players. Play alone against bots straight away, or sign in and play online with up to five people. The interface is in Mongolian and designed phone-first.

✨ Features

  • Solo play: you against 3–4 bots, entirely in the browser, with no sign-in
  • The full rule set: calling the janlii before seeing your hand, leading with an 8+ tile, the janlii or a pair (ус), must-beat-if-able, face-down discards and an optional colour rule
  • Houses, tea, debt and slaves: each round settles the houses (гэр) built against the quota; a shortfall is bought with tea or on credit, three debts to one player make you their slave, and the match ends when one player holds all the tea
  • Online rooms: create a room or join by code or from the open list; bots fill the empty seats, and after each round everyone votes to continue or finish
  • Chat & stats: in-room chat with typing indicators and unread counts; games, wins, win rate and houses built are saved for every player
  • Sign in your way: with Google, or as a guest under a generated, unique name such as «Азтай тарвага 42», with no account needed
  • Live count: the corner shows how many tabs have the site open right now

📱 Phone-first layout

  • The board is an app shell that fits one screen: the table in the middle, the hand and action button in thumb reach, and the log, chat and rules in a bottom sheet
  • Tiles size themselves to the screen and never shrink below a 44 px touch target; on a phone held sideways the table and the hand sit side by side

⚙️ Engineering highlights

  • Pure game engine: rules and settlement are a React-free reducer and randomness enters only through actions, so tests play hundreds of seeded bot rounds and check that houses add up and tea is conserved
  • Server-authoritative online play: the same engine runs on the server; clients send only their moves over one WebSocket, and each player receives a state redacted for their seat, so other hands and discards never reach the wire
  • Hardening: zod-validated messages, per-user token-bucket rate limits, Origin and session-cookie checks on the WebSocket, and a 20-second grace before a bot takes over a dropped player's seat
  • Rules from the sources: tiles, names and pips follow Mongolian Wikipedia; where it is silent (the price of a house, the debt limit) the decisions are written down and kept in one config file

🛠 Tech stack

  • Frontend: React 19, TanStack Start & Router, Vite 8, Tailwind CSS v4, shadcn/ui, zod
  • Server: Better Auth (Google and anonymous guests), ws, node:sqlite, srvx + sirv
  • Delivery: Vitest, and a Docker image released by GitHub Actions to a VPS behind nginx
Visit Live Sitehttps://tsai.typingboo.com