How dotnet-architecture/eshoponweb works
eShopOnWeb is a single-process ASP.NET Core store with a server-rendered storefront, a separate catalog PublicApi, and a Blazor WebAssembly admin client. Shoppers browse the catalog, manage a basket, check out, and view orders; users can also register and sign in. Admins use the browser client to manage catalog items through the API. The graph reflects the sampled service and startup code plus documented capabilities; several endpoint and order-handler implementations were not sampled, so uncertain internal calls are omitted.
Main entry points: CatalogContext.cs Catalog database · Program.cs Web application · EfRepository.cs EF repository · Checkout.cshtml.cs Basket and checkout
Components 26
Storefront
- Web application
src/Web/Program.cs - Catalog browsing
src/Web/Services/CatalogViewModelService.cs - Basket and checkout
src/Web/Pages/Basket/Checkout.cshtml.cs - Basket service adapter
src/Web/Services/BasketViewModelService.cs - Order pages
src/Web/Controllers/OrderController.cs - Order queries
src/Web/Features/MyOrders/GetMyOrdersHandler.cs - Account management
src/Web/Areas/Identity/Pages/Account/Login.cshtml.cs - User and token API
src/Web/Controllers/UserController.cs
Application Core
- Basket operations
src/ApplicationCore/Services/BasketService.cs - Order operations
src/ApplicationCore/Services/OrderService.cs - Store entities
src/ApplicationCore/Entities/CatalogItem.cs - Basket entities
src/ApplicationCore/Entities/BasketAggregate/Basket.cs - Order entities
src/ApplicationCore/Entities/OrderAggregate/Order.cs - JWT claims service
src/Infrastructure/Identity/IdentityTokenClaimService.cs
Persistence
- Catalog database
src/Infrastructure/Data/CatalogContext.cs - Identity database
src/Infrastructure/Identity/AppIdentityDbContext.cs - EF repository
src/Infrastructure/Data/EfRepository.cs - Basket count query
src/Infrastructure/Data/Queries/BasketQueryService.cs
Catalog API
- Public API
src/PublicApi/Program.cs - Catalog endpoints
src/PublicApi/CatalogItemEndpoints - Authentication endpoint
src/PublicApi/AuthEndpoints/AuthenticateEndpoint.cs
Admin Client
- Blazor admin
src/BlazorAdmin/Program.cs - Catalog editing client
src/BlazorAdmin/Services/CatalogItemService.cs - HTTP client service
src/BlazorAdmin/Services/HttpService.cs
Other components
- Shopper
- Catalog administrator
Connections 27
- Shopper → Web application: uses
- Web application → Catalog browsing: serves pages
- Web application → Basket and checkout: serves checkout
- Web application → Account management: serves accounts
- Shopper → Order pages: views orders
- Order pages → Order queries: dispatches queries
- Basket and checkout → Basket service adapter: uses
- Basket service adapter → Basket operations: calls
- Basket and checkout → Order operations: checks out
- Basket operations → EF repository: reads and writes
- Order operations → EF repository: reads and writes
- Order queries → EF repository: queries
- EF repository → Catalog database: persists
- Basket count query → Catalog database: counts from
- Catalog database → Store entities: stores
- Catalog database → Basket entities: stores
- Catalog database → Order entities: stores
- Account management → Identity database: manages identity
- User and token API → JWT claims service: requests token
- JWT claims service → Identity database: looks up users
- Shopper → User and token API: requests token
- Catalog administrator → Blazor admin: uses
- Blazor admin → Catalog editing client: uses
- Catalog editing client → HTTP client service: sends requests
- HTTP client service → Public API: calls
- Public API → Catalog endpoints: maps routes
- Public API → Authentication endpoint: maps routes