{"id":18772916,"url":"https://github.com/jcalopes/sales-project","last_synced_at":"2026-04-02T18:53:32.136Z","repository":{"id":159231621,"uuid":"524250348","full_name":"jcalopes/sales-project","owner":"jcalopes","description":"Spring boot microservice-based application. Project under construction.","archived":false,"fork":false,"pushed_at":"2023-10-01T16:18:49.000Z","size":241,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-21T01:38:15.627Z","etag":null,"topics":["api-gateway","discovery-service","docker-compose","grafana","integration-testing","kafka","kubernetes","microservice","microservices","microservices-architecture","prometheus","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/jcalopes.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-08-12T23:36:16.000Z","updated_at":"2023-10-01T16:19:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"ebcc06cd-ed21-4901-a8ce-2ff90887f985","html_url":"https://github.com/jcalopes/sales-project","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jcalopes/sales-project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcalopes%2Fsales-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcalopes%2Fsales-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcalopes%2Fsales-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcalopes%2Fsales-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcalopes","download_url":"https://codeload.github.com/jcalopes/sales-project/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcalopes%2Fsales-project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28133791,"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","status":"online","status_checked_at":"2025-12-30T02:00:05.476Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api-gateway","discovery-service","docker-compose","grafana","integration-testing","kafka","kubernetes","microservice","microservices","microservices-architecture","prometheus","spring-boot"],"created_at":"2024-11-07T19:31:40.884Z","updated_at":"2025-12-30T23:04:39.626Z","avatar_url":"https://github.com/jcalopes.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"**Microservice-based application to manage orders, products and underlying inventory.**\n\n### Installation \n\n1) Install Kubernetes locally or you can enable it with your docker desktop.\n\n2) Clone this project\n\n3) cd deployments/kubernetes\n\n2) Under the aforemention folder execute the following command to deploy all files in your local cluster:\n\n                        kubectl apply -k Kustomization.yaml\n\n## What to expect?\n\n### Architectural Concepts:\n\nImplements well-known design patterns regarding microservices ecosystem to build a reliable and maintainable system as it grows. So you can find:\n\n- The **Service Discovery Pattern** implemented by Eureka Service Discovery as well as the LoadBalancer to forward together the incoming requests to the target host when multiple instances of the same service are running.\n- An **API Gateway Pattern** was also implemented placed in front of the microservices acting as the only entrypoint to the application. Tasks as authentication and forwarding are performed by the API preventing the requests hit directly in the microservices.\n- The **Circuit Breaker Pattern** was also implemented to prevent possible unavailable services make the application getting stuck and escalate the issues. **Resilience4j** was used to apply the pattern to apply the \"Fail Fast\" concept.\n\n### Event-Driven Concepts:\nThere are some ways to communicate between services and **Messaging Pattern** is one of them. Thus to comunicate with notification-service was implemented asynchronous communication using a widely used message queue - **RabbitMQ**. Notification-service acts as a consumer having the order-service the producer on the other side.\n\n### Security Concepts:\nSecurity is increasingly more in demand today as \"open doors\" are being exploited by malicious actors every time. So implementing the best/latest security standards is a must when it comes building an application.\nAware of it the API Gateway is protected using **OAuth 2.0** Standard relying on KeyClouk Library granting access to the resources only by authorized users.\n\n### Quality Assurance Concepts:\nAs the testing plays an important role to ensure that new integrations aren't actually breaking the previous features as well as ensuring that everything is working as expected some **Integration Tests** were performed using JUnit and testContainers libraries to mock the databases used in \"production\".\n\n### CI/CD Concepts:\nIn microservices architecture each microservice should be managed independently. Thus, each microservice have configured a Jenkins pipeline to automate some tasks and ensuring that a new integration will not compromise the current codebase.\nThe pipeline performs a set of stages as build, test, deploy to grant continuous integration and continuous deployment as well. Once the pipeline runs successfully which means that a new integration passes the previous tests and also the tests that eventually were designed during the commit and new image has been updated in docker hub repository.\nThe CI/CD is the main concept behind DevOps and make the development process smoother and more reliable.\n\n### Communication Patterns:\nIn microservices architecture implies that exist some communication between the services. This communication could happen in two different paradigms: asynchronous and synchronous.\nSynchronous can be useful in some scenarios for its simplicity however we have to keep in mind that the user experience could be affected as the sender have blocked waiting for the response thus we need both parts available to happen the communication. To prevent issues in this situation we implemented aforementioned pattern - Circuit Breaker.\nOn the other hand we have asynchronous communication which it's widely used nowadays. This kind of communication means that the sender sends a message to the recipient and continues doing other work without being blocked waiting for the response. We use Kafka which uses asynchronous communication to send messages from the order-service to notification-service.\n\n### Distributed Tracing:\nIn a production environment an application can receive thousands of request per short periods, so It's important to implement mechanisms to trace the whole request lifecycle. So it's implemented using Sleuth and Zipkin for UI to help query the logs to make easier find out the root causes in abnormal scenarios.   \n\n### Monitoring\nWe should implement monitoring tools as soon as possible to predict problems and unpleasant situations avoiding them to be perceived by the clients. So Spring provides some features to help in this task thus we use actuator as a source of useful data and metrics regarding processing and memory consumption as well as other interesting statistics.\nIn the end we have a dashboard monitoring the state of our services almost in real time to ensure that everything is working as expected.\nThen we will use **Prometheus** to fetch this data from **Actuator** endpoints. Once we have the data we use **Grafana** which provide a power set of visualising tools to help delivery the information from Prometheus in a more interactive and friendly way.\n**Stay tuned!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcalopes%2Fsales-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcalopes%2Fsales-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcalopes%2Fsales-project/lists"}