{"id":20694714,"url":"https://github.com/samy-soliman/go-next-ts-chat","last_synced_at":"2026-04-02T04:45:47.821Z","repository":{"id":215359987,"uuid":"738678784","full_name":"samy-soliman/go-next-ts-chat","owner":"samy-soliman","description":"Deploying a Realtime chat built with Go, Next \u0026 Typescript using GitHub Actions | Docker-Compose | Kubernets | Prometheus | Grafana | Terraform","archived":false,"fork":false,"pushed_at":"2024-03-11T23:28:58.000Z","size":36835,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T02:32:26.838Z","etag":null,"topics":["devops","docker","docker-compose","github-actions","gke","golang","googlecloud","grafana","kubernetes","nextjs","postgresql","prometheus","terraform"],"latest_commit_sha":null,"homepage":"","language":"Go","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/samy-soliman.png","metadata":{"files":{"readme":"ReadME/Development.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":"2024-01-03T19:39:35.000Z","updated_at":"2024-07-25T16:08:15.000Z","dependencies_parsed_at":"2024-01-10T22:43:52.917Z","dependency_job_id":"8d4d045d-c3dc-430c-8b84-c30650d38fff","html_url":"https://github.com/samy-soliman/go-next-ts-chat","commit_stats":null,"previous_names":["samy-soliman/go-next-ts-chat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samy-soliman/go-next-ts-chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samy-soliman%2Fgo-next-ts-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samy-soliman%2Fgo-next-ts-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samy-soliman%2Fgo-next-ts-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samy-soliman%2Fgo-next-ts-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samy-soliman","download_url":"https://codeload.github.com/samy-soliman/go-next-ts-chat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samy-soliman%2Fgo-next-ts-chat/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259802162,"owners_count":22913578,"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":["devops","docker","docker-compose","github-actions","gke","golang","googlecloud","grafana","kubernetes","nextjs","postgresql","prometheus","terraform"],"created_at":"2024-11-17T00:06:09.551Z","updated_at":"2025-12-30T19:51:20.496Z","avatar_url":"https://github.com/samy-soliman.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Development\n\n## Hub Architecture\n\n![Initial Hub Architecture](/assets/hub_initial.jpg)\n\nFirst, we have the hub running on a separate goroutine, which is the central place that manages different channels and contains a map of rooms. The hub has a Register and an Unregister channel to register/unregister clients, and a Broadcast channel that receives a message and broadcasts it out to all the other clients in the same room.\n\n![Client joins room](/assets/join_room.jpg)\n\nA room is initially empty. Only when a client hits the `/ws/joinRoom` endpoint, that will create a new client object in the room and it will be registered through the hub's Register channel.\n\n![Hub Architecture](/assets/hub_architecture.jpg)\n\nEach client has a `writeMessage` and a `readMessage` method. `readMessage` reads the message through the client's websocket connection and sends the message to the Broadcast channel in the hub, which will then broadcast the message out to every client in the same room. The `writeMessage` method in each of those clients will write the message to its websocket connection, which will be handled on the frontend side to display the messages accordingly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamy-soliman%2Fgo-next-ts-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamy-soliman%2Fgo-next-ts-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamy-soliman%2Fgo-next-ts-chat/lists"}