Skip to content

Commit

Permalink
Merge pull request #41 from rishiraj88/develop
Browse files Browse the repository at this point in the history
Update README file for the project.
  • Loading branch information
rishiraj88 authored Feb 7, 2025
2 parents 35e28da + ebd8420 commit 07511b4
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 26 deletions.
44 changes: 24 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# Order Manager(E-Commerce App)
This project essentially showcases how the components of a distributed application can be implementated using numerous web technologies of modern age, integrated together for asynchronous communication and for synchronous communications both, and how they work together to solve real-world business problems. Some of the technologies used in this project, which deserve special mention, include:
- This project essentially showcases the real-world problems facing most of the businesses today can be simply attended to with a distributed system. Such a system is implementated using modern web technologies, integrated together with asynchronous and synchronous communication.
- Some of the technologies used in this project are:
- Spring Boot 3.2, Java 21
- Keycloak for User Account Manager, Authn and Authz [*Reference Doc*](/~https://github.com/rishiraj88/order-manager/blob/main/gateway%20implementation%20with%20Keycloak.md)
- Modern strategy implemented for Spring Security (as in Spring Boot 3)
- Use of RestClient (Spring Boot 3.2 implementation) instead of FeignClient (Spring Boot 2.7 style)
- Kafka for asynchronous communication (such as notification service) across web services using message queues
- Docker Compose [To be replaced with Kubernetesfor auto-scaling]
- Testcontainers for automated API testing and Contract testing with Rest-Assured
- Container orchestration (deployment YAML for Kubernetes to be added soon)

## Order management APIs
- built with Spring Boot 3,
- tested with TestContainers and Rest-Assured.
- Keycloak (OAuth2, OpenID Connect) for User Account management, Authorization and Authentication [*Reference Doc*](/~https://github.com/rishiraj88/order-manager/blob/main/gateway%20implementation%20with%20Keycloak.md)
- Modern strategy for Spring Security implementation (as in Spring Boot 3, Spring 6)
- Use of WebClient and RestClient (Spring Boot 3.2) and not of FeignClient (Spring Boot 2.7 style)
- Kafka for asynchronous communication (as in Notification app) across web services using message queues (MQ)
- Docker-Compose for containerization of individual apps
- Kubernetes for clustering and auto-scaling
- Testcontainers for automated API Testing and Contract Testing, with Rest-Assured
- Container orchestration (WIP: adding Deployment YAML for Kubernetes)

## Salient Use of Technological Tools
- Multi-stage Dockerfile for Product app
- Declarations of YAML for Kubernetes cluster

## This application has three main business components, implemented as Microservices:
- Product
Expand All @@ -27,8 +29,12 @@ This project essentially showcases how the components of a distributed applicati

And the result is: unmatched and flawless user experience. :)


![realm-creation-success-in-keycloak-admin](./assets/gateway/08-realm-creation-success-in-keycloak-admin.png)


Screenshots will be updated for the year 2025. However, those out of 2024 are quite impressive and comprehensible!

## Tech Tools Used for Development
- Spring Boot, with Spring Web
- Spring Cloud Config (for service integration)
Expand All @@ -47,8 +53,6 @@ And the result is: unmatched and flawless user experience. :)
- Spring RestClient (Spring Boot 3.2 offering. It replaces the older option Spring OpenFeign (for inter-service communication))
- Resilient4j v2 for Fault Tolerance

### The Development work to resumes in full swing today. A long break until now had got inevitable.

## General Note
I enjoy the following approach for inception, enhancement and fortification of projects:
1. Start in simple, lazy and less structured approach.
Expand All @@ -70,7 +74,7 @@ Suggestions and feedback comments from readers are always welcomed with love.
This module is for adding, listing, modifying and removing products and product details.

### API Base
The product API has its base at "/api/products".
The product API has its base at "/api/v1/products".

### Database Details
MongoDB engine powers the product module. The data store is well expected to be enriched with newer fields very frequently, so NoSQL database technology is used for this.
Expand Down Expand Up @@ -101,18 +105,18 @@ A number of test cases are already provided in the **Tests** class. For POST req
"pricePerItem":120.80
}</pre>

#### Testing Done on 11-Apr-2024
#### Testing Done in Apr-2024
![Product module: automated testing](./assets/automated-testing-of-product_20240411.png)

#### Testing Done on 02-May-2024
#### Testing Done in May-2024
![Product module: automated testing](./assets/automated-testing-of-product_20240502.png)


## Order Module
This module is for creating, listing, modifying and removing orders and order details.

### API Base
The order API has its base at "/api/orders".
The order API has its base at "/api/v1/orders".

### Database Details
MySQL engine powers the order module. The data store is expected to be structured with infrequent field additions, modifications and removals. So, SQL database (RDBMS) technology is used for this.
Expand All @@ -126,7 +130,7 @@ The module for Product has been set up with the following dependencies, specifie
- Flyway
- Testcontainers
- Rest-Assured
- Spring OpenFeign
- RestClient (Spring Boot 3)
- WireMock for using stubs during automated API testing
- Swagger (for OpenAPI-based API documentation)

Expand Down Expand Up @@ -185,7 +189,7 @@ The module for Product has been set up with the following dependencies, specifie
- Flyway
- Testcontainers
- Rest-Assured
- Spring OpenFeign
- RestClient (Spring Boot 3)
- Swagger (for OpenAPI-based API documentation)

![Spring Boot project dependencies](./assets/spring-init-for-inventory.png)
Expand Down
5 changes: 0 additions & 5 deletions order/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- Feign Client not needed as RestClient is a preferred tool in Spring Boot 3
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-contract-stub-runner</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@RequiredArgsConstructor
@RestController
@Slf4j
@RequestMapping("/api/v1/products") //TODO add API versioning
@RequestMapping("/api/v1/products")
public class ProductController {
private final IProductService productService;

Expand Down

0 comments on commit 07511b4

Please sign in to comment.