Thank you for your interest in contributing to ChessReviewEngine! We welcome contributions from the community and are grateful for your support.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Coding Standards
- Testing Guidelines
- Documentation
- Community
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
Before creating bug reports, please check existing issues to avoid duplicates. When you create a bug report, include as many details as possible:
Use the Bug Report Template:
- Navigate to Issues
- Fill in all required fields
- Provide clear steps to reproduce
- Include system information (OS, Python/Node version, etc.)
- Add relevant logs and screenshots
Good Bug Reports Include:
- A clear, descriptive title
- Exact steps to reproduce the problem
- Expected vs. actual behavior
- Screenshots or animated GIFs (if applicable)
- Error messages and stack traces
- Environment details
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion:
Use the Feature Request Template:
- Navigate to Issues
- Provide a clear description of the feature
- Explain why this enhancement would be useful
- Include mockups or examples if possible
Good Enhancement Suggestions Include:
- Clear use case and problem statement
- Proposed solution with implementation details
- Alternative approaches considered
- Potential risks or concerns
We actively welcome your pull requests! Here's how to submit one:
-
Fork the Repository
git clone https://github.com/YOUR-USERNAME/ChessReviewEngine.git cd ChessReviewEngine -
Create a Branch
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fixUse prefixes:
feature/- New featuresfix/- Bug fixesdocs/- Documentation updatesrefactor/- Code refactoringtest/- Test additions/updateschore/- Maintenance tasks
-
Make Your Changes
- Write clear, readable code
- Follow existing code style
- Add tests for new features
- Update documentation as needed
-
Test Your Changes
Frontend:
npm run lint npm run build npm run dev # Manual testingBackend:
cd backend python -m pytest # If tests exist python run.py # Manual testing
-
Commit Your Changes
git add . git commit -m "feat: add amazing feature"
Use Conventional Commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Test additions or updateschore:- Maintenance tasks
-
Push to Your Fork
git push origin feature/your-feature-name
-
Open a Pull Request
- Go to the repository
- Click "New Pull Request"
- Select your fork and branch
- Fill in the PR template
- Link related issues
PR Checklist:
- Code follows project style guidelines
- Self-review completed
- Comments added for complex code
- Documentation updated
- No new warnings generated
- Tests added/updated as needed
- All tests pass
- Changes are backward compatible (or breaking changes noted)
- Python 3.12+
- Node.js 20+
- Stockfish Engine
- Git
-
Clone the repository
git clone https://github.com/H0NEYP0T-466/ChessReviewEngine.git cd ChessReviewEngine -
Backend Setup
cd backend python3 -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt
-
Frontend Setup
cd .. # Back to root npm install
-
Install Stockfish
- Ubuntu/Debian:
sudo apt-get install stockfish - macOS:
brew install stockfish - Windows: Download from stockfishchess.org
- Ubuntu/Debian:
Terminal 1 - Backend:
cd backend
source venv/bin/activate
python run.pyTerminal 2 - Frontend:
npm run devAccess the app at http://localhost:5173
- Style: Follow PEP 8
- Formatting: Use
blackorautopep8 - Type Hints: Use type hints where applicable
- Docstrings: Use Google-style docstrings
Example:
def analyze_move(
board: chess.Board,
move: chess.Move,
engine_evaluation: dict
) -> MoveClassification:
"""
Analyze a chess move and classify its quality.
Args:
board: Current board state
move: The move to analyze
engine_evaluation: Engine evaluation data
Returns:
Classification of the move (brilliant, best, good, etc.)
"""
# Implementation- Style: Follow Airbnb JavaScript Style Guide
- Formatting: Use ESLint (already configured)
- Components: Use functional components with hooks
- Types: Define clear TypeScript interfaces/types
Example:
interface MoveAnalysis {
moveNumber: number;
move: string;
classification: string;
evaluation: number;
}
const AnalysisBoard: React.FC<AnalysisBoardProps> = ({ gameData }) => {
// Component implementation
};-
Naming:
- Use descriptive, meaningful names
- Classes/Components: PascalCase
- Functions/variables: camelCase (JS/TS) or snake_case (Python)
- Constants: UPPER_SNAKE_CASE
-
Comments:
- Write self-documenting code when possible
- Add comments for complex logic
- Keep comments up-to-date
-
File Organization:
- One component per file (frontend)
- Group related functionality
- Keep files focused and reasonably sized
Create tests in the backend/ directory:
# test_analyzer.py
import pytest
from app.engine.analyzer import ChessAnalyzer
def test_move_classification():
"""Test move classification logic."""
# Test implementation
assert classification == "best"Run tests:
cd backend
pytestWhile not currently implemented, future tests should:
- Test component rendering
- Test user interactions
- Test API integration
- Use React Testing Library
Always perform manual testing:
- Test the full user flow
- Try edge cases
- Test on different browsers (if frontend changes)
- Verify error handling
Update documentation when you:
- Add new features
- Change existing functionality
- Add configuration options
- Modify API endpoints
- Update dependencies
- README.md: User-facing features and setup
- Code comments: Complex logic and algorithms
- API docs: Endpoint changes (in code docstrings)
- CHANGELOG.md: Keep track of notable changes (if exists)
- Use clear, concise language
- Include code examples
- Add screenshots for UI changes
- Keep formatting consistent
- GitHub Discussions: Ask questions and share ideas (if enabled)
- Issues: Report bugs or request features
- Pull Requests: Review and discuss code changes
Contributors are recognized in:
- GitHub contributors page
- Release notes
- Project acknowledgments
Thank you for contributing to ChessReviewEngine! 🎉♟️