{"id":24987500,"url":"https://github.com/ivan-montes/hexagonal-cqrs-proof","last_synced_at":"2026-04-14T14:32:26.482Z","repository":{"id":236452001,"uuid":"792638138","full_name":"Ivan-Montes/hexagonal-cqrs-proof","owner":"Ivan-Montes","description":"Multimodule Maven project with Hexagonal Architecture, CQRS, and Kafka for synchronizing databases","archived":false,"fork":false,"pushed_at":"2024-10-22T10:59:57.000Z","size":209,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T11:16:26.591Z","etag":null,"topics":["cqrs","docker","docker-compose","hexagonal-architecture","java","kafka","kafka-ui","maven","redis","sonarqube","spring","swagger"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ivan-Montes.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-27T06:16:13.000Z","updated_at":"2024-10-22T11:00:01.000Z","dependencies_parsed_at":"2024-06-02T07:26:59.386Z","dependency_job_id":"29babe57-377e-4fbf-9677-231aee0af492","html_url":"https://github.com/Ivan-Montes/hexagonal-cqrs-proof","commit_stats":null,"previous_names":["ivan-montes/hexagonal-cqrs-proof"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ivan-Montes/hexagonal-cqrs-proof","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ivan-Montes%2Fhexagonal-cqrs-proof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ivan-Montes%2Fhexagonal-cqrs-proof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ivan-Montes%2Fhexagonal-cqrs-proof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ivan-Montes%2Fhexagonal-cqrs-proof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ivan-Montes","download_url":"https://codeload.github.com/Ivan-Montes/hexagonal-cqrs-proof/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ivan-Montes%2Fhexagonal-cqrs-proof/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31801322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["cqrs","docker","docker-compose","hexagonal-architecture","java","kafka","kafka-ui","maven","redis","sonarqube","spring","swagger"],"created_at":"2025-02-04T11:47:54.101Z","updated_at":"2026-04-14T14:32:26.457Z","avatar_url":"https://github.com/Ivan-Montes.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hexagonal-cqrs-proof\n\nMultimodule Maven project with Hexagonal Architecture, CQRS, and Kafka for synchronizing databases\n\n**Components**\n- [Kafka](https://kafka.apache.org/) [9092] + [9093] \n- [Kafka-UI](https://docs.kafka-ui.provectus.io/) [8080]\n- REST API ms-artist with [OpenApi Swagger](https://swagger.io/) and two separate DB for R/RW actions [8081]\n- REST API ms-media with [OpenApi Swagger](https://swagger.io/) and two separate DB for R/RW actions [8082]\n- [Redis](https://redis.io/) DB in every microservice work as caches to store ID references for other REST APIs\n\n```mermaid\ngraph RL\n\nsubgraph ms-artist\n  direction LR\n  subgraph ms-artist-ms\n   A{{ms-artist}}\n  end\n  subgraph ms-artist-db\n  direction LR\n   A1[(NoSql Read Db)]\n   A2[(Sql Write Db)]\n   A3[(Redis Backup Db)]\n   end\nend\n\n  Kafka(((Kafka)))\n  KafkaUI(KafkaUI)\n\nsubgraph ms-media\n  direction RL\n  subgraph ms-media-ms\n   B{{ms-media}}\n  end\n  subgraph ms-media-db\n  direction RL\n   B1[(NoSql Read Db)]\n   B2[(Sql Write Db)]\n   B3[(Redis Backup Db)] \n  end\nend  \n  \n  ms-media-db \u003c--\u003e ms-media-ms\n  ms-artist-db \u003c--\u003e ms-artist-ms\n  ms-artist --\u003e|Publish| Kafka\n  Kafka --\u003e|Subscriber| ms-artist\n  ms-media --\u003e|Publish| Kafka\n  Kafka --\u003e|Subscriber| ms-media\n  KafkaUI \u003c--\u003e Kafka\n  B1 \u003c-.SYNCHRO.-\u003e B2\n  A1 \u003c-.SYNCHRO.-\u003e A2\n```\n\n## Table of contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [It's not a bug, it's a feature](#features)\n- [Maintainers](#maintainers)\n- [License](#license)\n\n\n## Installation\n\n1. First of all clone or download the project.\n\n1. Inside the main folder, you could find two docker-compose yaml files.\n\n1. From there use the command line to start the project in dev or production mode\n\n```\n    **Generate .jar**\n    mvn clean package\n    \n    **Developer mode**  \n    docker-compose -f docker-compose-dev.yml up -d\n\n    **Production mode**\n    docker-compose -f docker-compose-prod.yml up -d\n```\n      \nThe dev environment is ready for using with your IDE. The microservice attempts to communicate with Kafka using the local host. In production, it uses the archive Dockerfile to build an image of the project, so you wont need the IDE.\n   \n4. You could stop the project and free resources with any of these orders\n\n```\n    **Developer mode**\n    docker-compose -f docker-compose-dev.yml down --rmi local -v\n      \n    **Production mode**\n    docker-compose -f docker-compose-prod.yml down --rmi local -v  \n```\n   \n## Usage\n\nFirst of all, please visit the REST API documentation. Replace ${port} for the suitable microservice port:\n\n    http://localhost:${port}/swagger-ui/index.html\n    \n[Kafka-UI](https://docs.kafka-ui.provectus.io/) allow you to check your [Kafka](https://kafka.apache.org/) server using a practical dashboard, so visit the following url:\n\n    http://localhost:8080\n    \n\n## Features\n\n#### :white_check_mark: Unit testing for business logic classes\n\n#### :white_check_mark: Include two docker-compose yaml files for easy change of environment\n\n#### :white_check_mark: Hexagonal Architecture following Clean Architecture principle\n\n#### :white_check_mark: CQRS pattern with independent databases for Read or RW actions\n\n#### :white_check_mark: DB synchronization by Publisher-Subscriber pattern\n\n#### :white_check_mark: Redis DB in every microservice work as caches to store ID references for other REST APIs\n\n\n## Maintainers\n\nJust me, [Iván](https://github.com/Ivan-Montes) :sweat_smile:\n\n\n## License\n\n[GPLv3 license](https://choosealicense.com/licenses/gpl-3.0/)\n\n\n---\n\n\n[![Java](https://badgen.net/static/JavaSE/17/orange)](https://www.java.com/es/)\n[![Maven](https://badgen.net/badge/icon/maven?icon=maven\u0026label\u0026color=red)](https://https://maven.apache.org/)\n[![Spring](https://img.shields.io/badge/spring-blue?logo=Spring\u0026logoColor=white)](https://spring.io)\n[![GitHub](https://badgen.net/badge/icon/github?icon=github\u0026label)](https://github.com)\n[![Eclipse](https://badgen.net/badge/icon/eclipse?icon=eclipse\u0026label)](https://https://eclipse.org/)\n[![SonarQube](https://badgen.net/badge/icon/sonarqube?icon=sonarqube\u0026label\u0026color=purple)](https://www.sonarsource.com/products/sonarqube/downloads/)\n[![Docker](https://badgen.net/badge/icon/docker?icon=docker\u0026label)](https://www.docker.com/)\n[![Kafka](https://badgen.net/static/Apache/Kafka/cyan)](https://kafka.apache.org/)\n[![GPLv3 license](https://badgen.net/static/License/GPLv3/blue)](https://choosealicense.com/licenses/gpl-3.0/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivan-montes%2Fhexagonal-cqrs-proof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivan-montes%2Fhexagonal-cqrs-proof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivan-montes%2Fhexagonal-cqrs-proof/lists"}