How nadavsho11/poker_tournament_system works
This is a browser-based poker tournament management app. A tournament operator uses the public interface to start and advance blind levels, pause the timer, and finish or reset the event; they can also manage players and view prize and final-ranking tables. The Express server serves the interface and routes API requests to tournament and player controllers or file-backed prize/blind reads. Player records and configuration are JSON files, while live tournament state is in memory. The excerpts show the principal request paths; frontend and some route behavior is only partially sampled.
Main entry points: server.js Express server · script.js Browser logic · playerController.js Player operations · tournamentController.js Tournament state and timer
Components 14
Operator Interface
- Web interface
public/index.html - Browser logic
public/script.js
HTTP API
- Express server
server/server.js - Player routes
server/routes/player.js - Tournament routes
server/routes/tournament.js - Prize route
server/routes/prize.js - Blind route
server/routes/blinds.js
Tournament Operations
- Player operations
server/controllers/playerController.js - Tournament state and timer
server/controllers/tournamentController.js
Tournament Records
- Player records
server/data/players.json - Prize schedule
server/data/prizes.json - Blind schedule
server/data/blinds.json - Tournament snapshot
data/tournament.json
Other components
- Tournament operator
Connections 17
- Tournament operator → Web interface: uses
- Web interface → Browser logic: loads
- Browser logic → Express server: requests API
- Express server → Browser logic: serves interface
- Express server → Player routes: mounts API
- Express server → Tournament routes: mounts API
- Express server → Prize route: mounts API
- Express server → Blind route: mounts API
- Player routes → Player operations: dispatches
- Tournament routes → Tournament state and timer: dispatches
- Player operations → Player records: reads and writes
- Player operations → Prize schedule: reads
- Tournament state and timer → Blind schedule: reads
- Tournament state and timer → Player records: resets records
- Prize route → Prize schedule: reads
- Blind route → Blind schedule: reads
- Browser logic → Tournament snapshot: unknown use