Skip to content

Contributing Guide โ€‹

We welcome your contributions! This guide will help you understand how to effectively contribute to the Chaterm project.

Ways to Contribute โ€‹

  • ๐Ÿ› Report Bugs - Help us identify and fix issues
  • ๐Ÿ’ฌ Discuss Code - Participate in technical discussions
  • ๐Ÿ”ง Submit Fixes - Fix bugs and improve existing features
  • โœจ Propose Features - Suggest new features
  • ๐Ÿ“– Improve Documentation - Enhance documentation and guides
  • ๐Ÿงช Add Tests - Increase test coverage

We use GitHub to host code, track issues and feature requests, and accept Pull Requests.

Contributor Workflow โ€‹

  1. Fork this repository to your personal account
  2. Create your development branch from the main branch
  3. Develop in your forked repository
  4. Submit a Pull Request to the main branch of the original repository when done
  5. Reference the fixed Issue in the PR description (if applicable)
  6. After approval from at least one maintainer, the PR will be merged

Local Development Environment Setup โ€‹

  1. Clone the repository:
bash
# Fork the repository on GitHub, then clone your fork
git clone https://github.com/YOUR_USERNAME/Chaterm.git
cd Chaterm
  1. Install necessary development tools:

    • Install Node.js (recommended to use the latest LTS version)
  2. Install Electron:

bash
  npm i electron -D
  1. Install project dependencies:
bash
  node scripts/patch-package-lock.js
  npm install
  1. Start the development server:
bash
npm run dev

Project Structure โ€‹

Chaterm/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ main/          # Electron main process
โ”‚   โ”œโ”€โ”€ preload/       # Preload scripts
โ”‚   โ””โ”€โ”€ renderer/      # Vue.js frontend
โ”œโ”€โ”€ scripts/           # Build and development scripts
โ”œโ”€โ”€ resources/         # Application resources (icons, etc.)
โ”œโ”€โ”€ tests/            # Test files
โ””โ”€โ”€ docs/             # Documentation

Code Quality Standards โ€‹

Code Style โ€‹

  • ESLint: JavaScript/TypeScript code checking
  • Prettier: Code formatting
  • TypeScript: Strong typing recommended

Quality Checks โ€‹

bash
# Format code
npm run format

# Check for code issues
npm run lint

# Type checking
npm run typecheck

# Run tests
npm test

# Build verification
npm run build

PR Guidelines โ€‹

What Makes a Great PR โ€‹

โœ… Clear Purpose

  • Single, focused change
  • Clear title and description
  • Reference related issues

โœ… High-Quality Code

  • Follow project coding standards
  • Include appropriate tests
  • Well-commented code
  • No breaking changes (unless intentional)

โœ… Documentation

  • Update relevant documentation
  • Include usage examples
  • Document new features

โœ… Testing

  • Write unit tests for new features
  • Write integration tests for complex features
  • Manual testing verification

PR Template โ€‹

When creating a PR, please include:

markdown
## Description

Brief description of the changes

## Type of Change

- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update

## Testing

- [ ] Local tests passed
- [ ] Manual testing completed
- [ ] Screenshots (for UI changes)

## Checklist

- [ ] Code follows style guide
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No breaking changes

Commit Messages โ€‹

Use conventional commit format:

feat: add new feature
fix: fix bug in component
docs: update README
refactor: improve code structure
test: add unit tests

Getting Help โ€‹

  • ๐Ÿ“ Documentation: Check existing documentation first
  • ๐Ÿ’ฌ Discussions: Ask questions using GitHub Discussions
  • ๐Ÿ› Issues: Report bugs via issues with detailed information
  • ๐Ÿ’ก Ideas: Propose feature suggestions via issues

Questions? โ€‹

If you have any questions about contributing, please create an issue with the "question" label.

License โ€‹

By contributing to Chaterm, you agree that your contributions will be licensed under the same terms as the project.

License