Contributing to Edmonton Accident & Near Miss Reporting Platform
We welcome contributions to improve this project! ๐
๐ How to Contribute
-
Fork the repository
Create your own copy of the repo under your GitHub account. -
Create a feature branch
Use clear branch naming: feature/<short-description>(for new features)fix/<short-description>(for bug fixes)docs/<short-description>(for documentation changes)
Example:
bash
git checkout -b feature/add-report-filters
-
Make your changes
Follow the coding standards outlined below. -
Commit messages
Use descriptive commit messages in the imperative mood: - โ
Add moderation filters to dashboard - โ
Fix SQL query for report analytics -
โ
Fixed stuff -
Push and open a Pull Request (PR)
- Push your branch to your fork.
- Open a PR against the
mainbranch of this repo. - Clearly describe your changes in the PR body.
โจ Coding Standards
- PHP:
- Use PDO prepared statements for all queries.
- Follow PSR-12 coding style where possible.
-
Keep business logic inside API files, reusable helpers in
/db/. -
JavaScript:
- Use ES6 modules (
import/export). - Favor async/await with
try/catchfor fetch calls. -
Keep UI logic in dedicated JS modules (
map.js,report_submission.js, etc.). -
CSS:
- Use shared
style.cssfor consistency. -
Prefer utility classes and avoid inline styles.
-
Docs:
- Update
README.mdandQUICKSTART.mdif your changes impact setup. - Add JSDoc/PHPDoc comments where appropriate.
๐งช Testing
- Test API endpoints with
curlor Postman before committing. - Verify new features in the browser with seeded data (
seed.sql). - Ensure no regressions on:
- Report submission & display
- Moderation dashboard workflows
- Analytics dashboard
๐ Security
- Never commit real API keys, secrets, or passwords.
- Use
.envand.env.examplefor config. - Review PRs for SQL injection, XSS, CSRF issues.
๐ Code of Conduct
By participating in this project, you agree to maintain a respectful and inclusive environment. Harassment or discrimination of any kind will not be tolerated.
Thanks for contributing! ๐ฆ