Skip to content

Contributing to Edmonton Accident & Near Miss Reporting Platform

CI/CD GitHub release Docs

We welcome contributions to improve this project! ๐ŸŽ‰


๐ŸŒ€ How to Contribute

  1. Fork the repository
    Create your own copy of the repo under your GitHub account.

  2. Create a feature branch
    Use clear branch naming:

  3. feature/<short-description> (for new features)
  4. fix/<short-description> (for bug fixes)
  5. docs/<short-description> (for documentation changes)

Example:
bash git checkout -b feature/add-report-filters

  1. Make your changes
    Follow the coding standards outlined below.

  2. Commit messages
    Use descriptive commit messages in the imperative mood:

  3. โœ… Add moderation filters to dashboard
  4. โœ… Fix SQL query for report analytics
  5. โŒ Fixed stuff

  6. Push and open a Pull Request (PR)

  7. Push your branch to your fork.
  8. Open a PR against the main branch of this repo.
  9. 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/catch for fetch calls.
  • Keep UI logic in dedicated JS modules (map.js, report_submission.js, etc.).

  • CSS:

  • Use shared style.css for consistency.
  • Prefer utility classes and avoid inline styles.

  • Docs:

  • Update README.md and QUICKSTART.md if your changes impact setup.
  • Add JSDoc/PHPDoc comments where appropriate.

๐Ÿงช Testing

  • Test API endpoints with curl or 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 .env and .env.example for 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! ๐Ÿšฆ