Technical notes
Stats for
Nerds
How Tambola actually works under the hood.
01 — Overview
Overview
The frontend is only the interface. It renders tickets, animates numbers and collects taps — nothing more. Every decision that matters happens elsewhere.
The backend is the heart of the game. It owns game state, calls the numbers, generates and validates tickets, resolves claims and determines winners. If the browser closed mid-game, the game would carry on without it.
02 — Game Engine
Game Engine
Players never decide whether a number was called or whether a claim is valid. Actions travel inward to the engine; results travel outward over WebSocket to every connected player at once.
03 — Ticket Generation
Ticket Generation
Every player receives three generated ticket choices before entering the game lobby. They pick one; the selection is persisted server-side and becomes the only ticket that can ever win for them.
- 3 × 9 Tambola ticket grid
- 15 numbers per ticket
- 5 numbers per row
- Column-specific number ranges
- Backtracking finds valid placements
- Empty cells represented as 0
- Returned to the client as a matrix
- Selected ticket persisted on the server
3 × 9 · 15 numbers · 5 per row
05 — Real-Time Gameplay
Real-Time Gameplay
REST APIs handle deliberate player actions — creating and joining rooms, starting games, claiming Housie. Each is a request with a definite answer.
WebSocket over STOMP handles everything that happens on its own schedule. The server broadcasts events; clients only react.
06 — Winning & Validation
Winning & Validation
Current winning methods
- 01Early Five
- 02Top Line
- 03Middle Line
- 04Bottom Line
- 05Full House
07 — Data & Persistence
Data & Persistence
PostgreSQL stores everything required to keep a game alive across reconnects and restarts. Ticket matrices are stored as JSONB.
- Rooms
- Players
- Tickets
- Games
- Called numbers
- Claims
08 — Tech Stack
Tech Stack
- Frontend
- React
- Backend
- Java + Spring Boot
- Database
- PostgreSQL
- ORM
- Hibernate / Spring Data JPA
- Real-time
- WebSocket + STOMP
- Architecture
- REST APIs + event-driven real-time updates
Pretty interface.
Serious backend.
Every number, every claim and every winner is decided by the game engine — not by the browser.
←Back to home