{"id":14986676,"url":"https://github.com/isutare412/hexago","last_synced_at":"2026-02-23T03:15:04.248Z","repository":{"id":57694515,"uuid":"480026235","full_name":"isutare412/hexago","owner":"isutare412","description":"System architecture PoC tuned for Go.","archived":false,"fork":false,"pushed_at":"2022-05-23T08:17:05.000Z","size":287,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-26T12:26:32.079Z","etag":null,"topics":["architecture","cqrs","dependency-injection","domain-driven-design","event-sourcing","hexagonal-architecture","kafka","microservices","mongodb","openapi-spec","protocol-buffer","swagger-ui"],"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/isutare412.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}},"created_at":"2022-04-10T13:29:29.000Z","updated_at":"2023-11-08T03:14:49.000Z","dependencies_parsed_at":"2022-09-26T21:01:34.220Z","dependency_job_id":null,"html_url":"https://github.com/isutare412/hexago","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isutare412%2Fhexago","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isutare412%2Fhexago/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isutare412%2Fhexago/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isutare412%2Fhexago/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isutare412","download_url":"https://codeload.github.com/isutare412/hexago/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244836081,"owners_count":20518380,"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":["architecture","cqrs","dependency-injection","domain-driven-design","event-sourcing","hexagonal-architecture","kafka","microservices","mongodb","openapi-spec","protocol-buffer","swagger-ui"],"created_at":"2024-09-24T14:13:19.458Z","updated_at":"2025-10-24T10:25:55.267Z","avatar_url":"https://github.com/isutare412.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hexago\n\nSystem architecture PoC tuned for Go. The name Hexago was taken from Hexagonal\nArchitecture.\n\n## Considerations\n\n- [Hexagonal Architecture](https://en.wikipedia.org/wiki/Hexagonal_architecture_(software))\n  + `pkg/controller`: Driving adapters\n  + `pkg/infrastructure`: Driven adapters\n  + `pkg/core`: Business logics\n- [Domain Driven Design](https://en.wikipedia.org/wiki/Domain-driven_design)\n- [Dependency Injection](https://en.wikipedia.org/wiki/Dependency_injection)\n- [CQRS with Event Sourcing](https://docs.microsoft.com/en-us/azure/architecture/patterns/event-sourcing)\n- [Go Standard Layout](https://github.com/golang-standards/project-layout)\n\n## Overview\n\n![Hexago CQRS diagram](assets/hexago-cqrs.drawio.png?raw=true)\n\n## Modules\n\n### [Hexago Gateway](./gateway)\n\nAPI gateway module for hexago service.\n\n### [Hexago Payment](./payment)\n\nPayment module for hexago service.\n\n### [Hexago Common](./common)\n\nIncludes common libraries of hexago modules.\n\n## Infrastructure\n\n1. Run infrastructures using docker compose.\n\n```bash\nmake infra\n# 1) up\n# 2) down\n# 3) ps\n# 4) logs\n# 5) quit\n# Please enter your choice: 1\n```\n\n2. Add local dns to each insfrastructure for local development. Optional for\ndocker environment.\n\n```bash\nsudo tee -a /etc/hosts \u003e /dev/null \u003c\u003cEOT\n127.0.0.1 mongodb\n127.0.0.1 kafka1\n127.0.0.1 kafka2\nEOT\n```\n\n3. Create kafka topics using [kafka-ui](http://localhost:58080).\n    - `donation-request`\n\n## Test Drive\n\n1. Prepare infrastructures [above](#infrastructure).\n\n2. Build hexago modules.\n\n```bash\nmake image-gateway\nmake image-payment\n```\n\n3. Run hexago modules.\n\n```bash\nmake run-gateway\nmake run-payment\n```\n\n4. Test scenarios.\n   - [Swagger UI](http://localhost:8080/swagger/index.html)\n   - [Detailed scenarios](./scenarios/)\n\n5. Stop hexago modules.\n\n```bash\nmake stop-gateway\nmake stop-payment\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisutare412%2Fhexago","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisutare412%2Fhexago","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisutare412%2Fhexago/lists"}