Types of contributions
| Type | Description | Issue required |
|---|---|---|
| Bug fix | Correct an error in fare logic or the API | Yes |
| Data update | Change fares, neighborhoods, or special routes in src/data/ | Yes |
| New feature | Add an endpoint or new business logic | Yes |
| Documentation | Improve the README, Swagger docs, or examples | No |
| Refactor | Improve code without changing behavior | No |
Local setup
Prerequisites: Node.js >= 18, npm >= 9http://localhost:3000/health.
Git workflow
Make your changes
Write your code following the code standards below. Commit using the Conventional Commits format.
Branch naming conventions
| Prefix | Use |
|---|---|
feat/ | New feature |
fix/ | Bug fix |
data/ | Fare or neighborhood data update |
docs/ | Documentation only |
refactor/ | Refactoring |
Commit convention
This project uses Conventional Commits:feat, fix, data, docs, refactor, test, chore
Examples:
Code standards
- Use TypeScript strict mode — do not use
anywithout justification. - Business logic belongs in
src/services/, never in controllers. - Static data belongs in
src/data/as JSON files. - Always sanitize inputs that are injected into HTML (see the
/docsendpoint inserver.tsas a reference). - Use existing files as style references before introducing new patterns.
Testing
Every change to fare logic must include or update tests.src/__tests__/.
PR review process
- A maintainer will review your PR within 7 business days.
- If changes are requested, respond in the same PR — do not open a new one.
- Once approved, the maintainer merges to
main. - PRs with no activity for 30 days will be closed.
If you have questions, open an issue with the
question label.