Skip to content

AAAS/ett

 
 

Repository files navigation

ETT (Ethical Transparency Tool)

This repository comprises a cloud-based implementation of the Ethical Transparency Tool for The Societies Consortium on Sexual Harassment in STEMM as described in the Overview Briefing Packet. This implementation is designed for hosting on AWS and built completely around AWS serverless technologies.

Topology

This diagram depicts the basic arrangement of services and the sequencing a request made by a single page app client makes in order to access backend services (database, emailing, events, etc.)

./topology.png

Setup - Prerequisites

Setup - Steps

Build the entire application and AWS infrastructure from scratch.

  1. Clone this repository

  2. Modify the ./context/context.json file. You will probably only adjust 2 or 3 of the attributes in this file - a breakdown of all attributes are here

  3. Obtain security credentials for the admin-level IAM role you will be using for accessing the aws account to lookup and/or deploy resources. Create a named profile out of these credentials in your ~/.aws/credentials file.

  4. Install all dependencies:

    for line in $(find . -maxdepth 4 -name package.json -print | grep -v '/node_modules/') ; do (cd $(dirname $line) && npm install); done \;
    
  5. Bootstrapping is the process of provisioning resources for the AWS CDK before you can deploy AWS CDK apps into an AWS environment. (An AWS environment is a combination of an AWS account and Region). You only need to bootstrap once for your chosen region within your account. The presence of a "CDKToolKit" cloud-formation stack for that region will indicate bootstrapping has already occurred. To bootstrap, follow these steps. The simple bootstrapping command is:

    export AWS_PROFILE=my_named_profile
    cdk bootstrap aws://[aws account ID]/us-east-1
    
  6. [OPTIONAL] Run the CDK synth command command to generate the cloudformation template that will be used to create the stack:

    mkdir ./cdk.out 2> /dev/null
    cdk synth &> cdk.out/ett.template.yaml
    

    NOTE: The synth command will create a .json file, but will also output yaml to stdout. The command above redirects that output to a yaml file alongside the json file.

  7. [OPTIONAL] Debug synthesis with breakpoints: If developing in vscode, add the following debug configuration to the ${workspaceFolder}/.vscode/launch.json file if it does not already exist:

    {
      "version": "0.2.0",
      "configurations": [
        {
          "type": "node",
          "request": "launch",
          "name": "CDK Debugger (App)",
          "skipFiles": ["<node_internals>/**"],
          "runtimeArgs": ["-r", "./ett-auth/node_modules/ts-node/register/transpile-only"],
          "args": ["${workspaceFolder}/ett-auth/bin/ett.ts"]
        }
      ]
    }
    

    Place a breakpoint at the desired location and run the launch configuration.

  8. Enable API Gateway Logging for the account. Follow these directions

  9. Run the CDK deploy command to create the stack:

    npm run deploy
    

    or to completely tear down and replace a stack without prompts use:

    npm run redeploy
    

About

Ethical Transparency Tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 82.1%
  • HTML 17.1%
  • Other 0.8%