Skip to content

mbta/elevator_hotline

Repository files navigation

Elevator Hotline

Provides an automated telephone service which reads out MBTA elevator outages.

AWS Connect

The Connect contact flow is currently not managed in Terraform; the source of truth is the AWS dashboard. An export of the flow is committed to this repo as hotline_prod.json and hotline_dev.json. When making changes in Connect, be sure to re-export and update the committed files.

Hotline IVR

AWS Lambda

The Lambda function in this repo is called by the Connect contact flow when a user calls the hotline. It in turn calls the V3 API to get current alerts and affected stations, returning a set of voice lines to Connect.

Setup

  1. Clone this repo
  2. Install asdf
  3. Install direnv
  4. asdf plugin add nodejs
  5. asdf install
  6. cp .envrc.template .envrc
  7. direnv allow
  8. npm install

Development

  • npm test: Run tests
  • npm run format: Format code
  • npx tsc: Check types
  • npx eslint .: Run lint checks
  • npm run local: Run the Lambda locally and print output
    • This requires filling in API_KEY in .envrc with a V3 API key. Check Notion for ways to do this securely, without storing the key unencrypted
  • scripts/deploy.sh dev: Package the local code and deploy it to dev
  • scripts/invoke.sh dev: Invoke the dev Lambda and print the result
    • Both of the above scripts require that you have aws CLI access set up

About

Phone service that describes issues affecting elevators at stations

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors