Skip to content

mbta/screenplay

Repository files navigation

Screenplay

Enables OIOs to view and manage screens that provide transit info to riders.

Setup

Install tools

  1. Install asdf
  2. Install language build dependencies: brew install coreutils
  3. asdf plugin-add ... for each tool listed in .tool-versions
  4. asdf install

Set up environment

  1. Install direnv
  2. cp .envrc.template .envrc
  3. Fill in API_V3_KEY with a V3 API key
  4. direnv allow

Note the various _URL values in .envrc, which default to the production environments of the relevant apps — change these to e.g. point Screenplay to your own local instances.

Copy configuration

  1. Install the aws CLI and configure with your AWS credentials
    • To verify everything works, try: aws s3 ls mbta-ctd-config
  2. Run scripts/pull_configs.sh prod

To copy config files from a different Screenplay environment, replace prod in the command above.

Start the server

  1. mix deps.get
  2. npm install --prefix assets
  3. mix phx.server
  4. Visit http://localhost:4444

Optional: AWS credentials

In deployed environments, the app uses S3 for its configuration. If you ever want to replicate this behavior locally, you'll need to provide the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. For security reasons these should only be stored in 1Password and not directly in your .envrc.