{"id":20058850,"url":"https://github.com/ably-labs/serverless-websockets-quest","last_synced_at":"2025-06-24T22:32:07.423Z","repository":{"id":36970681,"uuid":"491823303","full_name":"ably-labs/serverless-websockets-quest","owner":"ably-labs","description":"An ADND style web-based game that combines serverless with websockets to achieve a realtime experience","archived":false,"fork":false,"pushed_at":"2023-09-27T05:31:34.000Z","size":2211,"stargazers_count":7,"open_issues_count":18,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-05T15:46:51.122Z","etag":null,"topics":["ably","azure-functions","demo","dotnet","durable-functions","realtime","serverless","vuejs","websockets"],"latest_commit_sha":null,"homepage":"https://quest.ably.dev/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ably-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2022-05-13T08:44:42.000Z","updated_at":"2024-06-27T02:15:07.000Z","dependencies_parsed_at":"2025-05-05T15:48:39.712Z","dependency_job_id":null,"html_url":"https://github.com/ably-labs/serverless-websockets-quest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"ably-labs/ably-labs-template-repo","purl":"pkg:github/ably-labs/serverless-websockets-quest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably-labs%2Fserverless-websockets-quest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably-labs%2Fserverless-websockets-quest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably-labs%2Fserverless-websockets-quest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably-labs%2Fserverless-websockets-quest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ably-labs","download_url":"https://codeload.github.com/ably-labs/serverless-websockets-quest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably-labs%2Fserverless-websockets-quest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261766869,"owners_count":23206699,"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":["ably","azure-functions","demo","dotnet","durable-functions","realtime","serverless","vuejs","websockets"],"created_at":"2024-11-13T13:04:36.411Z","updated_at":"2025-06-24T22:32:07.401Z","avatar_url":"https://github.com/ably-labs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless Websockets Quest\n\n![Serverless websockets start screen](./media/serverless-websockets-play.gif)\n\n## Description\n\nThis repository contains the code for the Serverless Websockets Quest, an ADND style multiplayer game concept that demonstrates how to use serverless websockets with Ably \u0026 Azure Functions.\n\nThe players trigger HTTP based serverless functions to play the game. The functions manage the global game state (stored as Durable Entities) and use Ably to send messages to the connected clients to update the local game state in realtime. The functions only publish messages, the players only subscribe to them.\n\n![Communication between player devices and the serverless application.](./media/communication-between-back-end-and-front-end.png)\n\nThe game can be played online at [quest.ably.dev](https://quest.ably.dev). Read the full blog post [here](https://ably.com/blog/quest-for-serverless-websockets-azure-functions-adventure?utm_source=ably-labs\u0026utm_medium=github\u0026utm_campaign=serverless-websockets-quest) or watch the [YouTube video](https://www.youtube.com/watch?v=KHzdc3USFU4).\n\n## Tech Stack\n\n- [Azure Functions](https://docs.microsoft.com/azure/azure-functions/functions-overview), used as serverless compute to manage the game flow.\n  - [Entity functions](https://docs.microsoft.com/azure/azure-functions/durable/durable-functions-entities?tabs=csharp), used to persist the overall game \u0026 player state.\n- [Ably](https://ably.com/), used as the serverless websockets to broadcast the game \u0026 player state to the clients in realtime.\n- [VueJS](https://vuejs.org/), used as the front-end framework for the game.\n- [Azure Static Web Apps](https://docs.microsoft.com/azure/static-web-apps/overview), used as the hosting solution in the cloud.\n\n\n## Running locally\n\nYou require the following dependencies:\n\n- [.NET 6](https://dotnet.microsoft.com/download/dotnet/6.0). The .NET runtime required for the C# Azure Functions.\n- [Node 16](https://nodejs.org/en/). The JavaScript runtime required for the Vue front-end.\n- [Azure Functions Core Tools](https://docs.microsoft.com/azure/azure-functions/functions-run-local?tabs=v4%2Cwindows%2Ccsharp%2Cportal%2Cbash). This is part of the Azure Functions extensions for VSCode that should be recommended for automatic installation when this repo is opened in VSCode.\n- [Azurite](https://marketplace.visualstudio.com/items?itemName=Azurite.azurite). This is an local storage emulator that is required for Entity Functions. When this repo is opened in VSCode a message will appear to install this extension.\n- [Azure Static Web Apps CLI](https://github.com/Azure/static-web-apps-cli). Install this tool globally by running this command in the terminal: `npm install -g @azure/static-web-apps-cli`.\n- A free Ably Account, [sign up](https://ably.com/signup?utm_source=gitub\u0026utm_medium=repo\u0026utm_campaign=GLB-2207-serverless-websockets-quest\u0026utm_content=repo-serverless-websockets-quest\u0026src=GLB-2207-serverless-websockets-quest-repo) or [log in](https://ably.com/login?utm_source=gitub\u0026utm_medium=repo\u0026utm_campaign=GLB-2207-serverless-websockets-quest\u0026utm_content=repo-serverless-websockets-quest\u0026src=GLB-2207-serverless-websockets-quest-repo) to ably.com, and [create a new app and copy the API key](https://faqs.ably.com/setting-up-and-managing-api-keys?utm_source=gitub\u0026utm_medium=repo\u0026utm_campaign=GLB-2207-serverless-websockets-quest\u0026utm_content=repo-serverless-websockets-quest\u0026src=GLB-2207-serverless-websockets-quest-repo).\n\n### Steps\n\n1. Clone this repo.\n2. Run `npm install` in the root folder.\n3. Rename the `api\\local.settings.json.example` file to `api\\local.settings.json`.\n4. Copy/paste the Ably API key in the `ABLY_APIKEY` field in the `local.settings.json` file.\n5. Start Azurite (VSCode: `CTRL+SHIFT+P -\u003e Azurite: Start`)\n6. Run `swa start` in the root folder.\n\n\u003cdetails\u003e\n    \u003csummary\u003eOpen the browser and navigate to \u003ccode\u003ehttp://localhost:4280/\u003c/code\u003e.\u003c/summary\u003e\n\nYou'll see this error message but you can ignore it as long as you're running the solution locally:\n\n```cmd\nFunction app contains non-HTTP triggered functions. Azure Static Web Apps managed functions only support HTTP functions. To use this function app with Static Web Apps, see 'Bring your own function app'.\n```\n\nThe terminal will eventually output this message that indicates the emulated Static Web App is running:\n\n```cmd\nAzure Static Web Apps emulator started at http://localhost:4280. Press CTRL+C to exit.\n```\n\n\u003c/details\u003e\n\n## Contributing\n\nWant to help contributing to this project? Have a look at our [contributing guide](CONTRIBUTING.md)!\n\n## More info\n\nFor more questions or comments, please contact me on [Twitter](https://twitter.com/marcduiker) on our Ably Discord.\n\n- [Join our Discord server](https://discord.gg/q89gDHZcBK)\n- [Follow us on Twitter](https://twitter.com/ablyrealtime)\n- [Use our SDKs](https://github.com/ably)\n- [Visit our website](https://ably.com/?utm_source=gitub\u0026utm_medium=repo\u0026utm_campaign=GLB-2207-serverless-websockets-quest\u0026utm_content=repo-serverless-websockets-quest\u0026src=GLB-2207-serverless-websockets-quest-repo)\n\n---\n[![Ably logo](https://static.ably.dev/badge-black.svg?serverless-websockets-quest)](https://ably.com/?utm_source=gitub\u0026utm_medium=repo\u0026utm_campaign=GLB-2207-serverless-websockets-quest\u0026utm_content=repo-serverless-websockets-quest\u0026src=GLB-2207-serverless-websockets-quest-repo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fably-labs%2Fserverless-websockets-quest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fably-labs%2Fserverless-websockets-quest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fably-labs%2Fserverless-websockets-quest/lists"}