{"id":19403800,"url":"https://github.com/joeltadeu/bank-account","last_synced_at":"2025-04-14T07:41:38.867Z","repository":{"id":180220260,"uuid":"448660656","full_name":"joeltadeu/bank-account","owner":"joeltadeu","description":"An example with microservice architecture using CQRS, Event Sourcing and Kafka","archived":false,"fork":false,"pushed_at":"2022-01-17T18:20:57.000Z","size":182,"stargazers_count":6,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T21:22:02.711Z","etag":null,"topics":["crqs","docker","docker-compose","kafka","microservice","mongodb","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","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/joeltadeu.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":"2022-01-16T20:06:23.000Z","updated_at":"2024-04-01T02:47:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"5de34c7f-4295-4bca-aade-df5298c9eacf","html_url":"https://github.com/joeltadeu/bank-account","commit_stats":null,"previous_names":["joeltadeu/bank-account"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeltadeu%2Fbank-account","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeltadeu%2Fbank-account/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeltadeu%2Fbank-account/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeltadeu%2Fbank-account/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeltadeu","download_url":"https://codeload.github.com/joeltadeu/bank-account/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248841871,"owners_count":21170257,"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":["crqs","docker","docker-compose","kafka","microservice","mongodb","spring-boot"],"created_at":"2024-11-10T11:30:33.414Z","updated_at":"2025-04-14T07:41:38.832Z","avatar_url":"https://github.com/joeltadeu.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bank account using CQRS, Event Sourcing, Kafka\n\nLearn to build distributed Event-driven Microservices, CQRS, Event Sourcing using Kafka, MySQL and MongoDB\n\n## Architecture:\n![Alt text](assets/bank-account-architecture.svg?raw=true \"Bank Account Architecture\")\n\n\n## There are two microservices:\n\n- **Account Query** : This microservice is responsible for read information about the accounts using the read database.\n- **Account Command** : This microservice is responsible for managing accounts. A user can open an account, deposit funds and withdraw funds.\n\n### Concepts used ###\n- Event-Driven Microservices\n- CQRS Design Pattern\n- Event Based Messages\n- Kafka\n- NoSQL database with MongoDB\n\n### EndPoints ###\n\n| Service         | EndPoint                            | Method | Description           |\n|-----------------|-------------------------------------|:------:|-----------------------|\n| Account Command | /api/v1/accounts                    |  POST  | Open an account       |\n| Account Command | /api/v1/accounts/{id}/deposit       |  PUT   | Deposit funds         |\n| Account Command | /api/v1/accounts/{id}/withdraw      |  PUT   | Withdraw funds        |\n| Account Command | /api/v1/accounts/{id}               | DELETE | Close an account      |\n| Account Command | /api/v1/operations/database/restore |  POST  | Restore read database |\n| Account Query   | /api/v1/accounts                    |  GET   | List of accounts      |\n| Account Query   | /api/v1/accounts/{id}               |  GET   | LIst of accounts      |\n\n### Documentation and examples ###\n\n###Postman collection\n\n![Alt text](assets/postman-collection-folder.png?raw=true \"Postman collection folder\")\n\n## Build \u0026 Run\n\n- *\u003emvn clean package* : to build\n- *\u003edocker-compose up* --build : build docker images and containers and run containers\n- *\u003edocker-compose stop* : stop the dockerized services\n- Each maven module has a Dockerfile.\n\nIn docker-compose.yml file:\n\n- Account Command : **__5000__** port is mapped to **__5000__** port of host\n- Account Query : **__5001__** port is mapped to **__5001__** port of host\n\n### Resources\n\nProject is based on the course:\nhttps://www.udemy.com/course/java-microservices-cqrs-event-sourcing-with-kafka/\n\n## VERSIONS\n\n### 1.0.0\n\n- MongoDB\n- MySQL\n- Spring-Boot 2.6.2.RELEASE\n- Java 16","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeltadeu%2Fbank-account","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeltadeu%2Fbank-account","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeltadeu%2Fbank-account/lists"}