This is a serverless API for the prestige app. It was built with AWS Lambda and Golang. The project includes a CDK sub-project to define the infrastructure. Currently the API only supports ranking technology companies. In the future the API will support ranking computer science programs at American universities. The API ranks entities by winrate from individual 1v1 matchups.
- /services - Contains each of the Golang Lambda functions
- /libs - Contains code shared by multiple functions (nothing currently)
- /infrastructure - Contains an AWS CDK project that defines infrastructure as code
- Ensure you have NodeJS and NPM installed!
- Install the AWS CLI
- Configure the AWS CLI and ensure you have billing enabled
- Navigate to the /infrastructure directory
cd infrastructure
- Install the cdk cli
npm install -g aws-cdk
- Run
npm install
to install dependencies - Run
cdk deploy
to create the CloudFormation template and deploy it
Check out the INFRA.md in the CDK sub-project for more information about the infrastructure and deployment.
- GET /rankings - Get a list of all companies sorted by winrate
- GET /ranking?company=name - Get a company by name (Not included in infrastructure)
- GET /matchup - Get a randomly generated matchup with verification code
- POST /matchup - Send the result of a matchup to update the rankings
- Requires JSON body that includes
verificationCode
andwinner
with value1
or2
- Requires JSON body that includes