|
| 1 | +# Contributing to EMS |
| 2 | + |
| 3 | +Thank you for your interest in contributing to the Event Management System (EMS)! We welcome contributions from the community to improve the project. This document outlines the process for contributing, setting up your development environment, and submitting changes. |
| 4 | + |
| 5 | +## How to Contribute |
| 6 | + |
| 7 | +1. **Find an Issue:** |
| 8 | + - Browse open issues in the [GitHub Issues](https://github.com/VoxDroid/Event-Management-System/issues) page. |
| 9 | + - Look for issues labeled `good first issue` or `help wanted` for beginner-friendly tasks. |
| 10 | + - If you have an idea for a new feature or bug fix, open a new issue to discuss it. |
| 11 | + |
| 12 | +2. **Fork the Repository:** |
| 13 | + - Fork the [EMS repository](https://github.com/VoxDroid/EMS) to your GitHub account. |
| 14 | + - Clone your fork to your local machine: |
| 15 | + ```bash |
| 16 | + git clone https://github.com/YOUR_USERNAME/EMS.git |
| 17 | + cd EMS |
| 18 | + ``` |
| 19 | + |
| 20 | +3. **Set Up Your Development Environment:** |
| 21 | + - Follow the [Installation](#installation) section in the [README.md](README.md) to set up the project. |
| 22 | + - Install additional development tools: |
| 23 | + - **PHPUnit** for PHP testing: `composer require --dev phpunit/phpunit` |
| 24 | + - **ESLint** for JavaScript linting: `npm install eslint --save-dev` |
| 25 | + - Configure pre-commit hooks (if available) to enforce coding standards. |
| 26 | + |
| 27 | +4. **Create a Branch:** |
| 28 | + - Create a new branch for your feature or bug fix: |
| 29 | + ```bash |
| 30 | + git checkout -b feature/your-feature-name |
| 31 | + ``` |
| 32 | + - Use descriptive branch names (e.g., `fix/login-bug`, `feature/calendar-export`). |
| 33 | + |
| 34 | +5. **Make Changes:** |
| 35 | + - Follow the [Coding Standards](#coding-standards) below. |
| 36 | + - Write tests for new features or bug fixes. |
| 37 | + - Update documentation in `docs/` or `README.md` if your changes affect setup or usage. |
| 38 | + |
| 39 | +6. **Test Your Changes:** |
| 40 | + - Run the test suite: |
| 41 | + ```bash |
| 42 | + vendor/bin/phpunit tests |
| 43 | + ``` |
| 44 | + - Manually test the application in your browser to ensure functionality. |
| 45 | + - Verify that your changes do not break existing features. |
| 46 | + |
| 47 | +7. **Commit Your Changes:** |
| 48 | + - Write clear, concise commit messages: |
| 49 | + ```bash |
| 50 | + git commit -m "Add feature: calendar export functionality" |
| 51 | + ``` |
| 52 | + - Group related changes into logical commits. |
| 53 | + |
| 54 | +8. **Push and Open a Pull Request:** |
| 55 | + - Push your branch to your fork: |
| 56 | + ```bash |
| 57 | + git push origin feature/your-feature-name |
| 58 | + ``` |
| 59 | + - Open a pull request (PR) against the `main` branch of the [EMS repository](https://github.com/VoxDroid/EMS). |
| 60 | + - In the PR description, include: |
| 61 | + - A summary of your changes. |
| 62 | + - Reference to the related issue (e.g., `Fixes #123`). |
| 63 | + - Any additional context or screenshots (especially for UI changes). |
| 64 | + |
| 65 | +9. **Respond to Feedback:** |
| 66 | + - Maintainers will review your PR and may request changes. |
| 67 | + - Address feedback promptly and push updates to the same branch. |
| 68 | + - Once approved, your changes will be merged! |
| 69 | + |
| 70 | +## Coding Standards |
| 71 | + |
| 72 | +- **PHP:** |
| 73 | + - Follow [PSR-12](https://www.php-fig.org/psr/psr-12/) coding standards. |
| 74 | + - Use meaningful variable and function names. |
| 75 | + - Add PHPDoc comments for functions and classes. |
| 76 | + - Avoid inline HTML in PHP files; use templates where possible. |
| 77 | + |
| 78 | +- **JavaScript/CSS:** |
| 79 | + - Follow [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript). |
| 80 | + - Use SCSS for stylesheets and organize in `ASSETS/CSS/`. |
| 81 | + - Minify production assets using `npm run build`. |
| 82 | + |
| 83 | +- **HTML:** |
| 84 | + - Write semantic HTML5. |
| 85 | + - Ensure accessibility (e.g., ARIA attributes, alt text for images). |
| 86 | + |
| 87 | +- **Database:** |
| 88 | + - Use prepared statements for all database queries to prevent SQL injection. |
| 89 | + - Follow the existing schema in `database/schema.sql`. |
| 90 | + - Document any schema changes in `docs/database.md`. |
| 91 | + |
| 92 | +- **Commits:** |
| 93 | + - Use the format: `[type]: Short description` (e.g., `feat: Add event filtering`, `fix: Resolve login redirect bug`). |
| 94 | + - Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`. |
| 95 | + |
| 96 | +## Code of Conduct |
| 97 | + |
| 98 | +All contributors are expected to adhere to the [Code of Conduct](CODE_OF_CONDUCT.md). Be respectful, inclusive, and professional in all interactions. |
| 99 | + |
| 100 | +## Reporting Bugs |
| 101 | + |
| 102 | +- Use the [GitHub Issues](https://github.com/VoxDroid/Event-Management-System/issues) page to report bugs. |
| 103 | +- Provide a clear title, description, steps to reproduce, expected behavior, and actual behavior. |
| 104 | +- Include screenshots or logs if applicable. |
| 105 | + |
| 106 | +## Suggesting Features |
| 107 | + |
| 108 | +- Open an issue with the label `enhancement`. |
| 109 | +- Describe the feature, its use case, and potential implementation ideas. |
| 110 | +- Discuss with maintainers before starting work to ensure alignment. |
| 111 | + |
| 112 | +## Security Vulnerabilities |
| 113 | + |
| 114 | +If you discover a security issue, please report it privately to [izeno.contact@gmail.com](mailto:izeno.contact@gmail.com). Do not disclose vulnerabilities publicly until they are resolved. See [SECURITY.md](SECURITY.md) for details. |
| 115 | + |
| 116 | +## Questions? |
| 117 | + |
| 118 | +Contact the project maintainer: |
| 119 | + |
| 120 | +- **Email:** [izeno.contact@gmail.com](mailto:izeno.contact@gmail.com) |
| 121 | +- **GitHub:** [@VoxDroid](https://github.com/VoxDroid) |
| 122 | + |
| 123 | +Thank you for contributing to EMS! Your efforts help make this project better for everyone. |
0 commit comments