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:
functionsfor lambda functions entry pointslibsfor common libraries that are used by appsscorecard-processorfor 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-sanitylambdaAPI_KEY- API key for the API endpoints to subscribe to score and socket updatesVAPID_SUBJECT- Webpush Vapid subject. Disable webpush by throttling theweb-notifylambdaVAPID_PUBLIC_KEY- Webpush Vapid public key. Disable webpush by throttling theweb-notifylambdaVAPID_PRIVATE_KEY- Webpush Vapid private key. Disable webpush by throttling theweb-notifylambda
Vapid keys can be created here
