All Projects → fkhoda → checkout-shoppinglist-api

fkhoda / checkout-shoppinglist-api

Licence: other
Checkout Shopping List API

Programming Languages

C#
18002 projects
powershell
5483 projects

Projects that are alternatives of or similar to checkout-shoppinglist-api

shopnote
shopnote is a JAMstack application that helps in creating notes with shopping items. This application is built to showcase the JAMstack concept using Fauna, Netlify Serverless Functions and GatsbyJS.
Stars: ✭ 15 (-72.22%)
Mutual labels:  shopping-list
Online-Book-Store
An online Book Store createed with Python / Flask rest, MySql,Angular and Bootstrap
Stars: ✭ 76 (+40.74%)
Mutual labels:  shopping-list
Laracom
Laravel FREE E-Commerce Software
Stars: ✭ 1,570 (+2807.41%)
Mutual labels:  shopping-list

Checkout Shopping List API

Tooling

Required

  • ASP.NET Core 2.0

Optional

  • Docker - Tested on Docker client 17.04.0-ce, Docker server 17.05.0-ce, Docker Machine 0.10.0 and Docker Compose 1.12.0
  • Kubernetes - Tested on Kubernetes v1.7.0, kubectl v1.7.0 and Minikube v0.21.0

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

  • Onion Architecture

  • Actor Model with in-memory Event Sourcing and Snapshotting using Proto Actor (http://proto.actor)

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

  • Some Unit Tests are implemented in the Client Library (https://github.com/fkhoda/checkout-net-library)
  • The Authentication middleware checks for clients' Authorization request header against this value: sk_test_32b9cb39-1cd6-4f86-b750-7069a133667d. You may have to specify it manually if you are not using the client library or its Unit Tests.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].