{"id":24152049,"url":"https://github.com/uwon0625/nbagames","last_synced_at":"2026-04-10T00:14:02.888Z","repository":{"id":270758193,"uuid":"911370428","full_name":"uwon0625/NBAgames","owner":"uwon0625","description":"NBA live score and alerts","archived":false,"fork":false,"pushed_at":"2025-01-20T21:30:24.000Z","size":81976,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T19:16:32.519Z","etag":null,"topics":["aws","cloudformation","dynamodb","eventbridge","express","iac","jest","lambda","nestjs","nextjs","powershell","reactjs","redis","restful-api","storybook","tailwindcss","terraform","typescript","unittest","websocket"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uwon0625.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-02T21:23:26.000Z","updated_at":"2025-01-22T14:35:51.000Z","dependencies_parsed_at":"2025-01-02T22:29:45.759Z","dependency_job_id":"56e02ef6-4ab4-4506-a4aa-790c7ad2c2fb","html_url":"https://github.com/uwon0625/NBAgames","commit_stats":null,"previous_names":["uwon0625/nbagames"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwon0625%2FNBAgames","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwon0625%2FNBAgames/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwon0625%2FNBAgames/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwon0625%2FNBAgames/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uwon0625","download_url":"https://codeload.github.com/uwon0625/NBAgames/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241411544,"owners_count":19958753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cloudformation","dynamodb","eventbridge","express","iac","jest","lambda","nestjs","nextjs","powershell","reactjs","redis","restful-api","storybook","tailwindcss","terraform","typescript","unittest","websocket"],"created_at":"2025-01-12T10:14:40.030Z","updated_at":"2025-12-30T18:51:27.296Z","avatar_url":"https://github.com/uwon0625.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NBAgames\nNBA live score and alerts, it pulls most recent/scheduled games, with box score for the games. It also provides live updates.\n\n# System Diagram(Data Flow)\n```mermaid\n%%{init: {'flowchart': {'width': 600}}}%%\nflowchart LR\n    NBA[\"NBA API\"]\n    Poller[\"Lambda Poller\"]\n    EventBridge[\"EventBridge(CloudWatch Events)\"]\n    SQS[\"Message Queue(Kafka)\"]\n    Lambda[\"Lambda Functions(Game Updates \u0026 Box Scores)\"]\n    DynamoDB[\"DynamoDB\"]\n    Redis[\"Redis Cache\"]\n    API[\"API Gateway\"]\n    Client[\"Frontend\"]\n\n    NBA --\u003e Poller \n    EventBridge --\u003e Lambda\n    SQS --\u003e Lambda\n    Poller --\u003e DynamoDB\n    Lambda --\u003e DynamoDB\n    DynamoDB --\u003e API\n    Redis --\u003e API \n    API --\u003e Client\n\n    %% Styling\n    classDef aws fill:#FF9900,stroke:#232F3E,stroke-width:2px,color:white;\n    classDef client fill:#36B37E,stroke:#172B4D,stroke-width:2px,color:white;\n    classDef external fill:#4A90E2,stroke:#2171C7,stroke-width:2px,color:white;\n\n    class NBA external\n    class Poller,EventBridge,Lambda,DynamoDB,Redis,API,SQS aws\n    class Client Frontend\n```\n\n# Technology Stack\n - frontend:  Next.js v14.1.0(React v18.2.0), TypeScript, Tailwind CSS, Storybook v7.6.17.\n - backend: Terraform, Docker, SQS, Kafka, NestJS, Express, CORS, WebSocket, Redis,ElastiCache, AWS SDK V3, AWS DynamoDB, Lambda, EventBridge, CloudWatch, Restful API.\n - infrastructure: AWS CDK(IAM, CloudFormation, DynamoDB).\n - unit testing: Jest v29.7.0.\n\n# Note\n - to lower the cost of development and testing, use local Redis cache and Kafka(vs AWS MSK and ElastiCache Clusters, for production), the application has configurations in backend .env(refer to backend\\.env.example, and backend\\infrastructure\\terraform\\terraform.tfvars - please make sure the settings are consistent) to decide the facilities:\n  - Cost control for dev environment\n    * msk_instance_type = \"kafka.t3.small\"      # Instead of larger instances\n    * redis_node_type = \"cache.t3.micro\"        # Smallest Redis instance\n\n  - Development environment settings\n    * use_local_services = true    # Use Docker Compose services\n    * use_msk = false             # Don't deploy MSK\n    * use_elasticache = false     # Don't deploy ElastiCache\n    * use_sqs_instead_of_msk = true  # Don't use SQS in development\n\n# Instructions \n - clone the repo.\n - frontend\n    * cd frontend\n    * yarn install\n    * yarn test # run unit tests\n    * yarn dev\n - backend\n    * cd backend\n    * yarn install\n    * docker-compose up -d # start the kafka and redis services locally\n    * yarn test # run unit tests\n    * cd infrastructure/terraform\n    * terraform init\n    * terraform plan -out=tfplan\n    * terraform plan -destroy -out=tfdestroyplan \n    * cd ../../ # back to backend\n    * ./infrastructure/scripts/deploy.ps1 # include packaging lambda functions \u0026 terraform apply\n    * yarn dev #wait a few moments to have Redis ready\n - Useful tips:\n    * example for SQS triggered lambda function invocation: aws sqs send-message --queue-url 'https://sqs.us-east-1.amazonaws.com/{account-id}/nba-live-updates-dev.fifo' --message-body '{\"gameId\":\"0022400599\",\"gameStatus\":1,\"homeTeam\":{\"teamId\":\"1610612766\"},\"awayTeam\":{\"teamId\":\"1610612742\"}}' --message-group-id \"game0022400599\" \n    * check AWS resources: backend/infrastructure/scripts/check-tf-resources.ps1\n    * check lambda functions logs:\n        * aws logs tail \"/aws/lambda/nba-live-game-update-dev\"\n        * aws logs tail \"/aws/lambda/nba-live-box-score-dev\"\n    * cleanup: terraform destroy\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuwon0625%2Fnbagames","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuwon0625%2Fnbagames","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuwon0625%2Fnbagames/lists"}