RookieShop is a .NET Core web application training project demonstrating Clean Architecture, DDD and modern web development with Aspire and Next.js. The project is part of the Rookie Phase-1 Assignment at NashTech.
- Requirements
- Project Progress Report
- Technical Stack
- Software Architecture
- Getting Started
- Testing
- Deployment
- Observability
- Project References
- License
- Organization
Build an e-commerce web site with minimum functionality below:
For customers:
Home page: category menu, features products
View products by category
View product details
Product rating
- Register
- Login/Logout
- Optional (Shopping Cart, Ordering, IdentityServer4)
For admin:
- Login/logout
Manage product categories (Name, Description)
Manage products (Name, Category, Description, Price, Images, CreatedDate, UpdatedDate)
View customers
Note
The project should apply as many techniques of ASP.NET MVC Core as possible. For example: TagHelpers, Razor Pages, ViewComponents and have Unit Test. The Unit Test do not need to have a high coverage number but should demonstrate the ability to write unit test for common components: Controllers, ViewComponents, Services …
Checkpoint | Demo video | Report | Presentation |
---|---|---|---|
1 |
- ASP.NET Core 8.0
- Next.js 14.0
- Duende IdentityServer 7.0
- Redis
- Postgres
- Aspire
- OpenTelemetry
- TestContainers
No | Name | Usecase |
---|---|---|
1 | identity server | An authentication server that provides authentication and authorization services for the application |
2 | store front | A user-facing website that allows customers to view, rate, and purchase products |
3 | back office | An admin-facing website that allows administrators to manage products, categories, and customers |
4 | web api | A REST API that provides data to the user-facing and admin-facing websites |
5 | redis | A distributed lock manager, cache and cart storage |
6 | postgres | A relational database that stores the application's data |
7 | open telemetry | A telemetry data collector that collects and exports telemetry data to the Aspire Dashboard |
- Get the latest source code: https://github.com/foxminchan/RookieShop
- Install & start Docker Desktop: https://docs.docker.com/engine/install/
- Install Node.js: https://nodejs.org/en/download/
- Install bun: https://bun.sh/
- Install Visual Studio 2022
- Install the latest .NET 8.0 SDK
- Install Visual Studio Code with C# Dev Kit
Or use JetBrains Rider for the best experience
# Setup the tools
bun install
dotnet tool restore
# Install the dependencies for the .NET Core projects
cd RookieShop
dotnet restore ./RookieShop.sln
Warning
Remember to ensure that Docker is started
- (Windows only) Run the application from Visual Studio:
- Open the
RookieShop.sln
solution file in Visual Studio - Ensure
RookieShop.AppHost
are set as the startup projects - Hit
F5
to run the application - Or run the application from your terminal:
dotnet run --project src/RookieShop.AppHost/RookieShop.AppHost.csproj
In the project, we use xUnit for unit testing and Moq for mocking. For integration testing, we use the TestContainers
for running the test in the Docker container. I also use the NetArchTest
library to enforce the architecture rules in the project. The test project is located in the test
folder. I follow the Test Pyramid strategy to write the test. To run the test, you can use the following command:
dotnet test RookieShop.sln
Note
For performance testing, we use the K6
tool to simulate the load on the application. To run the performance test, you can use the following:
k6 run ./k6/performance-test.js
Deploying the application to the production environment by using Aspirate (Aspir8)
by running the following command:
dotnet aspirate generate
dotnet aspirate apply
The project uses OpenTelemetry to collect the telemetry data from the application. The data is sent to the OpenTelemetry Collector and exported to the Aspire Dashboard. The Aspire Dashboard is a monitoring and observability tool that provides insights into the application's performance and behavior. It helps developers to identify and troubleshoot issues in the application.
- https://github.com/dotnet/eShop
- https://github.com/dotnet-architecture/eShopOnWeb
- https://github.com/ardalis/CleanArchitecture
- https://github.com/thangchung/clean-architecture-dotnet
- https://github.com/phongnguyend/Practical.CleanArchitecture
This project is licensed under the MIT License - see the LICENSE file for details.