Skip to content

findawayer/chess-player

Repository files navigation

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.

Chess Player preview

Installation

$ 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.

Tools

Authoring

Frontend

Backend

Testing

Others

Structure

📦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

Next to come

Features under development or planned for future.

  • Member-specific features.
  • Visualization of move evaluations.
  • CLI for move submissions.

Browser compatibility

Chrome Firefox Edge
Latest ✅ Latest ✅ Latest ✅

The app makes use of Web Worker API available in modern browsers, check out the compatibility chart.