{"id":37112360,"url":"https://github.com/posilva/simplechat","last_synced_at":"2026-01-14T13:17:40.780Z","repository":{"id":162969178,"uuid":"636601925","full_name":"posilva/simplechat","owner":"posilva","description":"Simple Chat service using Hexagonal Architecture with Go","archived":false,"fork":false,"pushed_at":"2023-05-31T07:57:22.000Z","size":158,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-21T14:18:22.222Z","etag":null,"topics":["aws","chat","experiment","golang","hexagonal-architecture","localstack","mq"],"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/posilva.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":"2023-05-05T08:13:32.000Z","updated_at":"2024-06-01T10:35:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"e937dcbd-a74e-4c26-b5a6-771f213ce11b","html_url":"https://github.com/posilva/simplechat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/posilva/simplechat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posilva%2Fsimplechat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posilva%2Fsimplechat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posilva%2Fsimplechat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posilva%2Fsimplechat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posilva","download_url":"https://codeload.github.com/posilva/simplechat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posilva%2Fsimplechat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aws","chat","experiment","golang","hexagonal-architecture","localstack","mq"],"created_at":"2026-01-14T13:17:40.191Z","updated_at":"2026-01-14T13:17:40.773Z","avatar_url":"https://github.com/posilva.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Chat\nSimple Chat service using Hexagonal Architecture with Go\n\n---\n\n\n## How to run \n\n- Install [Golang](https://go.dev/)\n- Install [tflocal](https://github.com/localstack/terraform-local)\n- Install [Docker](https://www.docker.com/products/docker-desktop/) or [Podman](https://podman.io/)\n- Install Docker [Compose](https://github.com/docker/compose)\n- Install [AWS CLI](https://aws.amazon.com/cli/)\n- Install [GolangCI Linter](https://golangci-lint.run/usage/install/)\n- Install [gomock](https://thedevelopercafe.com/articles/mocking-interfaces-in-go-with-gomock-670b1a640b00) \n\n\n## Use Makefile targets\n\nShort version if you have all the tools installed and configured (never happens :) )\n(it will start a local web page http://localhost:8081 that you can connect to play with chat)\n\n`make setup`\n\nCreate containers to run the service with docker compose\n\n`make infra-up`\n\nRun local infra setup - executes terraform code against [LocalStack](https://github.com/localstack/localstack)\n\n`make infra-local` #\n\nExecutes tests and creates coverage report against local infra\n\n`make cover`\n\n--- \n# Architecture \n\n\n- Handler: http with WebSocket\n- Repository: DynamoDB\n- Notifier: RabbitMQ\n- Moderator: Ignore (just passthrough the message, no moderation done)\n\n\n```mermaid\nsequenceDiagram \n    title: Connect Flow\n    Client --\u003e\u003e WebSocket: Connect(uID, roomID)\n    WebSocket --\u003e\u003e ChatService: Register(uID, roomID)\n    ChatService --\u003e\u003e Notifier: Register(uID, roomID, receiver)\n    Notifier -\u003e\u003e ChatService: Registered \n    ChatService --\u003e WebSocket: Registered\n    WebSocket -\u003e Client: Connected \n\n```\n\n\n```mermaid\nsequenceDiagram \n    title: Send Message Flow\n    Client --\u003e\u003e WebSocket: Send(message, roomID)\n    WebSocket --\u003e\u003e ChatService: Send(message, roomID)    \n    ChatService --\u003e\u003e Moderator: Check(message)\n    Moderator -\u003e\u003e ChatService: ModeratedMessage\n    ChatService --\u003e\u003e Repository: Store(ModeratedMessage)\n    Repository -\u003e\u003e ChatService: ModeratedMessageStored\n    ChatService --\u003e\u003e Notifier: Broadcast(ModeratedMessage, GroupId)\n    Notifier -\u003e\u003e ChatService: Sent OK\n    ChatService -\u003e\u003e WebSocket: Sent\n    WebSocket -\u003e\u003e Client: Sent\n```\n\n--- \n\n\n# TODO\n \n- [x] Implement a Presence component that embeds the notification system\n- [x] Integrate a mock framework (gomock)\n- [x] Add logging \n- [x] Integrate Golang Linters\n- [x] Implement WebSocket Handler \n- [x] Add Grafana, Prometheus to Docker Compose\n- [ ] Separated UnitTest from Integration Tests (with local infra)\n- [ ] Improve tests that cover errors\n- [ ] Add CICD with Github Actions\n- [ ] Add Configuration (Consul, Vault)\n- [ ] Add metricts \n- [ ] Add rate limiting\n- [ ] Add Load Tests Local\n- [ ] Add Load Tests Cloud \n- [ ] Add deployment on ECS \n- [ ] Add deployment on K8S\n- [ ] Add deployment on Nomad\n- [ ] Explore coverage report in Github [https://github.com/johejo/go-cover-view]\n\n\n# FIX\n\n- [ ] - Remove dependency of AWS CLI by running in a container\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposilva%2Fsimplechat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposilva%2Fsimplechat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposilva%2Fsimplechat/lists"}