# Contributing to PHPPayroll

Thank you for your interest in contributing to **PHPPayroll – Open Source HR & Payroll Software** 🎉  
Contributions of all kinds are welcome and appreciated.

---

## 🤝 How You Can Contribute

You can contribute in many ways:

- Reporting bugs
- Suggesting new features
- Improving documentation
- Fixing bugs
- Adding new modules or enhancements
- Improving UI/UX

---

## 🐞 Reporting Bugs

Before creating an issue:

1. Check existing issues to avoid duplicates.
2. Make sure you are using the **latest version**.

When reporting a bug, include:
- PHPPayroll version
- PHP version
- Database type (MySQL/MariaDB)
- Steps to reproduce the issue
- Expected vs actual behavior
- Screenshots or error logs (if available)

Create a GitHub Issue with the label **bug**.

---

## 💡 Feature Requests

Feature ideas are welcome.

Please include:
- Clear description of the feature
- Use case / business benefit
- Any screenshots or references

Create a GitHub Issue with the label **enhancement**.

---



## 📐 Coding Standards

- Follow **PSR-12** coding standards for PHP
- Use meaningful variable and function names
- Keep controllers thin and logic in models
- Comment complex logic clearly
- Avoid committing commented-out or debug code

---

## 🔐 Security Contributions

If you discover a security issue:
- Do **not** open a public issue
- Follow the instructions in `SECURITY.md`

Responsible disclosure is appreciated.

---

## 🧪 Testing

Before submitting a pull request:
- Test your changes locally
- Ensure no existing features are broken
- Verify database migrations (if any)

---

## 🔀 Pull Request Process

1. Ensure your code is up to date with `main` branch
2. Push your branch to your fork
3. Open a Pull Request with:
   - Clear title
   - Detailed description
   - Screenshots (if UI-related)
4. Reference related issues (if any)

Your PR will be reviewed as soon as possible.

---

## 🏷 Commit Message Guidelines

Use clear and descriptive commit messages:

```
feat: add payroll report export
fix: resolve attendance calculation bug
docs: update installation guide
```
Common prefixes:
- `feat` – New feature
- `fix` – Bug fix
- `docs` – Documentation
- `refactor` – Code refactoring
- `style` – Formatting only

---

## 📄 License

By contributing, you agree that your contributions will be licensed under the **MIT License**.

---

🙏 **Thank you for helping make PHPPayroll better!**
