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
frontend/: React, TypeScript, Vite, chess.js, 2D/3D boards, academy UI, custom browser chess engine.backend/: FastAPI, MongoDB, user profiles, social/room endpoints, conversational tutor and speech endpoints.tests/: Playwright test scaffolding.
Getting started
Prerequisites: Node.js, pnpm, Python, MongoDB, and the environment variables required by the selected integrations.
- Install frontend dependencies in
frontend/withpnpm install --frozen-lockfile. - Install backend dependencies from
backend/requirements.txtinto a Python virtual environment. - Configure environment variables locally (never commit
.envfiles). Consult the backend and frontend code for required variables. - Start MongoDB and the FastAPI server: from
backend/, runuvicorn server:app --reload --port 8001. - From
frontend/, runpnpm dev. - Run
pnpm testandpnpm buildfromfrontend/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
- Verify live Clerk, tutor, and voice integrations with staging credentials.
- Review multiplayer authorization and test desktop and mobile gameplay.
- Check for secrets and personal information in files and Git history.
- Review accessibility, mobile layout, privacy disclosures, and deployment configuration.
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.