Checkout Shopping List API

Tooling

Required

Optional

Note that you may need to increase your VM memory limit to 4GB or higher.

Build

$ ./build.ps1

Run

$ ./run.ps1

Test

$ ./tests.ps1

Docker

Build Image

$ dotnet restore
$ dotnet publish -o build -c Release
$ docker build -t fkhoda/checkout-shoppinglist-api .

Run with Docker Compose

With ELK monitoring:

$ docker-compose -f docker-compose-with-monitoring.yml up

Without ELK monitoring:

$ docker-compose up

Access

Kubernetes

Push Docker Image to Registry

$ docker push fkhoda/checkout-shoppinglist-api

Deploy to Minikube Cluster

Deploy ELK for monitoring (Optional)

$ git clone https://github.com/fkhoda/elk-kubernetes.git
$ cd elk-kubernetes
$ kubectl create -f .\kubefiles\ -R --namespace=default

Deploy Shopping List API with ELK monitoring

$ kubectl create -f ./kubefiles/sl-deployment-with-monitoring.yaml --namespace=default
$ kubectl create -f ./kubefiles/sl-service.yaml --namespace=default

Deploy Shopping List API without ELK monitoring

$ kubectl create -f ./kubefiles/sl-deployment.yaml --namespace=default
$ kubectl create -f ./kubefiles/sl-service.yaml --namespace=default

Access

Architecture

Feature Highlights

Endpoints

Add Item

Method: POST

URI: /api/shoppingLists/{customerId}/items

Get All Items

Method: GET

URI: /api/shoppingLists/{customerId}/items[?pageNumber=1&pageSize=10]

Get Item

Method: GET

URI: /api/shoppingLists/{customerId}/items/{itemName}

Update Quantity

Method: PUT

URI: api/shoppingLists/{customerId}/items/{itemName}

Delete Item

Method: DELETE

URI: api/shoppingLists/{customerId}/items/{itemName}

Notes