gambit-grove-public

An open-source chess academy with guided lessons and a browser chess engine.

This is a fork of amanicsis-gif/gambit-grove-public, kept for reference and contributions. It is not an original project.

Gambit Grove ♟️

Gambit Grove is an interactive chess-learning web application featuring playable 2D/3D boards, an AI conversational tutor, guided academy lessons, adjustable computer opponents, and social/multiplayer features.

Development status: Work in progress. Features described here are present in the source tree but have not all been independently tested. Do not treat this repository as production-ready.

Play the browser demo to face the chess engine as White or try a back-rank checkmate lesson. It runs in your browser without an account.

Project structure

Getting started

Prerequisites: Node.js, pnpm, Python, MongoDB, and the environment variables required by the selected integrations.

  1. Install frontend dependencies in frontend/ with pnpm install --frozen-lockfile.
  2. Install backend dependencies from backend/requirements.txt into a Python virtual environment.
  3. Configure environment variables locally (never commit .env files). Consult the backend and frontend code for required variables.
  4. Start MongoDB and the FastAPI server: from backend/, run uvicorn server:app --reload --port 8001.
  5. From frontend/, run pnpm dev.
  6. Run pnpm test and pnpm build from frontend/ before submitting changes.

The frontend's Vite configuration contains a development /api proxy. Deployment requires a correctly configured backend, database, authentication, and AI service keys.

Chess architecture

frontend/src/lib/engine.ts implements a custom alpha-beta chess engine built on chess.js; it is not Stockfish. useEngine.ts communicates with that engine through a Web Worker. coach.ts produces chess facts and annotations, while backend/routers/tutor.py sends context to a conversational AI.

The opponent's Elo labels are estimates, not validated ratings. The custom engine should not be treated as authoritative for tactical or endgame instruction. A future Stockfish integration and tests against known positions are recommended.

Before public release

Find a small first task in Start contributing.

See CONTRIBUTING.md and SECURITY.md.

License

Project code is available under the MIT License. Third-party dependencies and remote media retain their own licenses.