Skip to content

Commit db3802a

Browse files
committed
Merging main as of 2025-06-12
2 parents be1413b + 2f2861f commit db3802a

File tree

216 files changed

+6556
-451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+6556
-451
lines changed

Directory.Packages.props

Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -10,76 +10,79 @@
1010
<ItemGroup>
1111
<PackageVersion Include="Ardalis.ApiEndpoints" Version="4.1.0" />
1212
<PackageVersion Include="Ardalis.GuardClauses" Version="5.0.0" />
13-
<PackageVersion Include="Ardalis.Specification.EntityFrameworkCore" Version="8.0.0" />
14-
<PackageVersion Include="Ardalis.Result" Version="10.1.0" />
15-
<PackageVersion Include="Ardalis.Specification" Version="8.0.0" />
1613
<PackageVersion Include="Ardalis.ListStartupServices" Version="1.1.4" />
17-
<PackageVersion Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.3.2" />
18-
<PackageVersion Include="Azure.Identity" Version="1.13.2" />
14+
<PackageVersion Include="Ardalis.Result" Version="10.1.0" />
15+
<PackageVersion Include="Ardalis.Specification" Version="9.2.0" />
16+
<PackageVersion Include="Ardalis.Specification.EntityFrameworkCore" Version="9.2.0" />
17+
<PackageVersion Include="AspNetCore.Security.OAuth.Extensions" Version="1.0.0" />
18+
<PackageVersion Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.4.0" />
19+
<PackageVersion Include="Azure.Identity" Version="1.14.0" />
1920
<PackageVersion Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
2021
<PackageVersion Include="BlazorInputFile" Version="0.2.0" />
2122
<PackageVersion Include="Blazored.LocalStorage" Version="4.5.0" />
2223
<PackageVersion Include="BuildBundlerMinifier" Version="3.2.449" PrivateAssets="All" />
23-
<PackageVersion Include="FastEndpoints" Version="5.34.0" />
24+
<PackageVersion Include="FastEndpoints" Version="6.1.0" />
25+
<PackageVersion Include="FastEndpoints.Swagger" Version="6.1.0" />
2426
<PackageVersion Include="FluentValidation" Version="11.11.0" />
2527
<PackageVersion Include="MediatR" Version="12.4.1" />
26-
<PackageVersion Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.1" />
27-
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.1" />
28-
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="9.0.1" />
29-
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.1" PrivateAssets="all" />
30-
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.0" />
31-
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="9.0.1" />
32-
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.1" />
33-
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="9.0.1" />
34-
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="9.0.1" />
28+
<PackageVersion Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.6" />
29+
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.6" />
30+
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="9.0.6" />
31+
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.6" PrivateAssets="all" />
32+
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.6" />
33+
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="9.0.6" />
34+
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="9.0.6" />
35+
<PackageVersion Include="Microsoft.Extensions.Identity.Stores" Version="9.0.6" />
36+
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.6" />
37+
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="9.0.6" />
3538
<PackageVersion Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
36-
<PackageVersion Include="Microsoft.Extensions.Identity.Core" Version="9.0.1" />
37-
<PackageVersion Include="Microsoft.Extensions.Logging.Configuration" Version="9.0.1" />
39+
<PackageVersion Include="Microsoft.Extensions.Identity.Core" Version="9.0.6" />
40+
<PackageVersion Include="Microsoft.Extensions.Logging.Configuration" Version="9.0.6" />
3841
<PackageVersion Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="9.0.0" />
39-
<PackageVersion Include="Microsoft.Web.LibraryManager.Build" Version="2.1.175" />
40-
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.1" />
41-
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
42+
<PackageVersion Include="Microsoft.Web.LibraryManager.Build" Version="3.0.71" />
43+
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.6" />
44+
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.6" />
4245
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.1">
4346
<PrivateAssets>all</PrivateAssets>
4447
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4548
</PackageVersion>
4649
<PackageVersion Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
4750
<PackageVersion Include="MinimalApi.Endpoint" Version="1.3.0" />
51+
<PackageVersion Include="NimblePros.Metronome" Version="0.4.1" />
4852
<PackageVersion Include="NSubstitute" Version="5.3.0" />
4953
<PackageVersion Include="NSubstitute.Analyzers.CSharp" Version="1.0.17" />
50-
<PackageVersion Include="System.Net.Http.Json" Version="9.0.1" />
54+
<PackageVersion Include="System.Net.Http.Json" Version="9.0.6" />
5155
<PackageVersion Include="System.Security.Claims" Version="4.3.0" />
52-
<PackageVersion Include="System.Text.Json" Version="9.0.1" />
53-
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="8.3.0" />
54-
<PackageVersion Include="Swashbuckle.AspNetCore" Version="7.2.0" />
55-
<PackageVersion Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.2.0" />
56-
<PackageVersion Include="Swashbuckle.AspNetCore.Annotations" Version="7.2.0" />
56+
<PackageVersion Include="System.Text.Json" Version="9.0.6" />
57+
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="8.12.0" />
5758
<!-- Aspire -->
58-
<PackageVersion Include="Aspire.Hosting.AppHost" Version="9.0.0" />
59+
<PackageVersion Include="Aspire.Hosting.Seq" Version="9.1.0" />
60+
<PackageVersion Include="Aspire.Seq" Version="9.1.0" />
61+
<PackageVersion Include="Aspire.Hosting.AppHost" Version="9.1.0" />
5962
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="9.1.0" />
60-
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="9.0.0" />
61-
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.11.1" />
62-
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.11.1" />
63-
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.11.0" />
64-
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.11.0" />
65-
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.11.0" />
66-
<PackageVersion Include="OpenTelemetry.Exporter.Prometheus.AspNetCore" Version="1.10.0-beta.1" />
63+
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="9.1.0" />
64+
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.12.0" />
65+
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.12.0" />
66+
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.12.0" />
67+
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.12.0" />
68+
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.12.0" />
69+
<PackageVersion Include="OpenTelemetry.Exporter.Prometheus.AspNetCore" Version="1.12.0-beta.1" />
6770
<!-- Test -->
68-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.1" />
69-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
7071
<PackageVersion Include="TngTech.ArchUnitNET" Version="0.11.2" />
7172
<PackageVersion Include="TngTech.ArchUnitNET.xUnit" Version="0.11.2" />
72-
<PackageVersion Include="xunit" Version="2.9.3" />
73-
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.1">
73+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.6" />
74+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
75+
<PackageVersion Include="xunit.v3" Version="2.0.3" />
76+
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.1">
7477
<PrivateAssets>all</PrivateAssets>
7578
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
7679
</PackageVersion>
77-
<PackageVersion Include="xunit.runner.console" Version="2.9.3">
80+
<PackageVersion Include="xunit.v3.runner.console" Version="2.0.3">
7881
<PrivateAssets>all</PrivateAssets>
7982
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
8083
</PackageVersion>
81-
<PackageVersion Include="MSTest.TestAdapter" Version="3.7.3" />
82-
<PackageVersion Include="MSTest.TestFramework" Version="3.7.3" />
84+
<PackageVersion Include="MSTest.TestAdapter" Version="3.9.2" />
85+
<PackageVersion Include="MSTest.TestFramework" Version="3.9.2" />
8386
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
8487
</ItemGroup>
8588
</Project>

README.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ A list of Frequently Asked Questions about this repository can be found [here](h
2020
- [Linux/MacOS](#linuxmacos)
2121
- [Running the sample locally](#running-the-sample-locally)
2222
- [Configuring the sample to use SQL Server](#configuring-the-sample-to-use-sql-server)
23-
- [Running the sample in the dev container](#running-the-sample-in-the-dev-container)
23+
- [Dev Containers for the eShopOnWeb repo](#dev-containers-for-the-eshoponweb-repo)
24+
- [eShopOnWeb App Dev Container](#eshoponweb-app-dev-container)
25+
- [eShopOnWeb Docs Dev Container](#eshoponweb-docs-dev-container)
26+
- [Learn More about Dev Containers](#learn-more-about-dev-containers)
2427
- [Running the sample using Docker](#running-the-sample-using-docker)
28+
- [Getting the GitHub Single Sign-On Working](#getting-the-github-single-sign-on-working)
2529
- [Community Extensions](#community-extensions)
2630

2731
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
@@ -110,7 +114,7 @@ According to the prompt, enter an `env name`, and select `subscription` and `loc
110114
You can also run the sample directly locally (See below).
111115

112116
## Running the sample locally
113-
Most of the site's functionality works with just the web application running. However, the site's Admin page relies on Blazor WebAssembly running in the browser, and it must communicate with the server using the site's PublicApi web application. You'll need to also run this project. You can configure Visual Studio to start multiple projects, or just go to the PublicApi folder in a terminal window and run `dotnet run` from there. After that from the Web folder you should run `dotnet run --launch-profile Web`. Now you should be able to browse to `https://localhost:5001/`. The admin part in Blazor is accessible to `https://localhost:5001/admin`
117+
Most of the site's functionality works with just the web application running. However, the site's Admin page relies on Blazor WebAssembly running in the browser, and it must communicate with the server using the site's PublicApi web application. You'll need to also run this project. You can configure Visual Studio to start multiple projects, or just go to the PublicApi folder in a terminal window and run `dotnet run` from there. After that from the Web folder you should run `dotnet run --launch-profile https`. Now you should be able to browse to `https://localhost:5001/`. The admin part in Blazor is accessible to `https://localhost:5001/admin`
114118

115119
Note that if you use this approach, you'll need to stop the application manually in order to build the solution (otherwise you'll get file locking errors).
116120

@@ -160,13 +164,28 @@ You can also run the samples in Docker (see below).
160164
dotnet ef migrations add InitialIdentityModel --context appidentitydbcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj -o Identity/Migrations
161165
```
162166

163-
## Running the sample in the dev container
167+
## Dev Containers for the eShopOnWeb repo
168+
169+
We use dev containers to make it easier for you to run the eShopOnWeb application locally as well as our documentation.
170+
171+
### eShopOnWeb App Dev Container
164172

165173
This project includes a `.devcontainer` folder with a [dev container configuration](https://containers.dev/), which lets you use a container as a full-featured dev environment.
166174

167175
You can use the dev container to build and run the app without needing to install any of its tools locally! You can work in GitHub Codespaces or the VS Code Dev Containers extension.
168176

169-
Learn more about using the dev container in its [readme](/.devcontainer/devcontainerreadme.md).
177+
Learn more about using the dev container in [eShopOnWeb's dev container readme](/.devcontainer/devcontainerreadme.md).
178+
179+
### eShopOnWeb Docs Dev Container
180+
181+
If you want to help maintain [the documentation](https://nimblepros.github.io/eShopOnWeb/), we have a [.devcontainer folder within the docs folder](/docs/.devcontainer). This allows us to see our documentation changes in a container running Ruby and the GitHub Pages environment.
182+
183+
### Learn More about Dev Containers
184+
185+
- [NimblePros YouTube: Run GitHub Pages Locally in a Dev Container](https://www.youtube.com/watch?v=JpLJi5JBmYM&t=5s)
186+
- [NimblePros Blog: Run GitHub Pages Locally in a Dev Container](https://blog.nimblepros.com/blogs/github-pages-with-dev-containers/)
187+
- [NimblePros Blog: Introduction to Dev Containers](https://blog.nimblepros.com/blogs/introduction-to-dev-containers/)
188+
- [NimblePros Webinar: Dev Containers Unwrapped!](https://www.youtube.com/watch?v=Wvetp2YkwPY)
170189

171190
## Running the sample using Docker
172191

@@ -181,6 +200,14 @@ You should be able to make requests to localhost:5106 for the Web project, and l
181200
182201
You can also run the applications by using the instructions located in their `Dockerfile` file in the root of each project. Again, run these commands from the root of the solution (where the .sln file is located).
183202
203+
## Getting the GitHub Single Sign-On Working
204+
205+
We include GitHub as our external provider for single sign-on.
206+
207+
To get it running locally, you'll want to register an application in GitHub and store values in user secrets for the client ID and client secret.
208+
209+
We explain the code in detail in our course on [ASP.NET Identity in Action: Implementing Individual Accounts](https://academy.nimblepros.com/p/applying-identity-to-asp-net).
210+
184211
## Community Extensions
185212
186213
We have some great contributions from the community, and while these aren't maintained by Microsoft we still want to highlight them.

docs/.devcontainer/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Dev Container for the Docs
2+
3+
This allows us to preview the docs locally without having to install Ruby or Jekyll on our machines.
4+
5+
These docs are hosted on GitHub Pages and use the Just-the-Docs theme.
6+
7+
For more information on dev containers, see [the main README's section on dev containers](../../README.md#dev-containers-for-the-eshoponweb-repo) for details.
8+
9+
## Docs Hosting Environment
10+
11+
The docs are hosted on GitHub Pages. GitHub provides a [GitHub Pages Ruby Gem](https://github.com/github/pages-gem) to make it easy for us to run this locally.
12+
13+
If you want to know more about the dependencies of the GitHub Pages Ruby Gem, they keep track of [Dependency versions](https://pages.github.com/versions/).
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// See https://containers.dev/implementors/json_reference/ for configuration reference
2+
{
3+
"name": "eShopOnWeb Documentation",
4+
"dockerFile": "dockerFile",
5+
"forwardPorts": [4000, 35729],
6+
"runArgs": ["--name","eShopOnWeb_docs_devcontainer"],
7+
"postStartCommand": "bundle install && bundle exec jekyll serve --baseurl='' --livereload --force_polling"
8+
}

docs/.devcontainer/dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Create a Jekyll container for GitHub Pages
2+
# See this for current supported versions: https://pages.github.com/versions/
3+
FROM ruby:3.3
4+
5+
# Update the Ruby bundler
6+
RUN gem update bundler
7+
8+
# Install Bundler and GitHub Pages
9+
RUN gem install bundler github-pages

docs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
_site/
2+
Gemfile.lock

docs/Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source "https://rubygems.org"
2+
3+
gem 'github-pages', group: :jekyll_plugins

0 commit comments

Comments
 (0)