{"id":20415783,"url":"https://github.com/rbkgh/eventdrivenstockprocessor","last_synced_at":"2025-09-01T17:42:46.412Z","repository":{"id":245228809,"uuid":"817625886","full_name":"RbkGh/EventDrivenStockProcessor","owner":"RbkGh","description":"Event Driven Stock Processor","archived":false,"fork":false,"pushed_at":"2024-06-26T13:35:48.000Z","size":1652,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-15T06:17:30.456Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RbkGh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","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":"2024-06-20T06:01:00.000Z","updated_at":"2024-10-15T18:07:53.000Z","dependencies_parsed_at":"2024-06-26T14:30:23.589Z","dependency_job_id":"f1b9db24-2784-4773-a13e-876593ab8e33","html_url":"https://github.com/RbkGh/EventDrivenStockProcessor","commit_stats":null,"previous_names":["rbkgh/eventdrivenstockprocessor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RbkGh%2FEventDrivenStockProcessor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RbkGh%2FEventDrivenStockProcessor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RbkGh%2FEventDrivenStockProcessor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RbkGh%2FEventDrivenStockProcessor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RbkGh","download_url":"https://codeload.github.com/RbkGh/EventDrivenStockProcessor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234044945,"owners_count":18770883,"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":[],"created_at":"2024-11-15T06:17:33.312Z","updated_at":"2025-01-15T13:22:53.965Z","avatar_url":"https://github.com/RbkGh.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stock Processor Service\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\n## Requirements\n```textmate\n1. Java 17+\n\"java --version\" on the command line must return a version 17 java like:\nopenjdk 17.0.9 2023-10-17\nOpenJDK Runtime Environment Homebrew (build 17.0.9+0)\nOpenJDK 64-Bit Server VM Homebrew (build 17.0.9+0, mixed mode, sharing)\n\n\n```\n\n## Overview \n```textmate\nThere are two main modules \ni.  product-service\n- when a product is created, the server responds with 201 and adds the location of the resource in the \"Location\" header of the response\n- if product exists, it returns conflicted httpstatus\nii. event-update-listener\n\n- product-service starts a web service with exposed api's for product manipulation,saves to postgres.\n- product-service also serves as the kafka producer that publishes any change in product to a kafka topic\n- when an http request comes to create a product, immediately the product is successfully created, \na product payload is published to \"product.created\" topic, when an update http request comes in, a payload is published to \"product.updated\" topic,\nwhen a delete http request comes in, product deleted is published to \"product.deleted\"\n\n\n- event-update-listener is a subscriber to the topics that are published by product service and it also stores the information in mongodb. \n```\n\n## Run all services: \n1.\n\n\u003e rename \".example.env\" file to \".env\" [this loads the values into docker]\n\n2.\n```shell\ndocker-compose build\n````\n3.\n```shell\ndocker-compose up\n````\n\n\u003e\u003e\u003e this above starts kafka and zookeper, starts two services(product-service and event-update-listener) and starts two databases, mongo_db and postgres_db\n\n![](https://github.com/RbkGh/EventDrivenStockProcessor/blob/main/photos/img_docker.png)\n\n\u003e [[/product-service-http-requests.postman_collection.json]](./product-service-http-requests.postman_collection.json) contains all CRUD http requests to use in PostMan\n\n![](https://github.com/RbkGh/EventDrivenStockProcessor/blob/main/photos/postman.png)\n\n\u003e Swagger URL : [![http://localhost:8080/swagger-ui/index.html](https://img.shields.io/badge/swagger_url-000?style=for-the-badge\u0026logo=ko-fi\u0026logoColor=white)](http://localhost:8080/swagger-ui/index.html)\n\n\u003e Kafka-UI to view kafka updates as changes happen in real-time http://localhost:8090/\n\n\u003e CI/CD : Jenkinsfile is placed in product-service to deploy to heroku\n\n\n## Run Tests- Navigate into /product-service and run:\n```shell\n./mvnw clean\n```\n```shell\n./mvnw test\n```\n\u003e\u003e\u003e this runs integration and unit tests with 100% class coverage using testcontainer for integration and mocks for unit service tests\n\n![](https://github.com/RbkGh/EventDrivenStockProcessor/blob/main/photos/test_cov.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbkgh%2Feventdrivenstockprocessor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbkgh%2Feventdrivenstockprocessor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbkgh%2Feventdrivenstockprocessor/lists"}