Chess Tutor
Chess Tutor is an interactive web application that helps users improve their chess skills by providing real-time move analysis, suggestions using the Stockfish chess engine, and challenging chess puzzles.
Features
- Interactive chessboard with drag-and-drop functionality
- Real-time move evaluation using Stockfish API
- Best move suggestions with visual arrows
- Detailed move history with Unicode chess piece symbols
- Chess puzzles for skill improvement
- Responsive design for various screen sizes
- Zustand for centralized state management
- Fallback to Chess API if Stockfish evaluation takes longer than 5 seconds
Technologies Used
Getting Started
Prerequisites
- Node.js (version 18 or higher)
- npm or yarn
Installation
-
Clone the repository:
git clone https://github.com/your-username/chess-tutor.git
-
Navigate to the project directory:
cd chess-tutor
-
Install dependencies:
npm install
or
yarn install
-
Create a .env
file in the root directory and add your RapidAPI key:
VITE_RAPID_API_KEY=your_rapidapi_key_here
-
Start the development server:
npm run dev
or
yarn dev
-
Open your browser and visit http://localhost:5173
(or the port specified in your console).
Usage
Chess Analysis
- The chessboard is set up in the starting position.
- Drag and drop pieces to make moves.
- The application will display the current evaluation and the best move suggestion.
- The move history is updated after each move, showing Unicode chess piece symbols.
- Invalid moves will display warning messages to guide the user.
Chess Puzzles
- Navigate to the Puzzles section of the application.
- A chess puzzle will be presented with a specific position and goal.
- Try to find the best move(s) to solve the puzzle.
- Use the hint feature if you're stuck.
- After solving or failing a puzzle, a new one will be loaded automatically.
License
This project is licensed under the MIT License - see the LICENSE.md file for details.