Skip to main content

Welcome Contributors!

We appreciate contributions of all kinds to Obsidian Chess Studio. Whether you’re fixing bugs, adding features, improving documentation, or translating the app, your contributions are valuable.

Before You Start

1

Check Existing Issues

Before starting work, check the issues page to see if:
  • Someone else is already working on it
  • There’s a discussion about the feature/bug
  • Maintainers have provided guidance
If unsure, open an issue first to discuss your idea.
2

Read the Documentation

3

Join the Community

  • GitHub Discussions: Ask questions and share ideas
  • Issues: Report bugs and request features
  • Stay updated with project direction

Development Workflow

1. Fork and Clone

1

Fork the Repository

Click the “Fork” button on GitHub
2

Clone Your Fork

git clone [email protected]:{your_username}/Obsidian-Chess-Studio.git
cd Obsidian-Chess-Studio
3

Add Upstream Remote

git remote add upstream [email protected]:luisrivasnoriega/Obsidian-Chess-Studio.git

2. Create a Feature Branch

Always create a new branch from master for your work:
# Update master
git checkout master
git pull upstream master

# Create feature branch
git checkout -b feature/your-feature-name
# or for bug fixes
git checkout -b fix/bug-description
Branch naming conventions:
  • feature/ - New features
  • fix/ - Bug fixes
  • refactor/ - Code refactoring
  • docs/ - Documentation changes
  • test/ - Test additions/fixes

3. Install Dependencies

pnpm install

4. Make Your Changes

Now you can start coding! See the sections below for specific guidelines.

Code Style

Frontend (TypeScript/React)

Use Biome for code formatting:
# Format all files
pnpm format

# Check formatting
pnpm biome check ./src
Settings:
  • Indentation: 2 spaces
  • Quotes: Double quotes
  • Semicolons: Required
  • Trailing commas: ES5

Backend (Rust)

Use rustfmt for formatting:
cd src-tauri
cargo fmt
Settings:
  • 4-space indentation
  • 100-character line limit
  • Trailing commas

Testing

Frontend Tests

1

Write Tests

Add tests in __tests__/ directories:
// src/features/boards/__tests__/BoardGame.test.tsx
import { render, screen } from '@testing-library/react';
import { BoardGame } from '../components/BoardGame';

describe('BoardGame', () => {
  it('renders chess board', () => {
    render(<BoardGame />);
    expect(screen.getByRole('main')).toBeInTheDocument();
  });
});
2

Run Tests

# Run all tests
pnpm test

# Run with coverage
pnpm vitest run --coverage

# Watch mode
pnpm vitest

Backend Tests

1

Write Tests

Add tests in module files:
#[cfg(test)]
mod tests {
    use super::*;
    
    #[test]
    fn test_position_search() {
        let fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
        let result = search_position(fen, true);
        assert!(result.is_ok());
    }
}
2

Run Tests

cd src-tauri

# Run all tests
cargo test

# Run specific test
cargo test test_position_search

# Run with output
cargo test -- --nocapture
See Testing Guide for comprehensive coverage.

Submitting a Pull Request

1

Ensure Quality

Before submitting, verify:
# Build without bundling installer
pnpm tauri build -b none

# Test the build
./src-tauri/target/release/obsidian-chess-studio
2

Commit Changes

Write clear commit messages:
# Stage changes
git add .

# Commit with descriptive message
git commit -m "feat: add position search caching"
Commit message format:
  • feat: - New feature
  • fix: - Bug fix
  • refactor: - Code refactoring
  • docs: - Documentation changes
  • test: - Test additions/fixes
  • chore: - Build/tooling changes
3

Push to Fork

git push origin feature/your-feature-name
4

Create Pull Request

  1. Go to the comparison page
  2. Select your fork and branch in the compare: dropdown
  3. Click “Create pull request”
  4. Fill in the PR template:
    • Title: Clear, descriptive title
    • Description: What changes were made and why
    • Testing: How you tested the changes
    • Screenshots: For UI changes
    • Related issues: Link to issues this PR addresses
5

Address Review Feedback

Maintainers will review your PR. Address any feedback:
# Make changes based on feedback
git add .
git commit -m "refactor: address review feedback"
git push origin feature/your-feature-name

PR Checklist

Before submitting, ensure:
  • Code builds successfully (pnpm tauri build -b none)
  • All tests pass (pnpm test and cargo test)
  • Code is formatted (pnpm format and cargo fmt)
  • No linting errors (pnpm lint:fix and cargo clippy)
  • Commit messages follow convention
  • PR description is clear and complete
  • Screenshots included for UI changes
  • Documentation updated if needed

Contributing Translations

See the dedicated Translations Guide for:
  • Adding new languages
  • Updating existing translations
  • Testing translations
  • Translation workflow

Code Review Process

1

Initial Review

Maintainers will review your PR within 1-3 days.
2

Feedback

You may receive:
  • Requested changes - Required before merge
  • Suggestions - Optional improvements
  • Questions - Clarifications needed
3

Approval

Once approved, maintainers will merge your PR.
4

Post-Merge

Your changes will be included in the next release!

Getting Help

If you need assistance:

GitHub Discussions

Ask questions and get help from the community

Issues

Report bugs or request features

License

By contributing, you agree that your contributions will be licensed under the GPL-3.0 License.

Next Steps

Development Overview

Learn about the tech stack

Testing Guide

Write comprehensive tests

Architecture

Understand the codebase

Translations

Help localize the app

Build docs developers (and LLMs) love