Thank you for considering contributing to Checkora — a chess engine powered by minimax with alpha-beta pruning, served via Django. We welcome contributions from the community, especially GSSoC contributors!
- Contributing to Checkora ♟️
- GSSoC Contributors - Start Here
- Getting Started
- Development Setup
- Branch Naming Convention
- Code Style
- Commit Message Format
- Local Pre-PR Checks
- Pull Request Guidelines
- CI/CD Pipeline
- Reporting Issues
- Code of Conduct
Welcome to GSSoC! Here's how the contribution flow works for this project:
- Fork the repository to your own GitHub account (button at top-right of the repo page).
- Clone your fork locally — never clone the upstream repo directly.
- Work on a feature branch (not
main) in your fork. - Open a Pull Request from your fork's branch →
Checkora/Checkora:main. - The CI pipeline will run automatically on your PR — all checks must pass before review.
- A maintainer will review and approve your PR. Do not merge it yourself.
Important: The
mainbranch is protected. You cannot push directly to it — all changes must come through reviewed, approved PRs.
- Fork the repository on GitHub.
- Clone your fork:
git clone https://github.com/<your-username>/Checkora.git
cd Checkora- Add upstream remote so you can stay in sync:
git remote add upstream https://github.com/Checkora/Checkora.git
git fetch upstream- Create a feature branch from
main:
git checkout -b feat/your-feature-name| Tool | Version |
|---|---|
| Python | ≥ 3.12 |
| g++ | ≥ 11 (for C++ engine) |
| pip | latest |
# Create and activate a virtual environment
python -m venv .venv
.venv\Scripts\activate
# Install Python dependencies
pip install -r requirements.txt
# Set up environment variables
# Copy the example file to a local .env file
copy .env.example .env
# Compile (PowerShell with g++ installed)
g++ -O2 -std=c++17 game/engine/main.cpp -o game/engine/main.exe
# Run database migrations
python manage.py migrate
# Start the development server
python manage.py runserver# Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate
# Install Python dependencies
pip install -r requirements.txt
# Set up environment variables
# Copy the example file to a local .env file
cp .env.example .env
# Compile the C++ chess engine
g++ -O2 -std=c++17 game/engine/main.cpp -o game/engine/main
chmod +x game/engine/main
# Run database migrations
python manage.py migrate
# Start the development server
python manage.py runserverUse the following prefixes:
| Prefix | Use for |
|---|---|
feat/ |
New features |
fix/ |
Bug fixes |
docs/ |
Documentation changes |
refactor/ |
Code refactoring |
test/ |
Adding or updating tests |
chore/ |
Maintenance tasks |
engine/ |
C++ engine changes |
Example: feat/add-move-history-panel
- Follow PEP 8 for Python code (
flake8enforces this automatically). - Use meaningful variable and function names (no single-letter names except loop counters).
- Add docstrings to all public functions and classes.
- Keep functions focused — one function, one responsibility.
- For C++ engine code, follow the existing style in
game/engine/main.cpp.
<scope>: <short clear action in present tense>.
- Scope: a module or feature name (
game,api,ui,templates,core,engine) - Use concise but descriptive language
- Start action with a capital letter (
Fix,Add,Update,Remove,Improve) - No emojis in commit messages
- One sentence only, ending with a period
- Keep under 80 characters
game: Add move validation for castling.
api: Fix session expiry handling in game endpoint.
templates: Update board layout for mobile responsiveness.
engine: Improve alpha-beta pruning depth limit to 6.
core: Remove deprecated settings configuration.
Run these locally before creating a Pull Request.
flake8 . --exclude=.venv,migrations,__pycache__ --max-line-length=120python manage.py test game --verbosity=2python manage.py test game.selenium_tests --verbosity=2python manage.py makemigrations --check --dry-run
⚠️ Before starting work, sync your fork with upstreammain. Opening a PR from a stale fork causes unnecessary merge conflicts. Run these steps before creating your feature branch:# Step 1 — Sync your fork with upstream before starting work git fetch upstream git checkout main git rebase upstream/main git push origin main # Step 2 — Then create your feature branch git checkout -b feat/your-feature-name
- One PR = One Purpose: fix one bug, add one feature, or improve documentation.
- Keep PRs small and focused — large PRs are harder to review.
- Fill in the PR template completely (it loads automatically).
- Link the relevant issue using
Fixes #<issue-number>. - All CI checks must pass — maintainers will not review failing PRs.
- Add or update tests for any new functionality.
- Update documentation (README, docstrings, comments) as needed.
Before opening a PR, sync your fork with the upstream main:
git fetch upstream
git checkout main
git merge upstream/main
git push origin main
git checkout feat/your-feature-name
git rebase mainEvery PR and push to main runs the following automated checks via GitHub Actions:
| Job | What it does | Required to merge |
|---|---|---|
| 🔍 Lint | flake8 on all Python code |
✅ Yes |
| ⚙️ Compile Engine | g++ -O2 on game/engine/main.cpp |
✅ Yes |
| 🧪 Django Tests | python manage.py test game |
✅ Yes |
| 🗄️ Migration Check | python manage.py migrate --check |
✅ Yes |
| 🔒 Security Scan | pip-audit on requirements.txt |
✅ Yes |
| 🛡️ SAST (Bandit) | Static security analysis | ✅ Yes |
| 🖥️ Selenium Tests | End-to-end browser tests | ✅ Yes |
| 🌐 Deploy | Vercel production deploy | 🔁 Push to main only |
All checks must pass before a maintainer can merge your PR.
When reporting issues, please include:
- A clear description of the problem
- Steps to reproduce
- Expected vs. actual behavior
- Your environment (OS, Python version, browser if UI-related)
- Relevant error messages or stack traces
Use the bug report template when opening an issue.
Please be respectful and considerate in all interactions. We are committed to providing a welcoming and inclusive environment for everyone.
Unacceptable behavior includes harassment, discrimination, or any form of personal attack. Violations can be reported to the project maintainers.
- Open an issue for project-related questions.
- For GSSoC-specific questions, join our Discord community: https://discord.gg/WfrpMuNZn
Thank you for contributing! ♟️🎮