# Contributing to Zerobyte

Thank you for your interest in contributing to Zerobyte! We welcome contributions from the community and are grateful for your support in making this project better.

## Table of Contents

- [Getting Started](#getting-started)
- [Contributor License Agreement (CLA)](#contributor-license-agreement-cla)
- [How to Contribute](#how-to-contribute)
- [Development Setup](#development-setup)
- [Submission Guidelines](#submission-guidelines)
- [Code Standards](#code-standards)
- [Community Guidelines](#community-guidelines)

## Getting Started

Before you begin:

1. Check the [issues](https://github.com/nicotsx/zerobyte/issues) to see if someone is already working on what you have in mind
2. For major changes, please open an issue first to discuss what you would like to change
3. Make sure you have read and agreed to our Contributor License Agreement (CLA)

## Contributor License Agreement (CLA)

### What is a CLA?

A Contributor License Agreement (CLA) is a legal document in which you state you are entitled to contribute the code/documentation/translation to the project you're contributing to and are willing to have it used in distributions and derivative works. This means you grant us permission to use your contributions under our project's license terms.

### Why do we need a CLA?

We require a CLA for several important reasons:

1. **License Flexibility**: It allows the project to evolve its licensing model if needed in the future without requiring re-approval from all past contributors, ensuring Zerobyte can continue to operate and adapt to changing needs of the community.

2. **Patent Protection**: The CLA includes a patent license grant, which protects the project and its users from potential patent claims related to your contributions.

3. **Protecting Your Rights**: While you grant us rights to use your contributions, you retain ownership of your work and can use it for any other purpose.

### How to Sign the CLA

When you submit your first pull request, our CLA Assistant will automatically prompt you to sign the agreement via GitHub. The process is simple:

1. Create your pull request
2. The CLA Assistant bot will comment on your PR
3. Follow the link provided to review and sign the CLA electronically
4. Once signed, the bot will update your PR status

You only need to sign the CLA once, and it will cover all your future contributions to Zerobyte.

### Key Points of Our CLA

- You grant us a non-exclusive, royalty-free license to use your contributions
- You retain ownership and all rights to your contributions
- You confirm that you have the right to make the contribution (it's your original work or you have permission)
- You're not required to provide support for your contributions
- The CLA does not guarantee that your contribution will be accepted or kept into the project

For the complete CLA text, please see the [CLA document](https://cla-assistant.io/nicotsx/zerobyte).

## How to Contribute

There are many ways to contribute to Zerobyte:

### Reporting Bugs

If you find a bug, please open an issue with:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected vs. actual behavior
- Your environment (OS, Docker version, Zerobyte version)
- Any relevant logs or screenshots

### Suggesting Features

When suggesting a feature:
- Check if it's already been suggested
- Clearly describe the feature and its use case
- Explain why it would be valuable to other users
- Consider the scope and complexity

### Contributing Code

1. **Fork the repository** and create your branch from `main`
2. **Make your changes** following our code standards
3. **Test your changes** thoroughly
4. **Update documentation** if needed
5. **Commit your changes** with clear, descriptive commit messages
6. **Push to your fork** and submit a pull request

### Improving Documentation

Documentation improvements are always welcome! This includes:
- Fixing typos or clarifying existing docs
- Adding examples or use cases
- Writing guides or tutorials
- Improving README or other documentation files

### Translations

We welcome translations to make Zerobyte accessible to more users worldwide. Please open an issue to discuss translation efforts before starting.

## Development Setup

1. **Clone your fork**:
   ```bash
   git clone https://github.com/your-username/zerobyte.git
   cd zerobyte
   ```

2. **Set up your development environment**:
    ```bash
   bun run start:dev
    ```

3. **Create a feature branch**:
   ```bash
   git checkout -b feature/your-feature-name
   ```

4. **Make your changes and test them**

5. **Commit your changes**:
   ```bash
   git add .
   git commit -m "Add your descriptive commit message"
   ```

## Submission Guidelines

### Pull Request Process

1. **Update your branch** with the latest changes from main before submitting
2. **Ensure all tests pass** and your code builds successfully
3. **Write a clear PR description** that explains:
   - What changes you made
   - Why you made them
   - Any breaking changes or migration notes
   - Link to related issues

4. **Be responsive** to feedback and review comments
5. **Keep PRs focused** - one feature or fix per PR when possible

## Code Standards

- Follow the existing code style and conventions
- Write clear, self-documenting code. No unless comments are necessary
- Ensure your code is properly formatted
- Keep security in mind - never commit sensitive data like passwords or API keys

## Community Guidelines

- Be respectful and constructive in all interactions
- Welcome newcomers and help them get started
- Assume good intentions
- Focus on what is best for the community and the project
- Show empathy towards other community members

## Questions?

If you have questions about contributing, feel free to:
- Open an issue with your question
- Check existing issues and discussions
- Reach out to the maintainers

---

Thank you for contributing to Zerobyte!
