Make sure you are running the app from linux environement with docker compose and .NET SDK installed.
If you are using Windows OS, download the WSL and move this project to linux file system to avoid performance drawback. You can also use remote development tools such as Rider WSL Remote Development tools or Jetbrains Gateway to develop this app in WSL environement.
Here is the steps to run the app :
-
Run this command in the terminal on the root of project :
docker compose up -d -
Wait for the SQL Server container to successfully running. You can check it using this command :
docker exec -it inventory-system-local-sql-server /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "Strongpwd123_"The container is successfully running if the resulting output is like this :
1> -
After that, you can run the app using
dotnet runin theInv_Backend_NETfolder, or you can also use your favorite IDE to run the app. -
If you are using Windows, you can check the URL of the linux subsystem that is used to run this app by using this command in the linux terminal :
hostname -I
you can run this command in the Inv_Backend_NET folder to seed the initial data to the database for development purpose :
dotnet run refresh test-seeder
This is the expected project structure after refactoring. It is generated using tree.nathanfriend.com
Inv_Backend_NET
└── Feature
├── Transaction # using strict clean architecture because of rich domain logic
│ ├── Application
│ │ ├── Handler
│ │ ├── Dto
│ │ └── Read_Service
│ ├── Domain
│ │ ├── Exception
│ │ ├── Entity
│ │ ├── Dto
│ │ ├── Mapper
│ │ └── Value Object
│ └── Presentation
│ ├── Dto
│ ├── Error_Translator
│ └── Controller
├── Pengajuan # Same as transaction feature, but this is legacy
├── Product # using simple MVC and Transaction Script
│ ├── Database
│ │ ├── Model/Entity
│ │ └── Configuration
│ ├── Controller
│ ├── Handler
│ └── Dto
├── Reporting
└── Authentication
There is 4 main features : Transaction, Product, Reporting, and Authentication
Inventory_Backend.Tests
├── Seeder
│ ├── ProductSeeder
│ ├── TransactionSeeder
│ └── UserSeeder
├── Test_Configuration
│ ├── Constant
│ ├── Fixture
│ ├── Collection_Definition
│ └── Logging
└── Feature
├── Transaction
│ ├── Integration
│ │ ├── Scenario1/Requirement1
│ │ └── Scenario2/Requirement2
│ └── Unit
│ ├── Scenario1/Requirement1
│ └── Scenario2/Requirement2
├── Pengajuan
├── Product
├── Reporting
├── Authentication
└── Main_Setup
Integration testing currently utilize XUnit Collection Fixture. The container will be run once
within all Integration Test using TestWebAppFactory.cs.