Server-side client of ISA Rankings (Serverless, NestJS, DynamoDB)
Server-side client of ISA Rankings (Serverless, NestJS, DynamoDB)
Server-side client of isa-rankings.org
Technical Overview:
serverless on AWS.serverless?
DynamoDB is designed in such a way (primary keys and sort keys) so that it supports all the query patterns this application needs. It has only a single table with aggregated GSIs, hierarchical SKs.
In short, it is customized for application's access patterns.
Overview of the table:
| PK | SK_GSI | LSI | GSI_SK | ...Attributes |
|---|---|---|---|---|
| Athlete:{id} | AthleteDetails | {normalizedName} | ... | |
| Athlete:{id} | Contest:{discipline}:{id} | Contest:{date} | {points} | ... |
| Athlete:{id} | Rankings:{type}:{year}:{discipline}:{gender}:{ageCategory} | {points} | ... | |
| Contests | Contest:{discipline}:{id} | Contest:{date} | ... |
Possible Query Patterns:
| GSI | SK | PK | ...Attributes |
|---|---|---|---|
| AthleteDetails | {normalizedName} | Athlete:{id} | ... |
| Contest:{discipline}:{id} | {points} | Athlete:{id} | ... |
| Rankings:{year}:{discipline}:{gender}:{ageCategory} | {points} | Athlete:{id} | ... |
Possible Query Patterns:
To start with, serverless installation must be completed on your local comptuter.
How to: Installation Guide
There are 2 environment stages, therefore you should have valid credentials for them. Checkout the secrets.example.yml under serverless folder.
Replace the values with real ones
For deployment
aws-clishould be installed and configured withProfilesneeded in theserverless.ymlfile. To get your credentials contact to ISA.
First, credentials are obtained from .env file. Replace the values in .env.example file with real ones depending on the stage you want to run (in secrets.yml you can see the stages)
Install dependencies
npm installStart serverless-offline
npm startAPI is served at localhost:3000/
Gource output

No open issues yet, or sync has not completed.