{"id":16954098,"url":"https://github.com/fquffio/pointers-arena","last_synced_at":"2026-04-16T02:32:37.451Z","repository":{"id":46064236,"uuid":"166983074","full_name":"fquffio/pointers-arena","owner":"fquffio","description":"Sample application to demonstrate WebSocket APIs in Amazon API Gateway.","archived":false,"fork":false,"pushed_at":"2023-01-03T17:53:08.000Z","size":386,"stargazers_count":2,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T04:44:53.696Z","etag":null,"topics":["aws","aws-apigateway","aws-dynamodb","aws-lambda","serverless","websocket"],"latest_commit_sha":null,"homepage":"https://pointers-arena.accrocch.io/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fquffio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-22T11:33:54.000Z","updated_at":"2019-07-09T08:58:58.000Z","dependencies_parsed_at":"2023-02-01T08:31:17.645Z","dependency_job_id":null,"html_url":"https://github.com/fquffio/pointers-arena","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fquffio/pointers-arena","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fquffio%2Fpointers-arena","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fquffio%2Fpointers-arena/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fquffio%2Fpointers-arena/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fquffio%2Fpointers-arena/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fquffio","download_url":"https://codeload.github.com/fquffio/pointers-arena/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fquffio%2Fpointers-arena/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31868522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","aws-dynamodb","aws-lambda","serverless","websocket"],"created_at":"2024-10-13T22:08:46.904Z","updated_at":"2026-04-16T02:32:37.347Z","avatar_url":"https://github.com/fquffio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Pointers Arena](https://pointers-arena.accrocch.io/)\n=====================================================\n\nThis is a sample application that uses several feature of WebSocket APIs in\nAmazon API Gateway.\n\nIt is composed of a simple WebSocket that receives updates from clients about\nthe position of mouse pointer within an element (the \"Arena\") and notifies all\nother connected clients about the new position, so that other pointers can be\nshown in the Arena.\n\nGetting started\n---------------\n\n0. **Prerequisites**\n\n    The following steps assume you have:\n\n      - AWS CLI installed and configured with credentials for an active AWS account\n      - a Route53 Hosted Zone (e.g. `example.com.`)\n      - a valid ACM certificate for `*.example.com`\n\n    Before you begin, change relevant variables in `Makefile`\n    (`AWS_PROFILE`, `AWS_DEFAULT_REGION`, `PACKAGE_BUCKET`, `SITE_HOSTNAME` namely)\n    or remember to _always_ pass these values when invoking `make` from the command line.\n\n1. **Deploy CloudFormation Stack**\n\n    Run `make` to package the CloudFormation template, then deploy a new Stack from\n    the console using the generated `template.yml`. Wait until all resources are\n    ready (might take a while).\n\n2. **Deploy WebSocket API**\n\n    Create a new deployment stage by deploying your WebSocket API from the\n    Amazon API Gateway console. The stage name **MUST** match the one you specified\n    in your CloudFormation Stack.\n\n3. **Update config**\n\n    Copy `public/info.sample.json` in `public/info.json` and update the WebSocket URL.\n\n4. **Deploy HTML+JS application**\n\n    Run `make deploy` to build and deploy client application.\n\n    Assets are uploaded to S3 and served via CloudFront.\n\nInfrastructure overview\n-----------------------\n\nClient connections are managed by Amazon API Gateway, that routes WebSocket frames\nto the appropriate Lambda function.\n\nWhen a client opens a new connection, the `OnConnect` Lambda function is invoked.\nThis function is responsible for adding a new item in a DynamoDB table storing\nthe connection ID (required to send frames to the client) and a randomly generated\nclient name and color (used for display purposes and to avoid exposing connection ID).\n\nWhen a client sends a `{\"action\": \"list\"}` frame, the `OnList` Lambda function\nis invoked. This function is responsible for fetching all items in the DynamoDB\ntable and sending a frame to the requesting client containing all pointers in the\nArena. The frame is sent \"synchronously\" using Integration response: the result\nof the Lambda function is streamed to the client.\n\nWhen a client sends a `{\"action\": \"move\", \"clientX\": 0.1, \"clientY\": 0.9}` frame,\nthe `OnMove` Lambda function is invoked. This function is responsible for updating\nthe item in DynamoDB with the new pointer position.\n\nWhen a client disconnects, the `OnDisconnect` Lambda function is invoked. This\nfunction is responsible for deleting the relevant item from DynamoDB.\n\nLast but not least, the `TableTriggers` Lambda function is attached to the\nDynamoDB Stream for the table that stores client info. This function is responsible\nfor analyzing changes in data and sending frames to all other connected clients\ncontaining updates.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffquffio%2Fpointers-arena","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffquffio%2Fpointers-arena","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffquffio%2Fpointers-arena/lists"}