React Rooks is a web-based chess game that allows users to play against an AI (Stockfish). It features game history, on-demand gameplay, real-time game analysis, player statistics, and three difficulty levels. The application includes user authentication for a personalized experience.
- Play Against AI: Challenge the Stockfish AI at three difficulty levels (easy, medium, hard).
- Game History: View your past games and analyze your moves.
- On-Demand Gameplay: Start a game whenever you want.
- Real-Time Game Analysis: Get insights and analysis during gameplay.
- Player Statistics: Track your performance and statistics.
- Authentication: Secure user authentication for personalized experience.
- Frontend: React.js, TypeScript, Tailwind CSS
- Backend: Node.js, Next.js, MongoDB, WebSockets
- Deployment: Vercel
- AI Integration: Stockfish WASM (WebAssembly) that runs on client's browser
- Authentication: JWT (JSON Web Tokens)
- Packages: Chess.js, React-Chessboard
-
Clone the repository:
git clone https://github.com/0xadityaa/React-Rooks-UI.git cd React-Rooks-UI
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env.local
file in the root directory and add the following:MONGODB_URL=<your_mongodb_url> JWT_SECRET=<your_jwt_secret> JWT_TOKEN_EXPIRY=6000 JWT_REFRESH_TOKEN_EXPIRY=30000 EXPIRY_PRESIGNED_URL_USER=120000
-
Start the development server:
npm run dev
- Start a Game: Log in and select a difficulty level to start a new game against the AI.
- View Game History: Navigate to your profile to see your past games and their analysis.
- Real-Time Analysis: During a game, view real-time analysis about your moves.
- Player Statistics: Check your stats and performance metrics on your profile page.
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
- Make your changes and commit them:
git commit -m "Add your commit message"
- Push to the branch:
git push origin feature/your-feature-name
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.