Chess Player is an implementation of chess game in web browser. It is designed to be played by a human against a built-in AI, or to visualize a game simulation by two AIs.
$ git clone https://github.com/findawayer/chess-player.git
$ cd chess-player
$ yarn install
$ yarn build
$ yarn start
Requires:
- Node.js installed on your machine.
- A PostgreSQL database.
- Environment variables; see
.env.example
for references.
- TypeScript as Authoring language.
- Babel as Code transpiler.
- Eslint as Code linter.
- Prettier as Code formatter.
- React as Frontend framework.
- Next.js as React framework.
- Apollo Client as GraphQL client framework.
- Redux as React state manager (uses Redux Toolkit)
- React Redux as Redux binder to React.
- Material UI as Design framework.
- Chess.js as Chess move validator.
- Stockfish-js as Chess move generator & evaluator.
- React DnD as Drag-and-drop helper.
- Apollo-server-micro as GraphQL server framework.
- PostgreSQL as Database provider.
- GraphQL as Database query language.
- Prisma as GraphQL database framework.
- TypeGraphQL as GraphQL schema framework.
- Jest as Unit testing solution.
- Testing library as Unit testing helper.
- Chess piece graphics by Colin M.L.Burnett
📦chess-player ┣ 📂.vscode — VS Code editor specific setup ┣ 📂app — App's source code besides the server ┃ ┣ 📂__tests__ — Unit testing codes ┃ ┣ 📂components — Shared React components ┃ ┣ 📂features — Per-feature subresources ┃ ┃ ┣ 📂account — User authentication ┃ ┃ ┣ 📂admin — Admin interface ┃ ┃ ┣ 📂chess — Chess game ┃ ┣ 📂graphql — GraphQL queries and related type definitions ┃ ┣ 📂hooks — Shared React hooks ┃ ┣ 📂themes — Material UI theme customizations ┃ ┣ 📂utils — Functions shared across project ┃ ┣ 📂vendors — Additional external library settings ┃ ┃ ┣ 📜apollo-client.ts — Apollo client setup ┃ ┃ ┗ 📜redux.ts — Redux setup ┣ 📂docs — Documentations ┣ 📂pages — Next.js pages ┃ ┗ 📂api ┃ ┗ 📜graphql.ts — GraphQL server endpoint ┣ 📂prisma — Data model with Prisma 2 ┣ 📂public — Static files ┃ ┣ 📂graphics — Chess piece vector graphics ┃ ┗ 📂stockfish — Chess engine library ┣ 📂server — Source code ┃ ┣ 📂decorators — Custom decorators for TypeGraphQL ┃ ┣ 📂guards — Backend guard clauses ┃ ┣ 📂interface — Frequently used interfaces in backend ┃ ┣ 📂mailing — Mailing service ┃ ┣ 📂schemas — GraphQL schemas and resolvers with TypeGraphQL ┃ ┗ 📂utils — Functions shared within backend ┗ 📜global.d.ts — Global types accessible across project
Features under development or planned for future.
- Member-specific features.
- Visualization of move evaluations.
- CLI for move submissions.
Latest ✅ | Latest ✅ | Latest ✅ |
The app makes use of Web Worker API available in modern browsers, check out the compatibility chart.