/fresh-market

FreshMarket is eCommerce Platform on .NET Core, PostGreSQL, Clean Architechture, CQRS.

Primary LanguageC#MIT LicenseMIT

.NET E-Commerce Reference Application - "Fresh Market"

A reference .NET application implementing an eCommerce web site using a clean architecture.

Features

  • ๐ŸŒ Minimal Endpoints - because it's fast & simple. โšก

  • ๐Ÿ”‘ Global Exception Handling - it's important to handle exceptions in a consistent way & protect sensitive information

  • ๐Ÿ“ OpenAPI/Swagger - easily document your API

  • ๐Ÿ—„๏ธ Entity Framework Core - for data access

    • Comes with Migrations & Data Seeding
  • ๐Ÿงฉ Repository Pattern - abstract EF Core away from your business logic

  • ๐Ÿ”€ CQRS - for separation of concerns

  • ๐Ÿ“ฆ MediatR - for decoupling your application

  • ๐Ÿ“ฆ FluentValidation - for validating requests

  • ๐Ÿ†” Strongly Typed IDs - to combat primitive obsession

    • Entity Framework can automatically convert the int, Guid, nvarchar(..) to strongly typed ID.
  • ๐Ÿงช Testing

    • Simpler Unit Tests for Application
    • Better Integration Tests
      • Integration Tests at Unit Test speed
      • Test Commands and Queries against a Real database
  • Architecture Tests

    • The tests are automated so discovering the defects is fast

Getting Started

Use these instructions to get the project up and running.

Prerequisites

You will need the following tools:

Setup

Follow these steps to get your development environment set up:

  1. Clone the repository
  2. At the root directory, restore required packages by running:
 dotnet restore
  1. Next, build the solution by running:
dotnet build
  1. Launch the back end within the \Src\WebApi directory by running:
dotnet run
  1. Launch https://localhost:5001/api in your browser to view the API

Technologies

  • .NET 8
  • ASP.NET Core 8
  • ASP.NET MVC
  • Entity Framework Core 8

Other Packages

  • MediatR
  • FluentValidation
  • Serilog
  • OpenApi
  • Swashbuckle