This is a chess_ui
  • Go 65.2%
  • JavaScript 13.1%
  • HTML 9.8%
  • CSS 9.2%
  • Shell 2.1%
  • Other 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-24 22:08:46 +02:00
assets sounds added 2026-10-16 21:57:56 +02:00
cmd delay 2026-10-24 22:08:46 +02:00
dist delay 2026-10-24 22:08:46 +02:00
internal/uci removed useless test 2026-10-15 13:51:24 +02:00
scripts chnaged colour scheme 2026-10-16 13:37:39 +02:00
web delay 2026-10-24 22:08:46 +02:00
.gitignore cache removed 2026-10-16 14:14:55 +02:00
chess-server config path variable and default config 2026-10-16 16:44:52 +02:00
config.json elo ratings reimplemented 2026-10-15 23:05:58 +02:00
go.mod 1 2026-10-14 22:56:52 +02:00
go.sum first 2026-10-14 22:42:33 +02:00
install.sh sounds added 2026-10-16 21:57:22 +02:00
Makefile makefile fixed 2026-10-15 07:29:22 +02:00
README.md config path variable and default config 2026-10-16 16:44:52 +02:00

Chess Pieces Grandmaster Chess UI

A professional, high-performance Chess interface powered by Go, WebAssembly, and Stockfish. This project provides a sleek, modern experience for playing chess against an engine or other humans, featuring real-time move analysis and multiple visual themes.

Chess Pieces Chess Pieces

🚀 Features

🧠 Advanced Engine Integration

  • Real-time Evaluation: Integrated Stockfish engine providing instant centipawn evaluation.
  • Move Ratings: Automatic detection of Blunders (🔴), Inaccuracies (🟠), and Excellent Moves (🟢).
  • Adaptive Strength: Choose your challenge with bot levels ranging from ELO 100 to 2700+.

🎮 Game Modes

  • Play vs Bot: Test your skills against a configurable Stockfish engine.
  • Multiplayer: Host or join games using unique session IDs for head-to-head play.
  • Setup Mode: Create custom board positions for analysis or specialized training.

🎨 Modern Interface

  • Dynamic Themes: Toggle between Standard, Classic (Wood/Gold), and Modern (Dark/Neon) styles.
  • Interactive Evaluation Bar: Visual feedback on who has the advantage.
  • Captured Pieces: Real-time tracking of material advantage and captured pieces.
  • PGN Export: Easily copy your games in standard PGN format for analysis elsewhere.

🛠️ Technology Stack

  • Logic: Go compiled to WebAssembly (WASM) for near-native performance in the browser.
  • Backend: High-concurrency Go server managing WebSocket communication and Stockfish process isolation.
  • Frontend: Vanilla HTML5/CSS3 with a responsive Canvas-based board renderer.
  • Protocol: UCI (Universal Chess Interface) over WebSockets.

📦 Installation & Setup

Prerequisites

  • Go (1.21+)
  • Stockfish installed and available in your PATH.

1. Clone the Repository

git clone https://github.com/yourusername/chess-ui.git
cd chess-ui

2. Configure the Engine

Edit config.json or create one at /usr/local/etc/chess-server/config.json. You can also specify a custom path using the -config flag.

{
    "stockfish_path": "stockfish",
    "threads": 8,
    "port": 8081
}

3. Build & Run

You can use the provided Makefile for a streamlined setup:

# Build both WASM logic and Server
make all

# Start the server (using default config paths)
./chess-server

# Start the server with a custom config
./chess-server -config ./my-config.json -web ./web

The application will be available at http://localhost:8081.

🐳 Deployment (FreeBSD/Jail)

The project includes a specialized install.sh script for deploying into FreeBSD jail (set default to id 2 as this was intended as just a home project):

./install.sh jail

📂 Project Structure

  • cmd/server/: Backend Go server entry point.
  • cmd/wasm/: Frontend logic written in Go (compiled to main.wasm).
  • internal/uci/: UCI protocol parser and engine communication logic.
  • web/: Static assets, CSS, and the HTML entry point.
  • assets/pieces/: high-quality piece sets for different themes.

🤝 Contributing

Contributions are welcome! Whether it's bug fixes, new themes, or feature requests, feel free to open an issue or submit a pull request.


Designed with precision for the modern chess enthusiast.