Skip to content

yosseferrazik/chess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chess Monorepo

Backend-first chess project with:

  • A TypeScript/Express API (apps/server)
  • A Rust chess engine exposed to Node via napi-rs (packages/engine)
  • SQL bootstrap scripts (database)

Current Project Status

As of March 5, 2026, the project is in a solid technical foundation phase:

  • API structure has been cleaned for maintainability (typed config, centralized errors, startup bootstrap).
  • Database connectivity and module boundaries are production-oriented.
  • Rust engine exposes core chess validation/status functions and includes unit tests.
  • Repository is now prepared for public hosting hygiene (.gitignore, env example, root docs).

Repository Structure

.
|-- apps/
|   `-- server/         # Express API (TypeScript)
|   `-- web/            # Next UI (TypeScript)
|-- packages/
|   `-- engine/         # Rust + napi-rs chess engine
|-- database/
|   `-- test.sql        # Example schema/seed - (tests)
`-- README.md

Requirements

  • Node.js 20+
  • npm 10+ (or compatible)
  • PostgreSQL 14+
  • Rust toolchain (for local native engine builds)

Quick Start

1. API setup

cd apps/server
npm install
cp .env.example .env

Update .env with your PostgreSQL credentials.

2. Initialize database sample data

Run the SQL in database/test.sql against your PostgreSQL instance.

3. Run the API in development

cd apps/server
npm run dev

Default endpoints:

  • GET /
  • GET /health
  • GET /api/test

4. Build and run API in production mode

cd apps/server
npm run build
npm start

Engine Package

Local development commands:

cd packages/engine
yarn install
yarn build
yarn test

The Rust engine currently exports:

  • validateAndMove(fen, uciMoveStr)
  • getGameStatus(fen)

Quality and Professionalization Checklist

  • x Clean server startup separation (app vs server)
  • x Centralized environment validation
  • x Typed database access and route flow
  • x Centralized error handling and 404 handling
  • x Public-repo safe ignore rules and env template
  • - CI pipeline (recommended next)
  • - API tests/integration tests (recommended next)
  • - Issue/PR templates and contribution guide (recommended next)

Prepare and Push to GitHub

From the repository root:

git init
git add .
git commit -m "chore: clean architecture, docs, and github prep"
git branch -M main
git remote add origin https://github.com/<your-user>/<your-repo>.git
git push -u origin main

If you already created a remote repo with a README, use git pull --rebase origin main before pushing.

About

Ongoing chess website with a Rust integrated chess engine.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors