{"id":17640572,"url":"https://github.com/tm9657/generic-socket-rooms","last_synced_at":"2025-07-26T19:12:02.624Z","repository":{"id":196240891,"uuid":"695477777","full_name":"TM9657/generic-socket-rooms","owner":"TM9657","description":"Generic, scalable websocket server that should support most use-cases. We are using Elixir / Phoenix to use the language specific features and mitigate the use for Redis adapters (KISS) for scaling across multiple instances.","archived":false,"fork":false,"pushed_at":"2023-10-01T17:50:42.000Z","size":511,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-04T04:32:48.422Z","etag":null,"topics":["autoscaling","elixir","flyio","generic","phoenix","websocket-server"],"latest_commit_sha":null,"homepage":"https://tm9657.de","language":"TypeScript","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/TM9657.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2023-09-23T10:01:17.000Z","updated_at":"2024-01-25T09:38:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"2f337d90-fc25-4589-b36c-e733c0c4290d","html_url":"https://github.com/TM9657/generic-socket-rooms","commit_stats":null,"previous_names":["tm9657/generic-socket-rooms"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TM9657%2Fgeneric-socket-rooms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TM9657%2Fgeneric-socket-rooms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TM9657%2Fgeneric-socket-rooms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TM9657%2Fgeneric-socket-rooms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TM9657","download_url":"https://codeload.github.com/TM9657/generic-socket-rooms/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252762401,"owners_count":21800300,"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":["autoscaling","elixir","flyio","generic","phoenix","websocket-server"],"created_at":"2024-10-23T06:03:54.928Z","updated_at":"2025-05-06T20:23:45.729Z","avatar_url":"https://github.com/TM9657.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://tm9657.de?ref=github\"\u003e\u003cp align=\"center\"\u003e\u003cimg width=250 src=\"https://cdn.tm9657.de/tm9657/images/generic_socket_rooms.png\" /\u003e\u003c/p\u003e\u003c/a\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://tm9657.de\"\u003e\u003cimg src=\"https://img.shields.io/badge/website-more_from_us-C0222C.svg?style=flat\u0026logo=PWA\"\u003e \u003c/a\u003e\n\t  \u003ca href=\"https://discord.ca9.io\"\u003e\u003cimg src=\"https://img.shields.io/discord/673169081704120334?label=discord\u0026style=flat\u0026color=5a66f6\u0026logo=Discord\"\u003e\u003c/a\u003e\n\t  \u003ca href=\"https://twitter.com/tm9657\"\u003e\u003cimg src=\"https://img.shields.io/badge/twitter-follow_us-1d9bf0.svg?style=flat\u0026logo=Twitter\"\u003e\u003c/a\u003e\n\t  \u003ca href=\"https://www.linkedin.com/company/tm9657/\"\u003e\u003cimg src=\"https://img.shields.io/badge/linkedin-connect-0a66c2.svg?style=flat\u0026logo=Linkedin\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://merch.ca9.io\"\u003e\u003cimg src=\"https://img.shields.io/badge/merch-support_us-red.svg?style=flat\u0026logo=Spreadshirt\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Generic Socket Rooms\nGeneric, scalable websocket server that should support most use-cases. It comes with a client library that can be installed via\n\n`npm install @tm9657/socket-client`\n\nWe are using Elixir / Phoenix to use the language specific features and mitigate the use for Redis adapters (KISS) for scaling across multiple instances.\n\nAccess to rooms is managed via JWT. The server is able to return signed JWT based on your API-Key. However you can also use our [JWK Store](https://github.com/TM9657/jwk-store) (serverless) to implement rolling keys or sign the tokens in other services.\n\nThe token should have the following claims:\n```\n{\n  \"sub\": \"user id\",\n  \"room_name\": \"the room this token gives access to\",\n  \"type\": \"room | signaling\"\n}\n```\n\nGenerally the following rooms are possible: `room:*`, `pm:\u003csub\u003e` and `signaling:*`\n\n### API\n```\n\u003e GET \"/v1/api/jwk\" - returns the current public key (remove this if you use symmetric keys)\n```\n```\n\u003e POST \"/v1/api/auth/jwk_sign\" - signs a new JWT that is valid for 30 days (REQUIRES API-KEY)\n\nbody: {\n\t\"room_name\": \"room id (without prefix room or signaling)\",\n\t\"sub\": \"\u003cuser-id\u003e\",\n\t\"type\": \"room|signaling\"\n}\n```\n\n```\n\u003e GET \"/v1/api/verify\" checks the auth header token for validity\n```\n\n### Development Server:\n\n  * Run `mix setup` to install and setup dependencies\n  * Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server`\n\nNow you can visit [`localhost:4000`](http://localhost:4000) from your browser.\n\n### Deploy to Fly\nTo deploy to fly use the following commands:\n1. `bun run fly`\n2. adjust your newly created `fly.toml`\n3. `bun run deploy`\n\n---\n**Provided by TM9657 GmbH with ❤️**\n### Check out some of our products:\n- [Kwirk.io](https://kwirk.io?ref=github) (Text Editor with AI integration, privacy focus and offline support)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftm9657%2Fgeneric-socket-rooms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftm9657%2Fgeneric-socket-rooms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftm9657%2Fgeneric-socket-rooms/lists"}