A backend service powering the Open-Bus platform. Provides APIs for health checks, GitHub issue creation, complaints, and government transportation data.
- 💬 For general help and system updates, join the Hasadna Slack: #open-bus channel
- 🐞 Found a bug or have a feature request? Open an issue
- 🤝 Want to contribute? See our contributing guidelines
- 📄 Swagger UI (production): https://open-bus-backend.k8s.hasadna.org.il/docs
- 🖥️ Swagger UI (local): http://localhost:3001/docs
npm installCreate a .env file:
# Server Configuration
PORT=3001
HOST=0.0.0.0
NODE_ENV=development
LOG_LEVEL=info
# GitHub Configuration
GITHUB_TOKEN=your_github_token
GITHUB_OWNER=your_github_username
GITHUB_REPO=your_repository_namenpm run devnpm start# Run all tests
npm test
# Run with coverage
npm run test:coverage
# Run lint checks
npm run test:lint
# Fix lint issues
npm run lint:fix- Build the image
docker build -t open-bus-backend .- Run the container
docker run -it -p 3001:3001 \
-e GITHUB_TOKEN=your_github_token \
-e GITHUB_OWNER=your_github_owner \
-e GITHUB_REPO=your_github_repo \
-e LOG_LEVEL=info \
open-bus-backendGET /→ Returns server status
POST /issues→ Create a new GitHub issue- Required:
title,contactName,contactEmail,description,environment,expectedBehavior,actualBehavior,reproducibility - Optional:
attachments[](array of URLs)
- Required:
POST /complaints→ Submit a complaint to government forms-
Required:
userData:firstName,lastName,id,email,phonedatabusData:operator
-
Optional:
debug,complaintType,description
-
| Endpoint | Method | Required Body |
|---|---|---|
/gov/lines-by-station |
POST | EventDate, OperatorId, StationId |
/gov/stations-by-line |
POST | eventDate, OperatorId, OfficelineId, Directions |
/gov/subjects |
POST | listName = "subject_type_vehicles" |
/gov/train-stations |
POST | StationTypeId |
/gov/pniya |
POST | listName = "pniya" |
/gov/not-real-numbers |
POST | listName = "notrealnumbers" |
/gov/lines-by-line |
POST | eventDate, OperatorId, OperatorLineId |
/gov/cities |
POST | none |
/gov/time |
GET | none |
Server will be available at: http://localhost:3001