{"id":21030110,"url":"https://github.com/thesaltree/redis-chat-app","last_synced_at":"2026-05-18T19:47:24.834Z","repository":{"id":262413224,"uuid":"887156609","full_name":"thesaltree/redis-chat-app","owner":"thesaltree","description":"Building a Real-Time Chat App in Go with Redis Pub/Sub and WebSockets","archived":false,"fork":false,"pushed_at":"2024-11-12T09:28:42.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T19:24:37.206Z","etag":null,"topics":["go-redis","golang","pub-sub","real-time-chat","redis","websocket"],"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/thesaltree.png","metadata":{"files":{"readme":"README.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-11-12T09:10:01.000Z","updated_at":"2024-11-12T09:29:43.000Z","dependencies_parsed_at":"2024-11-12T10:34:41.861Z","dependency_job_id":null,"html_url":"https://github.com/thesaltree/redis-chat-app","commit_stats":null,"previous_names":["thesaltree/redis-chat-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thesaltree/redis-chat-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesaltree%2Fredis-chat-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesaltree%2Fredis-chat-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesaltree%2Fredis-chat-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesaltree%2Fredis-chat-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thesaltree","download_url":"https://codeload.github.com/thesaltree/redis-chat-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesaltree%2Fredis-chat-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269201689,"owners_count":24377556,"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","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["go-redis","golang","pub-sub","real-time-chat","redis","websocket"],"created_at":"2024-11-19T12:16:12.905Z","updated_at":"2026-05-18T19:47:19.808Z","avatar_url":"https://github.com/thesaltree.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redis Pub/Sub Chat Application\n\nThis is a simple real-time chat application built with Go, WebSockets, and Redis Pub/Sub. Users can join the chat by connecting to the WebSocket server and will receive messages from other users in real-time.\n\n## Features\n\n- **Real-Time Communication**: Messages are sent and received instantly using WebSockets.\n- **Redis Pub/Sub**: Used to broadcast messages to all connected users efficiently.\n- **Graceful Shutdown**: Ensures all connections are closed properly when the server shuts down.\n\n## Prerequisites\n\n- [Go](https://golang.org/dl/) (version 1.16 or later)\n- [Redis](https://redis.io/download) server (running on `localhost:6379` by default)\n\n## Getting Started\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/yourusername/redis-chat-app.git\ncd redis-chat-app\n```\n### 2. Install Dependencies\nThis application uses the github.com/go-redis/redis/v8 and github.com/gorilla/websocket packages. You can install them with:\n\n```bash\ngo get github.com/go-redis/redis/v8\ngo get github.com/gorilla/websocket\n```\n\n### 3. Configure Redis\nEnsure your Redis server is running on `localhost:6379`. If it's hosted elsewhere, update the `redisAddr` constant in the code to reflect the correct address.\n\n### 4. Run the Application\nStart the server by running:\n\n```bash\ngo run main.go\n```\n\nThe server will start on http://localhost:8081.\n\n### 5. Connect to the Chat\nTo join the chat, open multiple browser tabs (or WebSocket clients) and connect to:\n\n```bash\nws://localhost:8081/chat/username\n```\n\nReplace username with a unique name for each user. Messages sent by one user will be received by all other connected users.\n\n## Reference Screenshots\n\nInitiate chat\n\n\u003cimg width=\"940\" alt=\"Initiate chat\" src=\"https://github.com/user-attachments/assets/d1c87c4c-2ed3-4147-9770-60707484a3bf\"\u003e\n\n\nUser 1\n\n\u003cimg width=\"957\" alt=\"user1\" src=\"https://github.com/user-attachments/assets/175fdf68-6df5-4b1d-885f-ab4b1f170db8\"\u003e\n\n\nUser 2\n\n\u003cimg width=\"954\" alt=\"user2\" src=\"https://github.com/user-attachments/assets/e9aafc9e-0e89-4600-9bbf-650f82c9b5a9\"\u003e\n\n\nUser 3\n\n\u003cimg width=\"956\" alt=\"user3\" src=\"https://github.com/user-attachments/assets/9c7a05ea-6af5-46b0-b2c9-d1e783a26923\"\u003e\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesaltree%2Fredis-chat-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesaltree%2Fredis-chat-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesaltree%2Fredis-chat-app/lists"}