{"id":31701646,"url":"https://github.com/arya2004/gobanter","last_synced_at":"2025-10-08T21:06:34.853Z","repository":{"id":317866956,"uuid":"902971137","full_name":"arya2004/gobanter","owner":"arya2004","description":"A lightweight real-time chat application built with Go, using WebSocket","archived":false,"fork":false,"pushed_at":"2025-10-03T13:57:05.000Z","size":41,"stargazers_count":2,"open_issues_count":14,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-03T15:40:07.812Z","etag":null,"topics":["go","golang","hacktoberfest","hacktoberfest-accepted","hacktoberfest-starter","hacktoberfest2025","web-development","websocket"],"latest_commit_sha":null,"homepage":"https://arya2004.hashnode.dev/creating-chat-application-go-gorilla-websocket-jquery","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/arya2004.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-13T16:44:06.000Z","updated_at":"2025-10-03T14:07:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"215eafa9-b442-4872-9018-4de9e8271740","html_url":"https://github.com/arya2004/gobanter","commit_stats":null,"previous_names":["arya2004/gobanter"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/arya2004/gobanter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arya2004%2Fgobanter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arya2004%2Fgobanter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arya2004%2Fgobanter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arya2004%2Fgobanter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arya2004","download_url":"https://codeload.github.com/arya2004/gobanter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arya2004%2Fgobanter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000715,"owners_count":26082837,"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-10-08T02:00:06.501Z","response_time":56,"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","golang","hacktoberfest","hacktoberfest-accepted","hacktoberfest-starter","hacktoberfest2025","web-development","websocket"],"created_at":"2025-10-08T21:06:33.844Z","updated_at":"2025-10-08T21:06:34.847Z","avatar_url":"https://github.com/arya2004.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoBanter 💬\n\nGoBanter is a lightweight, real-time chat application built in Go. It uses Gorilla WebSocket for seamless real-time communication, Pat URL pattern muxer for routing, and jQuery for simple front-end interactions. Perfect for learning or deploying a scalable chat system with minimal overhead.\n\n---\n\n## Features\n- **Real-time Messaging**: Powered by WebSockets for instant communication.\n- **Simple \u0026 Lightweight**: Easy to set up and run with minimal dependencies.\n- **Cross-Device Support**: Accessible from multiple devices simultaneously.\n- **Customizable**: A great foundation to build your chat application.\n\n---\n\n## Getting Started\n\n### Prerequisites\n- [Go](https://golang.org/dl/) (1.16 or higher)\n- Basic understanding of WebSockets and Go development (helpful but not required).\n\n---\n\n### Installation\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/arya2004/gobanter.git\n   cd gobanter\n   ```\n\n2. **Install dependencies**:\n   ```bash\n   go  mod tidy\n   ```\n\n3. **Run the application**:\n   ```bash\n   sh run.sh\n   ```\n\n4. **Access the application**:\n   Open your browser and navigate to `http://localhost:8080`.\n\n---\n\n## Usage\n\n1. Open the application in multiple tabs or devices.\n2. Start typing messages in the chat interface.\n3. Messages will appear in real-time across all connected users.\n\n---\n\n## WebSocket Message Format\n\nGoBanter uses simple JSON messages over the WebSocket. Every message is an object with an \"Action\" field (string) and a \"Payload\" field (object). The server and clients rely on the Action value to determine how to handle the Payload.\n\nSupported action types (common examples)\n- \"username\" — client sets or updates their username.\n- \"broadcast\" — client sends a chat message to be broadcast to all connected users; server forwards broadcast events to clients.\n- \"left\" — server notifies clients that a user disconnected.\n- \"connected\" — server notifies clients that a user connected (or server acknowledges a new connection).\n- Additional actions may be defined (e.g., \"userlist\", \"history\") depending on server extensions.\n\nCommon payload fields\n- Message (string) — the chat text.\n- Username (string) — display name of the sender.\n- Conn (string) — connection identifier assigned by the server (useful to disambiguate users).\n- Time (string, RFC3339) — optional timestamp included by the server.\n- Any other fields are considered extension-specific.\n\nSample JSON messages\n\nClient -\u003e Server (set username)\n```json\n{\n  \"Action\": \"username\",\n  \"Payload\": {\n    \"Username\": \"alice\"\n  }\n}\n```\n\nClient -\u003e Server (send a chat message)\n```json\n{\n  \"Action\": \"broadcast\",\n  \"Payload\": {\n    \"Message\": \"Hello, everyone!\",\n    \"Username\": \"alice\"\n  }\n}\n```\n\nServer -\u003e Clients (broadcast received message)\n```json\n{\n  \"Action\": \"broadcast\",\n  \"Payload\": {\n    \"Message\": \"Hello, everyone!\",\n    \"Username\": \"alice\",\n    \"Conn\": \"conn_abc123\",\n    \"Time\": \"2025-10-06T12:00:00Z\"\n  }\n}\n```\n\nServer -\u003e Clients (user left)\n```json\n{\n  \"Action\": \"left\",\n  \"Payload\": {\n    \"Username\": \"alice\",\n    \"Conn\": \"conn_abc123\"\n  }\n}\n```\n\nNotes\n- Implementations should gracefully ignore unknown Action values to remain forward-compatible.\n- The server may add extra metadata fields in Payload; clients should only process known fields.\n\n---\n\n## Contributing\n\nWe welcome contributions! Whether it's a bug fix, feature addition, or documentation improvement, feel free to open an issue or submit a pull request.\n\n### Steps to Contribute:\n1. Fork the repository.\n2. Create a feature branch (`git checkout -b feature-name`).\n3. Commit your changes (`git commit -m \"Add new feature\"`).\n4. Push to your fork (`git push origin feature-name`).\n5. Open a pull request.\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farya2004%2Fgobanter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farya2004%2Fgobanter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farya2004%2Fgobanter/lists"}