{"id":19495869,"url":"https://github.com/hakobera/serverless-webrtc-signaling-server","last_synced_at":"2025-04-25T21:32:46.232Z","repository":{"id":62644940,"uuid":"174695882","full_name":"hakobera/serverless-webrtc-signaling-server","owner":"hakobera","description":"Serverless WebRTC Signaling Server only works for WebRTC P2P.","archived":false,"fork":false,"pushed_at":"2023-07-05T23:01:55.000Z","size":31,"stargazers_count":76,"open_issues_count":3,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T03:41:16.867Z","etag":null,"topics":["aws-sam","go","serverless","webrtc","webrtc-signaling","websocket"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hakobera.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-09T13:08:32.000Z","updated_at":"2024-11-15T15:17:48.000Z","dependencies_parsed_at":"2024-06-20T13:09:11.971Z","dependency_job_id":"90afa4dc-b8ca-4a3a-b909-ba7e606268cf","html_url":"https://github.com/hakobera/serverless-webrtc-signaling-server","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/hakobera%2Fserverless-webrtc-signaling-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakobera%2Fserverless-webrtc-signaling-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakobera%2Fserverless-webrtc-signaling-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakobera%2Fserverless-webrtc-signaling-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hakobera","download_url":"https://codeload.github.com/hakobera/serverless-webrtc-signaling-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250900421,"owners_count":21505051,"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-sam","go","serverless","webrtc","webrtc-signaling","websocket"],"created_at":"2024-11-10T21:39:14.765Z","updated_at":"2025-04-25T21:32:45.974Z","avatar_url":"https://github.com/hakobera.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://circleci.com/gh/hakobera/serverless-webrtc-signaling-server.svg?style=svg)](https://circleci.com/gh/hakobera/serverless-webrtc-signaling-server)\n\n# serverless-webrtc-signaling-server\n\nThis is the code and template for the serverless-webrtc-signaling-server. There are five functions contained within the directories and a SAM teamplte that wires them up to a DynamoDB table and provides the minimal set of permissions needed to run the app.\n\n## What is Serverless WebRTC Signaling Server?\n\nServerless WebRTC Signaling Server is Signaling Server for WebRTC using WebSocket and running on AWS.\nThis signaling server only works for WebRTC P2P.\n\nThis signaling server implements room feature compatible with [WebRTC Signaling Server Ayame](https://github.com/OpenAyame/ayame).\nRoom feature is simple, so only 2 people can join a room.\n\nIf you want to know how this server works, refer to https://github.com/shiguredo/ayame/blob/develop/doc/DETAIL.md (written in Japanese)\n\n## Setup process on Local Machine\n\n## Requirements\n\n* AWS CLI already configured with Administrator permission\n* [Golang 1.12 or greater](https://golang.org)\n\n### Installing dependencies\n\nThis repository use [GO Modules](https://github.com/golang/go/wiki/Modules) to manage dependencies.\nDependencies are automaticaly download when you build code by `make build` command.\n\n### Building\n\nGolang is a statically compiled language, meaning that in order to run it you have to build the executable target.\n\nYou can issue the following command in a shell to build it:\n\n```shell\nmake build\n```\n\n### Local testing\n\n#### Unit Testing\n\nWe use `testing` package that is built-in in Golang and you can simply run the following command to run our tests:\n\n```shell\nmake test\n```\n\n#### Integration Testing\n\nUnfortunatelly sam CLI does not support WebSocket local test. So you need to deploy to test functionality.\nWe are planing to write local integration test using [Local Stack](https://github.com/localstack/localstack), but not yet implemented.\n\n## Packaging and deployment\n\nFirst and foremost, we need a `S3 bucket` where we can upload our Lambda functions packaged as ZIP before we deploy anything - If you don't have a S3 bucket to store code artifacts then this is a good time to create one:\n\n```bash\naws s3 mb s3://BUCKET_NAME\n```\n\nNext, create file named `.env` using `cp .env.template .env` command.\nThen open the file in your editer and set S3 bucket name which you created to `SAM_BUCKET`.\n\n```bash\n# Must need to change\nSAM_BUCKET=REPLACE_THIS_WITH_YOUR_S3_BUCKET_NAME\n\n# Change if you want \nAWS_REGION=ap-northeast-1\nSTAGE=Dev\nSTACK_NAME=webrtc-signaling-server\nROOM_TABLE_NAME=Rooms\nCONNECTION_TABLE_NAME=Connections\n```\n\nAt last, run the following command to package our Lambda function to S3:\n\n```shell\nmake deploy\n```\n\n\u003e **See [Serverless Application Model (SAM) HOWTO Guide](https://github.com/awslabs/serverless-application-model/blob/master/HOWTO.md) for more details in how to get started.**\n\nAfter deployment is complete you can run the following command to retrieve the API Gateway Endpoint URL:\n\n```bash\nmake describe-stack\n``` \n## Connect to API Gateway Endpoint URL using wscat (WebSocket CLI client)\n\n```bash\n$ npm install -g wscat\n$ wscat $(make describe-stack | jq -r '.[][] | select(.OutputKey == \"WebSocketURI\") | .OutputValue')\n```\n\n## License\n\nApache License 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhakobera%2Fserverless-webrtc-signaling-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhakobera%2Fserverless-webrtc-signaling-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhakobera%2Fserverless-webrtc-signaling-server/lists"}