Skip to content

Jasigler/RadioMarket.ItemService

Repository files navigation

RadioMarket Item Service API

Example 'item' microservice for an e-commercce website.

Table of Contents

About The Project

This is an item microservice for an e-commerce wwebsite.

In a real-world production environment, it may be beneficial to split this solution into discrete read/write endpoints as the number of read operations will significantly outnumber write operations. For the scope of this project, however, it is not feasible to maintain more than one repo per service or repeat code across projects in a solution. Handling of this seperation will then be managed by a load balancer (Traefik, etc.);

Built With

  • ASP .NET Core 3.1
  • Entity Framework Core
  • Npgsql (EF Core extension)
  • Postgres 12

Getting Started

Prior to setup, you will need the .Net Core 3.1 Runtime for your specific platform. .NET Core runtimes are currently available for Windows, OSX, Linux, and certain BSD distros. If you intend to deploy this to IIS, you will also need the hosting bundle (found on the same site).

In addition to .NET Core, you will need a local Postgres instance. These instructions assume that you will be creating a new docker container, but you can skip step 1 if you are using an existing container/instance. It may be helpful to install pgAdmin, the graphical manager for Postgres.

If you are on windows 10, I highly recommend using the WSL2 docker engine as the overall performance is greatly improved over the hyper-v engine by utilizing an actual local linux kernel. The WSL2 setup instructions are here, and theWSL2 docker instructions are here

Installation

  1. Create a postgres container (linux)
docker run --name radiomarket -p 5432:5432 -e POSTGRES_PASSWORD="YourPWD" -d postgres
  1. Run The DB migration scripts
cd ./Database
  1. Clone the repo
git clone [email protected]:Jasigler/RadioMarket.ItemService.git
  1. Build the solution
cd RadioMarket.Itemservice\Radiomarket.ItemService && dotnet build
  1. Run the solution
dotnet run

Usage

Examples of requests and their responses are shown in Postman. Note that the ItemPath variable is set to: 'https://localhost:1720'.

** Sample data was generated with Datanamic. These generated items might not reflect the intended business domain.

Get all items:

Get all items

Get items by id:

Get an item by ID

Get items by category:

Get an item by category

Get items by owner (user):

Get an item by owner

Get items by status:

Get an item by status

Create an item:

Create a new item

Roadmap

This is an ongoing project. See the open issues for a list of proposed features (and known issues).

Contact

@that_sigler - [email protected]

About

Item API for e-commerce project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published