eShop README

The project's README from github.com/dotnet/eShop. As one markdown file: README.md.

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

  1. Install a .NET 10 SDK that satisfies global.json.

  2. Install the Aspire CLI and verify that it is available:

    aspire --version
    
  3. Install and start an OCI-compatible container runtime. Docker Desktop is the recommended default. Podman is also supported; follow the Aspire prerequisites to configure it.

  4. Clone the repository:

    git clone https://github.com/dotnet/eShop.git
    cd eShop
    

No separate Aspire workload or Visual Studio component is required; the AppHost SDK and hosting integrations are referenced by the projects in this repository.

Optional IDE setup

Running the solution

[!WARNING] Ensure that your container runtime is running before starting eShop.

From the terminal

From the repository root, run:

aspire run

The root aspire.config.json selects src/eShop.AppHost/eShop.AppHost.csproj, avoiding ambiguity with the test AppHosts in the repository. When startup completes, the CLI prints a dashboard URL similar to:

Dashboard: https://localhost:<port>/login?t=<token>

Press Ctrl+C to stop the AppHost. See the aspire run command for additional options.

To run the AppHost in the background instead:

aspire start
aspire ps

When you are finished, run aspire stop. See the aspire start command for details.

From Visual Studio

  1. Open eShop.Web.slnf.
  2. Set src/eShop.AppHost/eShop.AppHost.csproj as the startup project.
  3. Press Ctrl+F5 to start eShop and open the Aspire dashboard.

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

This option provisions a Microsoft Foundry resource during local development, so first authenticate to Azure and configure the subscription and location:

az login
aspire secret set "Azure:SubscriptionId" "<subscription-id>"
aspire secret set "Azure:Location" "eastus"

Then enable Foundry and start eShop:

$env:UseFoundry = "true"
aspire run

Aspire provisions the gpt-4.1-mini and text-embedding-3-small deployments and injects their connection information into the consuming projects. The Foundry hosting integration currently uses a preview package. See local Azure provisioning and the Microsoft Foundry hosting integration for details.

Deploy to Azure Container Apps

The AppHost is already configured with an Azure Container Apps environment, so the Aspire CLI can deploy directly from the application model. See the Aspire Azure Container Apps deployment guide for details.

[!WARNING] This sample deploys PostgreSQL, Redis, and RabbitMQ as containers in Azure Container Apps. This configuration is intended for evaluation and demonstrations, not production data.

Prerequisites:

Sign in, optionally preview the deployment pipeline, and deploy:

az login
aspire deploy --list-steps
aspire deploy

For local interactive use, aspire deploy prompts for missing Azure settings. For non-interactive use, provide them explicitly:

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

Use aspire publish when you need deployment artifacts for inspection or another deployment tool. Running it first is not required: aspire deploy invokes the deployment pipeline and its dependencies directly rather than consuming an earlier publish output.

When you no longer need the deployment, run aspire destroy. This deletes the entire configured resource group, including resources that Aspire did not create, so review the target carefully before confirming.

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.

eShop (dotnet/eShop)

Searching Database…

11K ·GitHub
Что это такое?Эталонное .NET-приложение, реализующее интернет-магазин ('AdventureWorks') на основе архитектуры микросервисов с сервисами, построенное на .NET Aspire.
Это библиотека, которую я подключаю в проект, или готовое приложение, которое я запускаю?Это полноценное многосервисное демонстрационное приложение, а не пакет для импорта: вы запускаете весь AppHost, чтобы поднять все микросервисы eCommerce вместе.
Как это запустить?Клонируйте репозиторий, убедитесь, что контейнерная среда запущена, и выполните Aspire CLI из корня репозитория (или откройте eShop.Web.slnf в Visual Studio и нажмите Ctrl+F5), чтобы запустить AppHost и открыть панель Aspire.
Что нужно установить перед запуском?Сначала нужны .NET 10 SDK, соответствующий global.json, Aspire CLI и совместимая с OCI среда контейнеров (рекомендуется Docker Desktop, поддерживается также Podman).
Есть ли подводные камни при развёртывании этого в облаке?При развёртывании в Azure Container Apps поднимаются PostgreSQL, Redis и RabbitMQ как рабочие контейнеры; в README прямо сказано, что это предназначено только для оценки и демонстраций, но не для производственных данных.
Что за необязательная функция ИИ-чатбота?eShop может по желанию подключить ресурс Microsoft Foundry во время локальной разработки, чтобы добавить ИИ-чатбота. Используются модели gpt-4.1-mini и text-embedding-3-small, которые Aspire автоматически внедряет в приложение.
Данные каталога товаров настоящие?Нет, названия товаров, описания, названия брендов и изображения в catalog.json вымышленные, созданы с помощью GPT-3.5-Turbo и DALL-E 3.
Могу ли я развернуть eShop в Azure прямо отсюда?Да, в AppHost уже настроено окружение Azure Container Apps, поэтому команда 'aspire deploy' развернёт приложение напрямую из модели приложения.
Есть ли версия для развёртывания в Azure в производственной среде?Проект ссылается на отдельный репозиторий 'eShop on Azure', который специально настроен для этой цели, так как развёртывание этой версии в Azure предназначено только для демонстраций.
Creator
dotnet
Size
26.8 MB
Stars
11K
Age
2y
Commits · 90 Days