{"id":36841423,"url":"https://github.com/lordmoma/intelli-mall","last_synced_at":"2026-01-12T14:29:08.828Z","repository":{"id":193716580,"uuid":"689366164","full_name":"LordMoMA/Intelli-Mall","owner":"LordMoMA","description":"A distributed system that simulates a retail experience coupled with some futuristic shopping robots.","archived":false,"fork":false,"pushed_at":"2025-06-27T16:08:28.000Z","size":3806,"stargazers_count":63,"open_issues_count":0,"forks_count":14,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-26T01:39:05.964Z","etag":null,"topics":["clean-architecture","distributed-systems","docker","docker-compose","event-driven","event-driven-architecture","event-sourcing","golang","graphana","grpc","hexagonal-architecture","jaeger","microservices","observability","opentelemetry","postgresql","production-code","prometheus","rest-api","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/LordMoMA.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,"zenodo":null},"funding":{"github":["LordMoMA"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2023-09-09T15:23:23.000Z","updated_at":"2025-09-29T11:40:16.000Z","dependencies_parsed_at":"2023-12-19T07:14:59.768Z","dependency_job_id":"a65766e7-6b24-44a1-8ddc-a87047bad578","html_url":"https://github.com/LordMoMA/Intelli-Mall","commit_stats":{"total_commits":51,"total_committers":2,"mean_commits":25.5,"dds":"0.13725490196078427","last_synced_commit":"76fafced42ba9536bdb60a7afb2b57e8c1f7407e"},"previous_names":["lordmoma/intelli-mall","50hj/intelli-mall","50hj/retailmatrix"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LordMoMA/Intelli-Mall","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordMoMA%2FIntelli-Mall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordMoMA%2FIntelli-Mall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordMoMA%2FIntelli-Mall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordMoMA%2FIntelli-Mall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LordMoMA","download_url":"https://codeload.github.com/LordMoMA/Intelli-Mall/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordMoMA%2FIntelli-Mall/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"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":["clean-architecture","distributed-systems","docker","docker-compose","event-driven","event-driven-architecture","event-sourcing","golang","graphana","grpc","hexagonal-architecture","jaeger","microservices","observability","opentelemetry","postgresql","production-code","prometheus","rest-api","swagger-ui"],"created_at":"2026-01-12T14:29:08.728Z","updated_at":"2026-01-12T14:29:08.810Z","avatar_url":"https://github.com/LordMoMA.png","language":"Go","funding_links":["https://github.com/sponsors/LordMoMA"],"categories":[],"sub_categories":[],"readme":"# Intelli-Mall: Autonomous Commerce System\n\n## High-level view of the components\n\n![Intelli-Mall Architecture](https://github.com/50HJ/Intelli-Mall/assets/67067729/097cfc9d-8d45-48fc-afda-a052d03eb96a.png)\n\n## [View Tree Structure of IntelliMall](docs/ADL/0003-structure-of-intellimall.md)\n\n## Intelli-Mall AWS Architecture\n\n![Intelli-Mall AWS Architecture](https://github.com/50HJ/Intelli-Mall/assets/67067729/176f52d6-8bf4-4bb4-bdb6-15ea9ef5a836.png)\n\n## How to start the application\n\nStarting the monolith:\n\n```bash\ndocker compose --profile monolith up\n```\n\nStarting the microservices\n\n```bash\ndocker compose --profile microservices up  \n```\n\n\u003e Note: my local machine is Mac M2 ARM64, be sure to locate the docker image with the tag version compatible with your machine architecture.\n\n## How to generate `.pb.go` files for the microservices\n\nlet's take baskets microservice for example, once you have your `.proto` files like `api.proto` and `events.proto` specified in basketspb folder:\n\n```bash\ncd baskets \u0026\u0026 go generate\n```\n\n`buf generate` inside the `generate.go` file will generate based on what is configured in the `buf.gen.yaml` file.\n\n\u003e Note: mockery tool in the Makefile `@go install github.com/vektra/mockery/v2@latest` will generate files starting with `mock_` that contains a mock implementation of the BasketServiceClient interface defined in the basketspb package. The mock implementation allows you to test your code in isolation from the real implementation of the BasketServiceClient interface, making it easier to test and debug your code.\n\nFor more info on using `buf`, please go to [buf tutorial](https://buf.build/docs/tutorials/getting-started-with-buf-cli#clone-the-git-repository)\n\n## Docker Compose with either a monolith or microservices\n\n![Screenshot of Intelli-Mall](https://github.com/50HJ/Intelli-Mall/assets/67067729/dec1b2ff-57a5-4966-80b8-7a1e74ad748f.png)\n\n## Swagger UI\n\n![Screenshot of Intelli-Mall](https://github.com/50HJ/Intelli-Mall/assets/67067729/1e4a4341-4d80-4161-b8a0-cd08b2c7712d.png)\n\n## The monitoring services\n\n![Screenshot of Intelli-Mall](https://github.com/50HJ/Intelli-Mall/assets/67067729/5f0d72d1-eb6a-4ce4-b842-2f6d4bc50744.png)\n\n## Use `/cmd/busywork` to simulate several users making requests to perform several different activities:\n\n```bash\ncd cmd/busywork\ngo run .\n```\n\n### Busywork Output\n\n```bash\n07:55:36.221473 [Client 1] is considering adding new inventory\n07:55:36.687106 [Client 3] is considering registering a new account\n07:55:37.281486 [Client 1] is adding \"Refined Wooden Computer\" for $6.76\n07:55:38.797600 [Client 1] is adding \"Oriental Granite Keyboard\" for $8.81\n07:55:39.115718 [Client 2] is considering registering a new account\n07:55:40.790283 [Client 1] is adding \"Unbranded Steel Chair\" for $8.65\n07:55:40.797666 [Client 1] is done adding new inventory\n07:55:42.595664 [Client 4] is considering adding new inventory\n07:55:43.460873 [Client 4] is adding \"Rustic Rubber Fish\" for $9.26\n07:55:44.069827 [Client 4] is adding \"Licensed Frozen Pants\" for $11.21\n07:55:45.709748 [Client 5] is considering browsing for new things\n07:55:45.721676 [Client 4] is adding \"Practical Metal Towels\" for $6.27\n07:55:45.729938 [Client 4] is done adding new inventory\n07:55:46.598130 [Client 3] is considering adding new inventory\n07:55:47.884613 [Client 5] is browsing the items from \"William Connelly\"\n07:55:48.285565 [Client 3] is adding \"Incredible Granite Chips\" for $10.04\n07:55:49.448966 [Client 3] is adding \"Handmade Bronze Chicken\" for $6.83\n07:55:49.651385 [Client 5] might buy 3 \"Rustic Concrete Pants\" for $7.37 each\n07:55:50.290852 [Client 5] thinks $22.11 is too much\n07:55:50.297213 [Client 5] Quitting time\n07:55:50.394300 [Client 3] is adding \"Intelligent Rubber Shirt\" for $10.36\n07:55:50.400688 [Client 3] is done adding new inventory\n07:55:50.400713 [Client 3] Quitting time\n07:55:50 busywork shutdown\n```\n\nYou can increase the number of clients by passing in the -clients=n flag, with an upper limit of 25.\n\n## The Jaeger UI for tracing\n\nOpen http:// localhost:8081 in your browser to open Jaeger.\n\n![Screenshot of Intelli-Mall](https://github.com/50HJ/Intelli-Mall/assets/67067729/9d1c3d63-da20-46ae-ad69-396fbbb7c350 \"Screenshot of Intelli-Mall\")\n\n## Traces that involved the baskets service\n\n![Screenshot of the Jaeger UI for tracing](https://github.com/50HJ/Intelli-Mall/assets/67067729/8bed563c-b362-425a-8532-b324a8a1ad8b \"Screenshot of the Jaeger UI for tracing\")\n\n## Viewing the monitoring data\n\n![Screenshot of the Jaeger UI for tracing](https://github.com/50HJ/Intelli-Mall/assets/67067729/fe008c04-aca7-4189-a204-3408484e6d02 \"Screenshot of the Jaeger UI for tracing\")\n\nClicking on one of the rows in the graph will provide you with additional details. \n\n## The Prometheus UI\n\nWe also have the metrics to check out in Prometheus at `http://localhost:9090`\n\n![Screenshot of received messages counts for the cosec service](https://github.com/50HJ/Intelli-Mall/assets/67067729/231d151b-cd4c-4978-b2eb-519452832f44 \"Screenshot of received messages counts for the cosec service\")\n\n## Searching for the received messages counts for the cosec service\n\n![Screenshot of received messages counts for the cosec service](https://github.com/50HJ/Intelli-Mall/assets/67067729/790cdfd8-405a-4d66-a79d-ee5670724be0 \"Screenshot of received messages counts for the cosec service\")\n\n## Grafana UI for more compelling intepretation - Intelli Mall App Dashboard\n\nOpening `localhost:3000/` and then browsing for dashboards will show the two dashboards that are installed under the intellimall folder.\n\n![Screenshot of OpenTelemetry Collector dashboard](https://github.com/50HJ/Intelli-Mall/assets/67067729/03e64fbc-6eff-40ee-a89b-9e3d8a13771f \"Screenshot of OpenTelemetry Collector dashboard\")\n\nHow much activity you see in the dashboard will depend on how many clients you have running in the busywork application and the random interactions that the clients are performing.\n\n## OpenTelemetry Collector dashboard\n\n![Screenshot of OpenTelemetry Collector dashboard](https://github.com/50HJ/Intelli-Mall/assets/67067729/7393a06d-de86-4575-b0d6-2359a5deb957 \"Screenshot of OpenTelemetry Collector dashboard\")\n\nDetails about how much work the collector is doing.\n\n## How does Terminal reflect the events:\n\n```bash\ngrafana        | logger=context traceID=00000000000000000000000000000000 userId=0 orgId=1 uname= t=2023-09-20T12:06:26.480212513Z level=info msg=\"Request Completed\" method=POST path=/api/ds/query status=400 remote_addr=172.18.0.1 time_ms=21 duration=21.768709ms size=99 referer=\"http://localhost:3000/d/Pc9ixd4Vk/application?orgId=1\u0026refresh=30s\" traceID=00000000000000000000000000000000\ncollector      | 2023-09-20T12:13:41.244Z       info    TracesExporter  {\"kind\": \"exporter\", \"data_type\": \"traces\", \"name\": \"logging\", \"#spans\": 2}\ngrafana        | logger=live t=2023-09-20T12:18:33.088289544Z level=info msg=\"Initialized channel handler\" channel=grafana/dashboard/uid/BKf2sowmj address=grafana/dashboard/uid/BKf2sowmj\nprometheus     | ts=2023-09-20T13:04:51.975Z caller=compact.go:519 level=info component=tsdb msg=\"write block\" mint=1695204291419 maxt=1695211200000 ulid=01HASB306VTMA1K6NRP5ZCCEQ3 duration=44.237792ms\n```\n\n## Business logic flow\n\n### read after write\n\n![read after write](docs/Diagrams/read_after_write.png)\n\n### transactions\n\n![transactions](docs/Diagrams/transactions.png)\n\n### notification ordering\n\n![notification ordering](docs/Diagrams/notification_ordering.png)\n\n### adding items\n\n![adding items](docs/Diagrams/adding_items.png)\n\n### async pay invoice\n\n![async pay invoice](docs/Diagrams/async_pay_invoice.png)\n\n\n### create order with domain events\n\n![create order with domain events](docs/Diagrams/create_order_with_domain_events.png)\n\n\u003c!-- ### deduplication flow\n\n![deduplication flow](docs/Diagrams/deduplication_flow.png) --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flordmoma%2Fintelli-mall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flordmoma%2Fintelli-mall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flordmoma%2Fintelli-mall/lists"}