This is the monorepo for the Live Cricket Scores Service. This service is built using an AWS event driven architecture to find HTML scorecards and publish updates to S3, web sockets, webpush whenever the scores are updated.
Source code is found under the packages/
directory:
functions
for lambda functions entry pointslibs
for common libraries that are used by appsscorecard-processor
for the scorecard processor process
This repo makes use of Turbo Repo and NPM workspaces to aid with monorepo setup.
Install:
npm i
Dependencies between commands can also be found in turbo.json
The service is deployed using Terraform. The definitions can be found in the terraform
directory and the service is deployed by the deploy.yml
GHA workflow every time main is updated.
The deployment workflow requires the following secrets in the Github repository:
AWS_ACCESS_KEY_ID
- AWS access keyAWS_SECRET_ACCESS_KEY
- AWS secret keySANITY_EDIT_TOKEN
- edit token for updating the result in Sanity. Disable updating Sanity by throttling theupdate-sanity
lambdaAPI_KEY
- API key for the API endpoints to subscribe to score and socket updatesVAPID_SUBJECT
- Webpush Vapid subject. Disable webpush by throttling theweb-notify
lambdaVAPID_PUBLIC_KEY
- Webpush Vapid public key. Disable webpush by throttling theweb-notify
lambdaVAPID_PRIVATE_KEY
- Webpush Vapid private key. Disable webpush by throttling theweb-notify
lambda
Vapid keys can be created here