-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from NashTech-Labs/feature/readme
updated readme
- Loading branch information
Showing
3 changed files
with
97 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Cart Service | ||
|
||
## Application Overview | ||
|
||
The Cart Service is a meticulously designed component that facilitates customers in selecting items from the store's website and managing their shopping carts. It leverages a robust architecture to handle the complexities of cart management, providing a seamless experience for users. | ||
|
||
### Prerequisites | ||
We must configure MySQL as the persistent store destination. | ||
|
||
![cart-service-config.png](https://i.postimg.cc/1z7yX0RY/cart-service-config.png) | ||
|
||
### Local setup | ||
- Setup axon-server and MySQL docker images | ||
``` | ||
local-dev > docker compose up -d | ||
``` | ||
- Run the application | ||
``` | ||
cart-service > mvn clean springboot:run | ||
``` | ||
- Endpoint for resting | ||
- Generate a request for add to cart. | ||
```arm | ||
curl --location 'http://localhost:9094/cart/add' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"productId": "199", | ||
"quantity": 1, | ||
"userId": "1652" | ||
}' | ||
``` | ||
- Generate a request for remove to cart. | ||
```arm | ||
curl --location 'http://localhost:9094/cart/remove' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"productId": "205", | ||
"quantity": 1, | ||
"userId": "1652" | ||
}' | ||
``` | ||
- Generate a request to get cart contents. | ||
``` | ||
curl --location 'http://localhost:9094/cart/get' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"userId": "1652" | ||
}' | ||
``` | ||
|
||
### Contributing | ||
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. | ||
|
||
Please make sure to update tests as appropriate. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters