Skip to content

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

🚌 Open Bus Backend

A backend service powering the Open-Bus platform. Provides APIs for health checks and GitHub issue creation. Complaint submission is planned for a future PR.

📢 Get Involved

📖 API Documentation

🔗 Related Projects

⚙️ Installation

npm install

🌍 Environment Variables

Create 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_name

🚀 Running the Server

Development

npm run dev

Production

npm run build
npm start

🧪 Testing

# Check TypeScript types
npm run typecheck

# 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

🐳 Running with Docker

  1. Build the image
docker build -t open-bus-backend .
  1. 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-backend

🔗 API Endpoints

🩺 Health Check

  • GET / → Returns server status

🐞 GitHub Issues

  • POST /issues → Create a new GitHub issue
    • Required: title, contactName, description, environment, expectedBehavior, actualBehavior, reproducibility
    • Optional: contactEmail, publishContactEmail (boolean, default false; the email is posted in the public issue only when true), attachments[] (array of URLs), debugContext (URL/context of the page the report was filed from)

📣 Complaints

  • POST /complaints/send → Returns 501 Not Implemented until complaint submission is added.

Server will be available at: http://localhost:3001

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages