MsCoreOne
MsCoreOne copied to clipboard
MsCoreOne is a simple Ecommerce with using many technologies such as .NET 5, Entity Framework Core 5, React 16.13 with modern Clean Architecture, Domain-Driven Design, CQRS, SOLID, Identity Server 4,...
MsCoreOne - Simple Ecommerce
This is a simple ecommerce to practice technologies.
Build Status
Build server | Platform | Status |
---|---|---|
Travis | Linux / MacOS | |
Azure DevOps | Linux |
The technologies have implemented as image above.
Technologies | Yes/No |
---|---|
ASP .NET Core | ✅ |
ASP .NET Core Mvc | ✅ |
Entity Framework Core | ✅ |
Identity Server 4 | ✅ |
Swagger UI | ✅ |
React + Typescript | ✅ |
Vue.js | ✅ |
Sql Server | ✅ |
PostgresQL | ❌ |
Blazor/Angular | ❌ |
Onion Architecture
ASP.NET Core architecture diagram following Clean Architecture
You probally access to link to get more detail for common web application architectures
Layers Example
Account default
- Username: [email protected]
- Password: P@ssw0rd
Docker build
Prerequisite
- Installed Docker on your computer
Steps to run
- At deployment folder
$ docker-compose -f docker-compose-infra.yml up
$ docker-compose build
$ docker-compose up
Notes
- Updating MSCOREONE_DB_HOST's value is ([your IP], 1433) in .env file. Ex. 192.168.131.97,1433
- Adding ([your IP] mscoreone-portal.local) in hosts file. Ex. 192.168.131.97 mscoreone-portal.local
Links store demo on docker
- Front-office: Mscoreone - mvc
- Back-office: Mscoreone - react
- Swagger-api: Mscoreone - api
Running integration test and watching code coverage
You need to some require external nuget packages. Install Converlet and FluentAssertions for your project using the following cli commands.
To get converlet to collect code coverage for your codebase, we need just to run the following command at the repository root.
dotnet test MsCoreOne.IntegrationTests.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=\"opencover\" /p:CoverletOutput=BuildReports\Coverage\ /p:ExcludeByFile=\"**/Persistence/ApplicationDbContextSeed.cs\" /p:Exclude=\"[*]MsCoreOne.Infrastructure.Migrations.*,[*]MsCoreOne.Pages.*,[*]MsCoreOne.Areas.*\"
Distributed Caching with Redis
To testing with redis cache, you can install redis by the following way:
- Install manually redis from github repo and that download zip file that is compatible with your windows, extract the zip folder, and open up redis-server.exe
- Using docker to up redis by access to development folder then open powershell and that run command bellow.
docker-compose -f .\docker-compose-infra.yml up redis
Note: You should update your IP in appsetting for redis configuration to make sure mscoreone-api connect to redis server successfully.
:handshake: Contributing
Contributions, issues and feature requests are welcome!
:man_astronaut: Show your support
Give a :star: if you like this project!