- Play chess with a computer or with a friend online.
- This app also features
Stockfish Game Anaysis. - Games are saved in Redis until they're being played.
- Users and Games (after termination) are saved permanently in PostgreSQL.
- App is written completely in TypeScript.
DEPLOY_RENDER.md contains deployment instructions.
(We welcome contributions! Please follow these steps to contribute to this project:)
-
Fork the repository
- Click the "Fork" button at the top right of this page to create your own copy.
-
Clone your fork
git clone https://github.com/your-username/Chess.git- Replace
your-usernamewith your GitHub username.
-
Create a new branch
git checkout -b feature/your-feature-name
-
Make your changes
- Add your feature or fix a bug. Please follow the existing code style.
-
Test your changes
- Make sure all tests pass and your code works as expected.
-
Commit and push
git add .git commit -m "Add your message here"git push origin feature/your-feature-name
-
Open a Pull Request
- Go to your fork on GitHub and click "Compare & pull request".
- Describe your changes clearly and reference any related issues.
-
Code Review
- Wait for a maintainer to review your PR. Make changes if requested.
-
Merge
- Once approved, your PR will be merged.
- Follow the existing code style and structure.
- Write clear commit messages.
- Add tests for new features or bug fixes.
- Update documentation if needed.
Thank you for contributing!
Every player has a rating (default 1500), rating deviation (uncertainty), and volatility — updated
after each rated PvP game using the full Glicko-2 algorithm (backend/src/services/glicko2.ts),
the same system lichess.org uses. Implementation is verified against the worked example in
Glickman's paper (glicko.net/glicko/glicko2.pdf). Computer games and guest games are unrated.
Rating snapshots (before/after) are stored on each Game record.
GET /api/leaderboard?type=game|puzzle— top 50 players (public)- Frontend:
/leaderboard(Game and Puzzle tabs, provisional "?" badge when RD > 110)
Rating-matched tactics training (/puzzles, login required):
- Puzzles are served within ±300 of your puzzle rating (tracked separately from game rating)
- Each attempt is a Glicko-2 match between you and the puzzle — puzzles gain/lose rating too, so difficulty self-calibrates over time (exactly the lichess model)
- Solves are verified server-side by replaying your moves against the stored solution (any legal checkmate is accepted on the final move), so ratings can't be farmed
- Stats: rating, accuracy %, and current solve streak
Seeding puzzles (30 built-in, machine-verified mate-in-1/mate-in-2):
cd backend
npm run db:migrate # applies the ratings + puzzles migration
npm run db:seed:puzzles # seeds the built-in verified setOptionally import from the lichess open puzzle database (CC0, https://database.lichess.org/#puzzles):
node prisma/seedPuzzles.js lichess_db_puzzle.csv 500


