{"id":14987706,"url":"https://github.com/tinkerbaj/chat-websocket-gin","last_synced_at":"2025-04-12T00:17:12.925Z","repository":{"id":41432164,"uuid":"509536966","full_name":"tinkerbaj/chat-websocket-gin","owner":"tinkerbaj","description":"Example of using gorilla websocket with gin (chat with rooms) ","archived":false,"fork":false,"pushed_at":"2023-10-21T06:16:30.000Z","size":15,"stargazers_count":34,"open_issues_count":0,"forks_count":14,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T00:17:07.582Z","etag":null,"topics":["chat","chatroom","gin","gin-framework","gin-gonic","go","golang","real-time","realtime","websocket","websockets"],"latest_commit_sha":null,"homepage":"","language":"Go","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/tinkerbaj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://www.buymeacoffee.com/tinkerbaj"]}},"created_at":"2022-07-01T17:25:56.000Z","updated_at":"2025-02-16T10:41:21.000Z","dependencies_parsed_at":"2024-09-25T00:32:34.321Z","dependency_job_id":null,"html_url":"https://github.com/tinkerbaj/chat-websocket-gin","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"98884891c57fac575e1d321b710e4de3889e20d4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinkerbaj%2Fchat-websocket-gin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinkerbaj%2Fchat-websocket-gin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinkerbaj%2Fchat-websocket-gin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinkerbaj%2Fchat-websocket-gin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinkerbaj","download_url":"https://codeload.github.com/tinkerbaj/chat-websocket-gin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497817,"owners_count":21113984,"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":["chat","chatroom","gin","gin-framework","gin-gonic","go","golang","real-time","realtime","websocket","websockets"],"created_at":"2024-09-24T14:15:14.481Z","updated_at":"2025-04-12T00:17:12.900Z","avatar_url":"https://github.com/tinkerbaj.png","language":"Go","funding_links":["https://www.buymeacoffee.com/tinkerbaj","https://img.buymeacoffee.com/button-api/?text=Buy"],"categories":[],"sub_categories":[],"readme":"# chat-websocket-gin\n\n\u003ca href=\"https://www.buymeacoffee.com/tinkerbaj\"\u003e\u003cimg src=\"https://img.buymeacoffee.com/button-api/?text=Buy me a coffee\u0026emoji=\u0026slug=tinkerbaj\u0026button_colour=5F7FFF\u0026font_colour=ffffff\u0026font_family=Cookie\u0026outline_colour=000000\u0026coffee_colour=FFDD00\" /\u003e\u003c/a\u003e\n  \nExample of using gorilla websocket with gin (chat with rooms)\n\n*   Clone repo\n*   Enter in console \"go mod tidy\" to fetch all packages project need\n*   Enter \"go run main.go\" to start server\n\nWebsocket route will be ws://localhost:8080/ws/ + any name\n\nfor example: ws://localhost:8080/ws/room1\n\nYou can use WebSocket King Client Chrome extension to test it\nIf you use room1 id for example like ws://localhost:8080/ws/room1 \nyou can use this JSON \n```\n{\n\"type\": \"message\",\n\"sender\": \"user1\",\n\"recipient\": \"user2\",\n\"content\": \"How are you\",\n\"id\": \"room1\"\n}\n```\nrun 2 clients on the same URL ws://localhost:8080/ws/room1  and you can use the same JSON just important is to send on the same id in our case room1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinkerbaj%2Fchat-websocket-gin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinkerbaj%2Fchat-websocket-gin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinkerbaj%2Fchat-websocket-gin/lists"}