Thank you for your interest in contributing to Pollution Control Hub! We appreciate every contribution, whether it's fixing bugs, improving the UI, enhancing documentation, or implementing new features.
Our goal is to maintain a welcoming, collaborative, and high-quality open-source project. Please read this guide before contributing.
- Code of Conduct
- Ways to Contribute
- Getting Started
- Development Setup
- Finding an Issue
- Issue Labels
- Branch Naming Convention
- Development Guidelines
- Testing Guidelines
- Code Formatting & Linting
- Commit Message Convention
- Pull Request Process
- Review Workflow
- Pull Request Checklist
- Reporting Bugs
- Suggesting Features
- Community & Support
Please follow our Code of Conduct when contributing to this project.
We expect all contributors to:
- Be respectful and inclusive.
- Provide constructive feedback.
- Maintain a positive and collaborative environment.
You can contribute by:
- 🐞 Fixing bugs
- ✨ Adding new features
- 🎨 Improving UI/UX
- 📱 Enhancing responsiveness
- 📚 Improving documentation
- ⚡ Refactoring code
- ♿ Improving accessibility
- 🧪 Writing or improving unit and E2E tests
- 🔒 Improving performance or security
Click the Fork button in the upper-right corner of the repository.
git clone [https://github.com/Aditya8369/Pollution-Control-Hub.git](https://github.com/Aditya8369/Pollution-Control-Hub.git)
cd pollution-control-hubnpm installnpm run devThe project will be available at:
http://localhost:5173
Browse the Issues section and look for:
good first issuebeginner friendlyhelp wantedbugenhancement
If you would like to work on an issue:
- Comment on the issue.
- Wait until you're assigned (if required).
- Create a branch.
- Start working.
Please avoid working on issues already assigned to someone else unless requested by a maintainer.
The repository uses labels to organize work.
| Label | Meaning |
|---|---|
good first issue |
Suitable for first-time contributors |
beginner friendly |
Easy tasks for newcomers |
bug |
Something isn't working correctly |
enhancement |
Improvement to an existing feature |
feature request |
New functionality |
documentation |
Documentation updates |
UI/UX |
User interface improvements |
performance |
Optimization tasks |
accessibility |
Accessibility improvements |
help wanted |
Community contributions needed |
high priority |
Important issue requiring attention |
duplicate |
Already reported elsewhere |
invalid |
Not considered a valid issue |
wontfix |
Will not be addressed |
Create a separate branch for every contribution.
Use the following naming format:
feature/feature-name
bugfix/issue-name
fix/issue-name
docs/update-readme
refactor/component-name
style/navbar-spacing
test/add-unit-tests
Examples:
feature/community-reports
bugfix/mobile-sidebar
docs/contributing-guide
style/dashboard-spacing
refactor/aqi-service
Never commit directly to the main branch.
Please follow these guidelines:
- Keep components reusable.
- Follow the existing folder structure.
- Write meaningful variable names.
- Avoid duplicate code.
- Remove unused imports.
- Use consistent formatting.
- Keep pull requests focused on a single issue.
- Ensure responsiveness.
- Preserve accessibility.
Ensuring code stability is critical. Before submitting a pull request, you must run and pass all test suites locally.
This project uses Vitest and React Testing Library for automated component and utility tests.
To run all unit tests:
npm run testTo run tests in interactive watch mode:
npm run test:watchTo ensure critical user flows work correctly across browsers, execute the Playwright E2E test suite:
npx playwright testIf you need to view the test runs interactively using the Playwright UI runner:
npx playwright test --uiTo maintain a clean and unified codebase style, ensure your code adheres to standard formatting and linting practices before pushing.
- Run your linter/formatter (if configured via package scripts) or ensure your IDE uses standard Prettier/ESLint rules.
- Avoid introducing unused variables or syntax errors that cause build failures.
src/
│
├── assets/
├── components/
├── hooks/
├── pages/
├── services/
├── utils/
├── styles/
├── App.jsx
└── main.jsx
Use descriptive commit messages following the Conventional Commits style.
Examples:
feat: add pollution trend chart
fix: resolve mobile navigation overflow
docs: improve installation instructions
style: update dashboard spacing
refactor: simplify AQI calculation logic
test: add unit tests for AQI utilities
Avoid messages like:
update
changes
fixed stuff
done
new
- Sync your fork with the latest changes.
git checkout main
git pull upstream main- Create a new branch.
git checkout -b feature/your-feature-
Make your changes.
-
Run unit and E2E tests locally to verify everything passes.
npm run test
npx playwright test- Commit your work.
git commit -m "feat: add pollution heatmap"- Push your branch.
git push origin feature/your-feature- Open a Pull Request referencing the issue number (e.g.,
Closes #437).
Briefly explain your changes.
Closes #IssueNumber
- Bug Fix
- New Feature
- UI Improvement
- Documentation
- Refactoring
- Performance
- Accessibility
Include screenshots or screen recordings if the UI has changed.
Provide any additional context if necessary.
Once your Pull Request is submitted:
- Automated checks and test suites (Vitest & Playwright E2E) will run.
- A maintainer will review your changes.
- You may be asked to make revisions.
- Push additional commits to the same branch.
- The Pull Request will be reviewed again.
- Once approved, it will be merged.
Please be patient during the review process.
Before submitting your Pull Request, ensure that:
- My code builds successfully.
- I passed all local Vitest unit tests (
npm run test). - I passed all Playwright E2E tests (
npx playwright test). - I tested my changes manually.
- No console errors remain.
- I followed the existing coding style and formatting rules.
- I updated documentation if required.
- My branch is up to date.
- My Pull Request focuses on a single issue.
- I have added screenshots for UI changes.
- I have linked the related issue.
Please include:
- Clear title
- Description
- Steps to reproduce
- Expected behavior
- Actual behavior
- Browser
- Operating system
- Screenshots (if applicable)
- Console logs (if relevant)
Feature requests should include:
- Problem statement
- Proposed solution
- Expected outcome
- Mockups (optional)
- Additional context
Documentation improvements are always welcome.
Examples include:
- Fixing grammar
- Updating setup instructions
- Adding examples
- Improving explanations
- Adding screenshots
- Improving code comments
Every contribution—big or small—helps improve Pollution Control Hub and supports our mission of making environmental information more accessible and actionable.
We appreciate your time, effort, and collaboration.
Happy Contributing! 🚀