How kiran-mondal/chaturanga works
Chaturanga is a browser-based revival of the ancient strategy board game. The principal workflow is a player choosing a mode, making moves on the Ashtapada board, and seeing the game update; the documented modes are play against adaptive AI and local pass-and-play. The client also renders the board in 3D and provides move feedback. Sampled server code adds Socket.IO moves, strategy endpoints, and database-backed learning/session APIs. The README describes a static client, so the relationship between that deployment description and these server modules is unclear; the sampled server does not mount routes.js.
Main entry points: script.js Game Client · server.js HTTP and Socket Server · routes.js Game API Routes · db.js Database Client
Components 15
Game Play
- Game Client
script.js - Adaptive AI
script.js
Browser Experience
- 3D Board
script.js - Audio Feedback
audio.js - Page Navigation
components/menubar.js - Game and Info Pages
index.html
Server Features
- HTTP and Socket Server
server.js - Game API Routes
routes.js
Data and Learning
- Database Client
db.js - PostgreSQL
- AI Learning Memory
routes.js - Game Sessions
routes.js - Strategy Traps
server.js - Session Verifier
aiBot.js
Other components
- Player
Connections 14
- Player → Game Client: plays
- Game Client → Adaptive AI: requests moves
- Game Client → 3D Board: renders state
- Game Client → Audio Feedback: plays sounds
- Page Navigation → Game and Info Pages: switches pages
- Game Client → HTTP and Socket Server: sends moves
- HTTP and Socket Server → Game Client: broadcasts moves
- HTTP and Socket Server → PostgreSQL: reads and writes
- Game API Routes → Database Client: queries
- Database Client → PostgreSQL: executes queries
- Game API Routes → AI Learning Memory: stores and reads
- Game API Routes → Game Sessions: creates and counts
- HTTP and Socket Server → Strategy Traps: stores and reads
- Session Verifier → Database Client: loads session