Checkout.API simulates a real-time marketplace by exposing a RESTful API that allows customers to list a catalog of products, add/remove items to a cart, update their quantity according to the stock availble, as well as clearing out the cart entirely.
A set of back-office routes allows administrators to perform CRUD operations on the product catalog
Any operation that alters the state of a shopping cart (e.g adding or removing an item to cart) will trigger a push notification by the server (using SignalR) that will notify every connected clients with the newly updated available quantity for the given product.
On top of that, any iddle client that does not perform operations on their cart will trigger the cart the be cleared, updating therefore the available quantity of the products. Connected clients will be notified accordingly
Prerequesites: Checkout API is powered by ASP.NET Core 2.1 and SQL Server. Those two main dependecies should be installed locally.
- Clone the repo
- Run the following commands:
cd Checkout.API
cp 'appsettings.json' 'appsettings.Development.json'
## Replace the default connection string with the desired one
dotnet restore
dotnet ef database update
dotnet build
dotnet run
- Open a browser and navigate to http://{host}:{port}/api/swagger
A static documentation of the API can be found here
Otherwise, the API is fully self-documented by swagger and is accessible once the API is the deployed at the route: /api/swagger
Checkout.API uses Travis CI to run every tests in the test project Checkout.API.Test
cd Checkout.API.Tests
dotnet test
- Support stock increase in administration
- Add authentication
- Setup continuous deployment script
- Support checkout