A simple, stateless multiplayer chess game with English and Bulgarian language support.
You can play the latest version here: https://chessinthepark.onrender.com
- Single Player Mode: Play chess against yourself
- Multiplayer Mode: One global lobby where any two players can join and play
- Bilingual Support: English and Bulgarian interface
- Static Links: Direct access via URLs with language parameters
- Real-time Sync: Moves synchronized instantly between players
- Stateless: No storage - fresh start every time
-
Install dependencies:
npm install
-
Start the server:
npm start
For development with auto-restart:
npm run dev
-
Open in browser:
- Home page:
http://localhost:3000 - English single player:
http://localhost:3000/game?mode=single&lang=en - English multiplayer:
http://localhost:3000/game?mode=multiplayer&lang=en - Bulgarian multiplayer:
http://localhost:3000/game?mode=multiplayer&lang=bg
- Home page:
- Click "Single Player" to start a local chess game
- Play both white and black pieces
- All standard chess rules apply
- Click "Multiplayer" or use direct link
- First player sees "Waiting for opponent..."
- Second player joins automatically when they open the same link
- Game starts immediately with both players
- If anyone disconnects, the game resets and waits for new players
- Add
?lang=enor?lang=bgto any URL - Language is preserved when navigating between modes
- No storage - language is only active for current session
chess-app/
├── server.js # Main server file
├── package.json # Dependencies
└── public/
├── index.html # Home page
├── game.html # Game page
└── css/
└── styles.css # All styles
- Backend: Node.js, Express.js, Socket.io
- Frontend: HTML5, CSS3, JavaScript
- Chess Logic: chess.js
- Chess Board: chessboard.js
- Real-time: WebSocket via Socket.io
Share these links directly:
http://localhost:3000/game?mode=multiplayer&lang=en- English multiplayerhttp://localhost:3000/game?mode=multiplayer&lang=bg- Bulgarian multiplayerhttp://localhost:3000/game?mode=single&lang=en- English single playerhttp://localhost:3000/game?mode=single&lang=bg- Bulgarian single player
- The server maintains one global game lobby
- Maximum 2 players at any time
- Game state resets when players disconnect
- No persistence - everything is stateless
- All moves are validated server-side using chess.js
monitoring: 'http://localhost:3000/monitoring', metrics: 'http://localhost:3000/metrics', logs: 'http://localhost:3000/logs'
GET /- Home page (index.html)GET /game- Game page (game.html)GET /monitoring- Monitoring dashboard (monitoring.html)
GET /version- Returns app versionGET /metrics- Full performance and memory metrics snapshotGET /metrics/summary- High-level metrics summaryGET /metrics/errors- Error breakdown by type and endpointGET /metrics/alerts- Active performance alertsGET /memory/stats- Memory manager stats
GET /logs- Returns logs with optional filters:level(e.g.ERROR,WARN,INFO,DEBUG,TRACE)source(e.g.server,connection,game,move,error,performance,memory,console)since(ISO date/time)search(text search)limit(max number of log entries, default100)
GET /logs/stats- Log statisticsGET /logs/export- Export logs as JSON (accepts same filters as/logs)
For production, consider:
- Setting
NODE_ENV=production - Using PM2 for process management
- Adding NGINX reverse proxy
- Using HTTPS for secure WebSocket connections
GPLv3
