Skip to content

Contributing

Underground Trading edited this page Sep 14, 2025 · 1 revision

🀝 Contributing to HeadForge

We welcome contributions to HeadForge! This guide will help you get started.

🎯 How to Contribute

πŸ› Bug Reports

  • Check Existing Issues - Search for similar issues first
  • Create New Issue - Use the bug report template
  • Provide Details - Include steps to reproduce, expected vs actual behavior
  • Browser Information - Include browser and version details

✨ Feature Requests

  • Check Roadmap - See if the feature is already planned
  • Create Enhancement Issue - Use the feature request template
  • Describe Use Case - Explain why this feature would be useful
  • Provide Examples - Show how the feature would work

πŸ’» Code Contributions

  • Fork Repository - Create your own fork
  • Create Branch - Use descriptive branch names
  • Make Changes - Follow coding standards
  • Test Changes - Ensure everything works
  • Submit Pull Request - Use the PR template

πŸ“š Documentation

  • Improve Existing Docs - Fix typos, clarify instructions
  • Add New Content - Create new documentation pages
  • Update Examples - Keep examples current and relevant
  • Translate - Help with translations

πŸ› οΈ Development Setup

Prerequisites

  • Node.js (Version 18+)
  • npm (Version 8+)
  • Git (Latest version)
  • Browser (Chrome, Firefox, or Edge)

Installation

# Clone the repository
git clone https://github.com/iyotee/HeadForge.git
cd HeadForge

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

Project Structure

HeadForge/
β”œβ”€β”€ src/                    # Source code
β”‚   β”œβ”€β”€ background/         # Background scripts
β”‚   β”œβ”€β”€ content/           # Content scripts
β”‚   β”œβ”€β”€ popup/             # Extension popup
β”‚   β”œβ”€β”€ options/           # Options page
β”‚   β”œβ”€β”€ utils/             # Utility functions
β”‚   └── types/             # TypeScript types
β”œβ”€β”€ config/                # Configuration files
β”œβ”€β”€ scripts/               # Build and utility scripts
β”œβ”€β”€ tests/                 # Test files
β”œβ”€β”€ docs/                  # Documentation
└── store/                 # Built extensions

πŸ“‹ Coding Standards

TypeScript

  • Strict Mode - Use strict TypeScript settings
  • Type Safety - Define proper types for all functions
  • Interfaces - Use interfaces for object shapes
  • Enums - Use enums for constants

Code Style

  • Prettier - Use Prettier for code formatting
  • ESLint - Follow ESLint rules
  • Naming - Use descriptive variable and function names
  • Comments - Add comments for complex logic

File Organization

  • Modular Structure - Keep files focused and small
  • Consistent Naming - Use consistent file naming conventions
  • Proper Imports - Use relative imports for local files
  • Export Structure - Use named exports when possible

πŸ§ͺ Testing

Running Tests

# Run all tests
npm test

# Run tests in watch mode
npm run test:watch

# Run tests with coverage
npm run test:coverage

# Run linting
npm run lint

# Run type checking
npm run type-check

Test Structure

  • Unit Tests - Test individual functions and components
  • Integration Tests - Test component interactions
  • E2E Tests - Test complete user workflows
  • Accessibility Tests - Ensure accessibility compliance

Writing Tests

  • Test Coverage - Aim for high test coverage
  • Descriptive Names - Use clear test descriptions
  • Arrange-Act-Assert - Follow AAA pattern
  • Mock Dependencies - Mock external dependencies

πŸ”„ Pull Request Process

Before Submitting

  1. Fork Repository - Create your own fork
  2. Create Branch - Use descriptive branch names
  3. Make Changes - Implement your changes
  4. Test Changes - Ensure all tests pass
  5. Update Docs - Update documentation if needed

Pull Request Template

## Description
Brief description of changes

## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update

## Testing
- [ ] Tests pass locally
- [ ] New tests added for new functionality
- [ ] Manual testing completed

## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No breaking changes (or documented)

Review Process

  1. Automated Checks - CI/CD pipeline runs automatically
  2. Code Review - Maintainers review the code
  3. Testing - Changes are tested thoroughly
  4. Approval - PR is approved and merged

πŸ“ Documentation

Wiki Pages

  • Keep Updated - Ensure wiki pages are current
  • Clear Instructions - Write clear, step-by-step instructions
  • Examples - Include practical examples
  • Screenshots - Add screenshots where helpful

Code Comments

  • Function Documentation - Document all public functions
  • Complex Logic - Explain complex algorithms
  • API Documentation - Document API interfaces
  • Usage Examples - Include usage examples

README Updates

  • Feature Updates - Update README for new features
  • Installation - Keep installation instructions current
  • Usage Examples - Update usage examples
  • Links - Ensure all links work

🏷️ Release Process

Version Numbering

  • Semantic Versioning - Follow semver (MAJOR.MINOR.PATCH)
  • Changelog - Update CHANGELOG.md for each release
  • Git Tags - Create git tags for releases
  • Release Notes - Write comprehensive release notes

Release Checklist

  • All tests pass
  • Documentation updated
  • Changelog updated
  • Version bumped
  • Git tag created
  • Release published
  • Store packages built

🎯 Areas for Contribution

High Priority

  • New Language Support - Add support for additional programming languages
  • Template Improvements - Enhance existing templates
  • Performance Optimization - Improve extension performance
  • Accessibility - Improve accessibility features

Medium Priority

  • UI/UX Improvements - Enhance user interface
  • Testing Coverage - Increase test coverage
  • Documentation - Improve documentation quality
  • Internationalization - Add multi-language support

Low Priority

  • Code Refactoring - Improve code structure
  • Build Optimization - Optimize build process
  • Developer Tools - Add development utilities
  • Analytics - Add usage analytics (privacy-friendly)

πŸ“ž Getting Help

Community

  • GitHub Discussions - Ask questions and get help
  • Issues - Report problems and request features
  • Wiki - Comprehensive documentation
  • Code Review - Get feedback on your contributions

Maintainers

  • @iyotee - Project maintainer
  • Response Time - Usually within 24-48 hours
  • Guidance - Happy to help with contributions
  • Feedback - Constructive feedback provided

πŸ“„ License

By contributing to HeadForge, you agree that your contributions will be licensed under the GNU General Public License v3.0.


Ready to contribute? Start by checking our Issues or Discussions!