How sm41l27/kazdoyby_public works
This repository implements a Kazakh-language 2v2 board game with AI, online rooms, tournament play, social features, and customizable avatars. Players enter through the browser UI, connect to the Socket.IO server, join or create a room, then play turns; tournament turns are validated and advanced by a worker-backed authoritative engine. The browser also exposes offline play and social, avatar, and tournament capabilities. Server/database integrations and several frontend modules are only documented by the source index or unsampled code, so those links are omitted where their runtime relationships cannot be verified.
Main entry points: server.js HTTP and Socket server · tournament-play.js Tournament turns · avatars-server.js Avatar service · tournament-server.js Tournament service
Components 19
Browser experience
- App navigation
public/app.js - Game interface
public/game-core.js - Network client
public/network.js - Authentication
public/auth.js - Room interface
public/room.js - Social interface
public/social.js - Avatar editor
public/avatar-ui.js
Rooms and play
- HTTP and Socket server
server.js - Room control
room-control.js
Tournament play
- Tournament turns
tournament-play.js - Tournament service
tournament-server.js
Social and identity
- Social service
social-server.js - Avatar service
avatars-server.js
Game engine
- Turn rules
game-engine.js - Shared game rules
public/game-core.js - Worker pool
turn-pool.js - Turn worker
turn-worker.js
Other components
- Player
- Supabase backend
Connections 21
- Player → App navigation: uses
public/app.js - App navigation → Game interface: opens play
public/app.js - Player → Room interface: manages rooms
- Player → Social interface: uses
- Player → Avatar editor: edits avatar
- Network client → HTTP and Socket server: Socket.IO
- HTTP and Socket server → Room control: registers room control
server.js - HTTP and Socket server → Social service: registers social service
server.js - HTTP and Socket server → Tournament service: registers tournament service
server.js - HTTP and Socket server → Avatar service: registers avatar service
server.js - HTTP and Socket server → Tournament turns: initializes tournament
server.js - Tournament turns → Turn rules: advances turns
tournament-play.js - Turn rules → Shared game rules: uses rules
game-engine.js - Tournament turns → Worker pool: submits jobs
tournament-play.js - Worker pool → Turn worker: dispatches jobs
turn-pool.js - Turn worker → Turn rules: runs step
turn-worker.js - Tournament service → Supabase backend: RPC requests
tournament-server.js - Social service → Supabase backend: RPC requests
social-server.js - Avatar service → Supabase backend: reads and writes
avatars-server.js - Avatar service → Player: serves photos
avatars-server.js - Room control → Tournament service: updates seats
room-control.js