{"id":19854674,"url":"https://github.com/obytes/aws-sumu-demo","last_synced_at":"2026-05-06T19:40:44.063Z","repository":{"id":77139220,"uuid":"428186533","full_name":"obytes/aws-sumu-demo","owner":"obytes","description":"Demo client/server Websocket Application that leverage SUMU stack as a messaging backbone.","archived":false,"fork":false,"pushed_at":"2021-11-20T18:31:07.000Z","size":931,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-01-11T13:50:52.324Z","etag":null,"topics":["aws","aws-apigateway","firebase-auth","push-notifications","react","realtime-messaging","websocket"],"latest_commit_sha":null,"homepage":"https://www.obytes.com/blog/go-serverless-part-4-realtime-interactive-and-secure-applications-with-aws-websocket-api-gateway","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/obytes.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":"2021-11-15T08:47:07.000Z","updated_at":"2022-01-15T21:27:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"33a358f2-fc38-454a-9806-0eeb32592e9e","html_url":"https://github.com/obytes/aws-sumu-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obytes%2Faws-sumu-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obytes%2Faws-sumu-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obytes%2Faws-sumu-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obytes%2Faws-sumu-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/obytes","download_url":"https://codeload.github.com/obytes/aws-sumu-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241244768,"owners_count":19933294,"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","aws-apigateway","firebase-auth","push-notifications","react","realtime-messaging","websocket"],"created_at":"2024-11-12T14:10:06.716Z","updated_at":"2026-05-06T19:40:39.042Z","avatar_url":"https://github.com/obytes.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS SUMU DEMO\n\nDemo client/server Websocket Application that leverage [SUMU stack](https://github.com/obytes/terraform-aws-sumu) as a \nmessaging backbone.\n\nLive Demo is here: [https:sumu.kodhive.com](https:sumu.kodhive.com)\n\n![Demo](docs/images/demo.png)\n\n## Prerequisites\n\nTo test this demo with your own infrastructure, you have to provision a SUMU stack. you will find instructions on how \nyou can deploy a SUMU stack [here](https://github.com/obytes/terraform-aws-sumu) \n\n\n## Server\n\nThe server is an AWS Lambda Function which is:\n\n- Subscribed to SUMU output messages SNS Topic.\n- Has SUMU output messages SQS queue as event source.\n- Publish notifications though SUMU input notifications SNS Topic.\n- Sends notifications through SUMU input notifications SQS Queue.\n\n### Server Environment variables\n\nThe required environment variables by the server are:\n\n- `CONNECTIONS_TABLE`: SUMU DynamoDB connections table.\n  \n- `NOTIFICATIONS_TOPIC_ARN`: SUMU Input Notifications topic ARN.\n  \n- `NOTIFICATIONS_QUEUE_URL`: SUMU Input Notifications topic ARN.\n\n## Client\n\nThe client is a React Application which implement these features:\n\n- Sign in using Google SSO with Firebase.\n- Connects to SUMU websocket API Gateway.\n- Disconnect from SUMU websocket API Gateway.\n- Periodic KeepAlive (Ping/Pong) to keep connections active.\n- Publishing messages to the messages SNS Topic through API Gateway.\n- Sending messages to the messages SQS Queue through API Gateway.\n- Retrieve the list of connected users.\n- Receives users ONLINE/OFFLINE events and update the connected users list accordingly.\n- Implement multiple publish and send push modes:\n    - UNICAST: sends an echo message that will be received by just the sender.\n    - MULTICAST: sends a message to multiple selected users except the sender.\n    - BROADCAST: sends a message to all connected users except the sender.\n\n### Client Environment variables\n\nThe required environment variables by the client app are:\n\n- `REACT_APP_FIREBASE_API_KEY`: Firebase API Key\n  \n- `REACT_APP_FIREBASE_PROJECT_ID`: Firebase Project ID\n  \n- `REACT_APP_FIREBASE_AUTH_DOMAIN`: Firebase Auth Domain\n  \n- `REACT_APP_FIREBASE_MEASUREMENT_ID`: Firebase measurement ID\n  \n- `REACT_APP_WEBSOCKET_URL`: SUMU Websocket URL\n\n### Deploying\n\nYou can deploy the server as an AWS Lambda Function using the Terraform Module in [infra](infra)\n\n```hcl\nmodule \"sumu_demo\" {\n  source = \"./infra\"\n  prefix = local.prefix\n  common_tags = local.common_tags\n\n  # Input\n  messages_topic_arn = module.sumu.messages[\"topic\"][\"arn\"]\n  messages_queue_arn = module.sumu.messages[\"queue\"][\"arn\"]\n\n  # Output\n  notifications_topic = module.sumu.notifications[\"topic\"]\n  notifications_queue = module.sumu.notifications[\"queue\"]\n\n  connections_table = module.sumu.connections_table\n\n  # Github\n  pre_release  = true\n  s3_artifacts = {\n    arn    = aws_s3_bucket.artifacts.arn\n    bucket = aws_s3_bucket.artifacts.bucket\n  }\n  github = {\n    owner          = \"obytes\"\n    webhook_secret = \"not-secret\"\n    connection_arn = \"arn:aws:codestar-connections:us-east-1:{ACCOUNT_ID}:connection/{CONNECTION_ID}\"\n  }\n  github_repository = {\n    name   = \"aws-sumu-demo\"\n    branch = \"main\"\n  }\n  # Notifications\n  ci_notifications_slack_channels = {\n    info  = \"ci-info\"\n    alert = \"ci-alert\"\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobytes%2Faws-sumu-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobytes%2Faws-sumu-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobytes%2Faws-sumu-demo/lists"}