A reference .NET application implementing an e-commerce website using a services-based architecture built with .NET and following best practices in modern software development.
- Scalable and Modular Design: Built for an e-commerce platform with extensibility in mind.
- Secure Transactions: Implements DevSecOps practices to ensure security at every stage of development.
- Microservices Architecture: Handles product catalogs, user management, and order processing as separate services.
- Cloud Deployment Ready: Supports deployment to cloud platforms for scalability and high availability.
- REST APIs: Provides extensibility and integration with external systems.
- User-Friendly Interface: Prioritizes a clean, intuitive, and responsive UI for the best user experience.
- .NET Core: Backend application framework.
- ASP.NET MVC: For building the web application layer.
- Entity Framework Core: For database management and operations.
- Docker: Containerization for seamless deployment.
- Azure/AWS: For cloud hosting and scalability.
- CI/CD Pipeline: Integrated with GitHub Actions for automated builds, tests, and deployments.
This version of eShopio is built on .NET 9. Below are the streamlined steps to set up and run the application effectively.
-
Clone the Repository
git clone https://github.com/dotnet/eShopio
-
Install and Start Docker Desktop Ensure Docker Desktop is running for container-based services.
- Install Visual Studio 2022 (v17.10 or newer).
- Select the following workloads during installation:
- ASP.NET and Web Development
- .NET Aspire SDK (found in Individual Components).
- (Optional) .NET MAUI Development to run client apps.
Run the following commands in PowerShell (Administrator mode):
Install-Module -Name Microsoft.WinGet.Configuration -AllowPrerelease -AcceptLicense -Force
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
get-WinGetConfiguration -file .\.configurations\vside.dsc.yaml | Invoke-WinGetConfiguration -AcceptConfigurationAgreements
This script installs all required tools and prompts a system restart.
- In Dev Home, navigate to Machine Configuration > Clone Repositories.
- Enter the repository URL.
- Confirm the detected configuration file and select Run File.
-
Install the latest .NET 9 SDK.
-
Run the following commands in a terminal (Administrator mode):
Install-Module -Name Microsoft.WinGet.Configuration -AllowPrerelease -AcceptLicense -Force $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") get-WinGetConfiguration -file .\.configurations\vscode.dsc.yaml | Invoke-WinGetConfiguration -AcceptConfigurationAgreements
-
(Optional) Install Visual Studio Code and extensions for .NET development.
Ensure Docker is running before proceeding.
- Open
eShopio.Web.slnf
in Visual Studio. - Set
eShopio.AppHost.csproj
as the startup project. - Press Ctrl+F5 to launch Aspire.
- Navigate to the application directory:
cd src/eShopio.AppHost
- Run the project:
dotnet run --project eShopio.AppHost.csproj
- Note the dashboard URL in the console output:
Login to the dashboard at: http://localhost:19888/login?t=your-unique-code
- Install ASP.NET Core HTTPS certificates if prompted. Learn more here.
- Update
appsettings.json
ineShopio.AppHost
:"ConnectionStrings": { "OpenAi": "Endpoint=your-endpoint;Key=your-key;" }
- Enable OpenAI in
Program.cs
:bool useOpenAI = true;
- Learn more about the .NET Aspire OpenAI component.
- Install or update Azure Developer CLI:
az upgrade
- Authenticate to Azure:
azd auth login
- Initialize the project:
azd init
- Select "Use code in the current directory."
- Confirm "Use .NET (Aspire)."
- Name your environment.
- Deploy the application:
The deployment URL will be displayed after completion.
azd up
- Sample Data: Catalog data in
catalog.json
was generated using GPT-35-Turbo. Images were created with DALL·E 3. - For Azure deployment, check the eShopio on Azure repo.
Read the contribution guidelines and the Code of Conduct.
For any questions or troubleshooting, refer to the FAQ.