The Principal Dev – Masterclass for Tech Leads

The Principal Dev – Masterclass for Tech Leads28-29 May

Join

eShop Reference Application - "AdventureWorks"

A reference .NET application implementing an e-commerce website using a services-based architecture with Aspire.

eShop Reference Application architecture diagram

eShop homepage screenshot

Getting Started

This version of eShop is based on .NET 10.

Previous eShop versions:

Prerequisites

Windows with Visual Studio

Or

install-Module -Name Microsoft.WinGet.Configuration -AllowPrerelease -AcceptLicense -Force
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
Get-WinGetConfiguration -File .\.config\configuration.vs.winget | Invoke-WinGetConfiguration -AcceptConfigurationAgreements

Or

Mac, Linux, & Windows without Visual Studio

Or

install-Module -Name Microsoft.WinGet.Configuration -AllowPrerelease -AcceptLicense  -Force
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
Get-WinGetConfiguration -File .\.config\configuration.vsCode.winget | Invoke-WinGetConfiguration -AcceptConfigurationAgreements

Note: These commands may require sudo

Note: When running on Mac with Apple Silicon (M series processor), Rosetta 2 for grpc-tools.

Running the solution

[!WARNING] Remember to ensure that your container runtime is started

aspire run

aspire.config.json points this command to src/eShop.AppHost/eShop.AppHost.csproj. This repo also includes test AppHosts, so use --apphost <path> when you want to target one explicitly. Then look for lines like this in the console output to find the URL to open the Aspire dashboard:

Login to the dashboard at: http://localhost:19888/login?t=uniquelogincodeforyou

Running tests

Run the server tests:

dotnet test --solution eShop.Web.slnf

Run the Playwright browser journeys. Playwright starts the AppHost automatically, so ensure your container runtime is running first.

npm ci
npx playwright install chromium
npm run test:e2e

Optional: AI Chatbot with Microsoft Foundry

To use Microsoft Foundry for chat and embeddings, set UseFoundry=true in the AppHost environment. Aspire provisions the Foundry resource and the gpt-4.1-mini and text-embedding-3-small deployments, then injects their connection information into the consuming projects.

The Foundry hosting integration currently uses a preview package. It replaces the sample's previous direct OpenAI and existing Azure OpenAI configuration paths.

$env:UseFoundry = "true"
aspire run

See the Microsoft Foundry Aspire hosting integration for configuration and deployment details.

Deploy with Aspire CLI

Use Aspire deployment from the AppHost model.

This sample intentionally deploys disposable PostgreSQL, Redis, and RabbitMQ containers to Azure Container Apps. It is suitable for evaluation and demonstrations, not production data.

Prerequisites:

  1. Preview deployment steps:
aspire publish --list-steps
aspire deploy --list-steps
  1. Publish deployment artifacts for inspection or handoff:
aspire publish
  1. Deploy directly from the AppHost model:
aspire deploy

Example (PowerShell):

$env:Azure__SubscriptionId = "<subscription-id>"
$env:Azure__Location = "eastus"
$env:Azure__ResourceGroup = "rg-eshop-prod"
aspire deploy --non-interactive

aspire deploy evaluates the AppHost directly; it does not consume a previous aspire publish output directory. Omit --non-interactive for interactive use; add it for automation or agent-driven runs so Aspire does not prompt for missing deployment settings. Set the required values explicitly.

Contributing

For more information on contributing to this repo, read the contribution documentation and the Code of Conduct.

Sample data

The sample catalog data is defined in catalog.json. Those product names, descriptions, and brand names are fictional and were generated using GPT-35-Turbo, and the corresponding product images were generated using DALL·E 3.

eShop on Azure

For a version of this app configured for deployment on Azure, please view the eShop on Azure repo.

Join libs.tech

...and unlock some superpowers

GitHub

We won't share your data with anyone else.