Thank you for your interest in contributing to Chess Timer! We welcome contributions from developers of all skill levels. This guide will help you get started.
- Node.js 18+ or Bun
- Git
- A code editor (VS Code recommended)
-
Fork and Clone
# Fork the repository on GitHub, then clone your fork git clone https://github.com/UtkarshTheDev/ChessTicks.git cd ChessTicks
-
Install Dependencies
# Using npm npm install # Using bun (recommended for faster installs) bun install
-
Start Development Server
npm run dev # or bun dev -
Verify Setup
- Open http://localhost:3000
- Ensure the timer loads and basic functionality works
- 🐛 Bug Reports - Help us identify and fix issues
- ✨ Feature Requests - Suggest new functionality
- 🔧 Code Contributions - Implement features or fix bugs
- 📚 Documentation - Improve guides and API docs
- 🎨 UI/UX Improvements - Enhance user experience
- 🧪 Tests - Add or improve test coverage
- Check existing issues - Avoid duplicate work
- Create an issue - Discuss your idea before implementing
- Get feedback - Ensure your contribution aligns with project goals
We use ESLint and Prettier for consistent code formatting:
# Check linting
npm run lint
# Fix auto-fixable issues
npm run lint:fix
# Format code
npm run format- Use strict TypeScript - no
anytypes unless absolutely necessary - Define proper interfaces for all data structures
- Use type assertions sparingly and document why they're needed
- Use functional components with hooks
- Implement proper TypeScript interfaces for props
- Follow the existing component structure in
src/components/ - Use Radix UI primitives when possible for accessibility
- Use Zustand stores for global state
- Keep component state local when possible
- Follow the existing store patterns in
src/stores/
All contributions should include appropriate tests:
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run with coverage
npm run test:coverage- Unit Tests - For utility functions and timer logic
- Component Tests - For React components
- Integration Tests - For timer engine and mode handlers
- Edge Cases - Test boundary conditions and error states
- New features: 80%+ test coverage
- Bug fixes: Include regression tests
- Timer modes: Test all timing scenarios
When working on timer functionality:
-
Understand the Architecture
TimerEngine- Core timer logicTimerModeHandler- Interface for different modesTimerStore- React state management
-
Adding New Timer Modes
- Implement
TimerModeHandlerinterface - Add comprehensive tests
- Update configuration types
- Document the new mode
- Implement
-
Testing Timer Logic
- Use Jest fake timers for time-based tests
- Test edge cases (timeouts, pausing, resuming)
- Verify state transitions
git checkout -b feature/your-feature-name
# or
git checkout -b fix/bug-description- Follow the coding guidelines above
- Write or update tests
- Update documentation if needed
# Run all tests
npm test
# Check linting
npm run lint
# Verify build
npm run buildUse conventional commit messages:
# Features
git commit -m "feat: add new timer mode for bullet chess"
# Bug fixes
git commit -m "fix: resolve timer pause issue on mobile"
# Documentation
git commit -m "docs: update API documentation for timer modes"
# Tests
git commit -m "test: add edge case tests for Fischer increment"git push origin feature/your-feature-nameThen create a Pull Request on GitHub with:
- Clear title describing the change
- Detailed description of what was changed and why
- Screenshots for UI changes
- Testing notes for reviewers
- All PRs require at least one review
- Address feedback promptly
- Keep discussions constructive and respectful
- Be open to suggestions and improvements
When reporting bugs, please include:
- Environment (OS, browser, Node.js version)
- Steps to reproduce the issue
- Expected behavior vs actual behavior
- Screenshots or videos if applicable
- Console errors if any
**Environment:**
- OS: [e.g., Windows 11, macOS 13, Ubuntu 22.04]
- Browser: [e.g., Chrome 120, Firefox 121, Safari 17]
- Node.js: [e.g., 18.17.0]
**Steps to Reproduce:**
1. Go to '...'
2. Click on '...'
3. See error
**Expected Behavior:**
A clear description of what you expected to happen.
**Actual Behavior:**
A clear description of what actually happened.
**Screenshots:**
If applicable, add screenshots to help explain your problem.
**Additional Context:**
Add any other context about the problem here.For new features, please provide:
- Use case - Why is this feature needed?
- Proposed solution - How should it work?
- Alternatives considered - Other approaches you've thought of
- Implementation notes - Technical considerations if any
We're particularly interested in contributions for:
- 🧪 Test Coverage - Improving test coverage for existing features
- 🐛 Bug Fixes - Resolving open issues
- ♿ Accessibility - Making the app more accessible
- 📱 Mobile Experience - Improving mobile usability
- 🎨 UI Polish - Visual improvements and animations
- ⚡ Performance - Optimizing timer accuracy and responsiveness
- 🔧 Developer Experience - Better tooling and documentation
- 🌐 Multiplayer Support - Online chess timer functionality
- 🏆 Tournament Features - Advanced tournament management
- 📊 Analytics - Enhanced game statistics and insights
- Use welcoming and inclusive language
- Respect differing viewpoints and experiences
- Accept constructive criticism gracefully
- Focus on what's best for the community
- Help others learn and grow
- Share knowledge and resources
- Provide constructive feedback
- Celebrate others' contributions
- Keep discussions on-topic
- Avoid personal attacks or harassment
- Report inappropriate behavior
- Maintain confidentiality when appropriate
- GitHub Issues - Bug reports and feature requests
- GitHub Discussions - General questions and ideas
- Code Reviews - Technical discussions on PRs
- Issues - We aim to respond within 48 hours
- Pull Requests - Initial review within 72 hours
- Questions - Community typically responds within 24 hours
Contributors are recognized in several ways:
- README Credits - Listed in the acknowledgments section
- Release Notes - Mentioned in version release notes
- GitHub Profile - Contributions show on your GitHub profile
- API Documentation - Timer engine and interfaces
- Architecture Overview - System design
- Testing Guide - Detailed testing instructions
Thank you for contributing to Chess Timer! Your efforts help make chess more accessible and enjoyable for players worldwide. 🎯♟️