Codebase analysis · CoreStory V3

eShopOnWeb

A reference e-commerce application written in C# on ASP.NET Core. It covers a product catalog, shopping basket, checkout, orders, customer accounts and an administrator catalog API. A sample published by Microsoft's .NET team; this page is not affiliated with or endorsed by Microsoft.

Maintained by
the .NET architecture team at Microsoft
License
MIT
Commit analyzed
4da8212117e87d808d4bbc7da6286fd2147ce606
Rules extracted
2026-11-15
Extracted by CoreStory V3
1269
accepted rules, each with a cited source quote
12
capabilities
281
features
01 · Rules

Business rules, traced to source lines.

These 12 rules are a sample of the 1,269 CoreStory V3 extracted from eShopOnWeb. Each one links to the exact lines on GitHub at commit 4da8212. The statement is CoreStory V3’s wording; the code excerpt is the source it cites.

model supplied classification
src/ApplicationCore/Entities/BasketAggregate/Basket.cs

Adding an item to the basket with a catalogItemId not already present creates a new BasketItem with the given quantity and unitPrice; if an item with the same catalogItemId is already present, the quantity is added to that existing item instead.

public void AddItem(int catalogItemId, decimal unitPrice, int quantity = 1) { if (!Items.Any(i => i.CatalogItemId == catalogItemId)) { _items.Add(new BasketItem(catalogItemId, quantity, unitPrice)); return; } var existingItem = Items.First(i => i.CatalogItemId == catalogItemId); existingItem.AddQuantity(quantity); }
calculation
src/ApplicationCore/Entities/OrderAggregate/Order.cs

The Order total is computed as the sum over all order items of item.UnitPrice multiplied by item.Units, starting from an initial total of 0m.

  • 0 — initial accumulator value for the total
public decimal Total() { var total = 0m; foreach (var item in _orderItems) { total += item.UnitPrice * item.Units; } return total; }
validation
src/ApplicationCore/Extensions/GuardExtensions.cs

When checking out, if the basket items collection contains no items, an EmptyBasketOnCheckoutException is thrown.

if (!basketItems.Any()) throw new EmptyBasketOnCheckoutException();

Also cited: L10

calculation
src/ApplicationCore/Services/OrderService.cs

Each order item is created from the matching catalog item's id, name, and composed picture URI, together with the basket item's unit price and quantity.

var items = basket.Items.Select(basketItem => { var catalogItem = catalogItems.First(c => c.Id == basketItem.CatalogItemId); var itemOrdered = new CatalogItemOrdered(catalogItem.Id, catalogItem.Name, _uriComposer.ComposePicUri(catalogItem.PictureUri)); var orderItem = new OrderItem(itemOrdered, basketItem.UnitPrice, basketItem.Quantity); return orderItem; }).ToList();
authorization
src/PublicApi/CatalogItemEndpoints/CreateCatalogItemEndpoint.cs

Creating a catalog item via POST api/catalog-items requires an authenticated user in the ADMINISTRATORS role using the JwtBearer authentication scheme.

  • ADMINISTRATORS — required role name
  • JwtBearerDefaults.AuthenticationScheme — authentication scheme
app.MapPost("api/catalog-items", [Authorize(Roles = BlazorShared.Authorization.Constants.Roles.ADMINISTRATORS, AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] async (CreateCatalogItemRequest request, IRepository<CatalogItem> itemRepository) => { return await HandleAsync(request, itemRepository); })
uniqueness validation
src/PublicApi/CatalogItemEndpoints/CreateCatalogItemEndpoint.cs

A catalog item cannot be created if a catalog item with the same name already exists; the endpoint counts matching items by CatalogItemNameSpecification(request.Name) and throws a DuplicateException when the count is greater than 0.

  • 0 — maximum count threshold below which creation proceeds
var catalogItemNameSpecification = new CatalogItemNameSpecification(request.Name); var existingCataloogItem = await itemRepository.CountAsync(catalogItemNameSpecification); if (existingCataloogItem > 0) { throw new DuplicateException($"A catalogItem with name {request.Name} already exists"); }
validation
src/PublicApi/CatalogItemEndpoints/UpdateCatalogItemEndpoint.UpdateCatalogItemRequest.cs

The Price must be between 0.01 and 10000 inclusive, enforced by the Range attribute.

  • 0.01 — minimum allowed Price
  • 10000 — maximum allowed Price
[Range(0.01, 10000)] public decimal Price { get; set; }
validation
src/PublicApi/ImageValidators.cs

A posted file is a valid image only if the byte array is non-null, its length is greater than 0 and at most 512000 bytes, and its file extension is one of the allowed extensions.

public static bool IsValidImage(this byte[] postedFile, string fileName) { return postedFile != null && postedFile.Length > 0 && postedFile.Length <= ImageMaximumBytes && IsExtensionValid(fileName); }
validation
src/Web/Areas/Identity/Pages/Account/Login.cshtml.cs

An anonymous basket is transferred to the user only if the basket cookie exists and its value parses as a GUID; the username must be non-null/non-empty, and the basket cookie is deleted afterward.

  • Constants.BASKET_COOKIENAME — basket cookie name
if (Request.Cookies.ContainsKey(Constants.BASKET_COOKIENAME)) { var anonymousId = Request.Cookies[Constants.BASKET_COOKIENAME]; if (Guid.TryParse(anonymousId, out var _)) { Guard.Against.NullOrEmpty(userName, nameof(userName)); await _basketService.TransferBasketAsync(anonymousId, userName); } Response.Cookies.Delete(Constants.BASKET_COOKIENAME); }
business rule
src/ApplicationCore/Services/BasketService.cs

When transferring a basket, every item from the anonymous basket is added to the user basket using the item's CatalogItemId, UnitPrice, and Quantity, and then the user basket is updated and the anonymous basket is deleted.

foreach (var item in anonymousBasket.Items) { userBasket.AddItem(item.CatalogItemId, item.UnitPrice, item.Quantity); } await _basketRepository.UpdateAsync(userBasket); await _basketRepository.DeleteAsync(anonymousBasket);
authorization scoping
src/Web/Features/MyOrders/GetMyOrdersHandler.cs

Orders returned for the MyOrders feature are restricted to those matching the requesting user's username, enforced by constructing a CustomerOrdersSpecification with request.UserName and listing orders through it.

var specification = new CustomerOrdersSpecification(request.UserName); var orders = await _orderRepository.ListAsync(specification, cancellationToken);
policy
src/Web/Areas/Identity/Pages/Account/Login.cshtml.cs

On POST with valid model state, password sign-in is attempted with lockoutOnFailure set to true, so failed password attempts count towards account lockout.

  • true — enable lockout on password failure
var result = await _signInManager.PasswordSignInAsync(Input!.Email!, Input!.Password!, false, true);
02 · Capabilities

What the application does

12 capabilities identified, grouping 215 of the 218 distinct features extracted. These are descriptions, not the cited rules above.

Product Catalog

Browsing, searching, filtering, and administrative management of the product catalog including brands, types, and items.

  • Brands Cache Key Generation: Produces the cache key used to identify and look up the cached list of brands, enabling the brands listing feature to serve cached data.
  • Cache Key Generation: Generates deterministic cache keys for brands, catalog items, and types so that cached catalog data can be stored and retrieved consistently.
  • Cached Catalog Lookup: Provides catalog lookup data retrieval with client-side caching so that repeated lookups are served from a local cache.
  • Cached Data Retrieval: A generic caching capability that stores items with a creation timestamp and serves them back to consumers to avoid repeated lookups.
  • Catalog Brand Listing: Exposes an endpoint that returns the available catalog brands to callers.
  • Catalog Brand Management: Create and modify catalog brands identified by an id and name, including updating brand details.
  • Catalog Brands Listing: Provides the set of catalog brands in a response so clients can view or select available brands.
  • Catalog Browsing: Users browse the product catalog, where items are organized and filtered by brand and type.
  • Catalog Data Seeding: Populates the catalog store with preconfigured brands, product types, and items during application startup.
  • Catalog Filter Pagination: Applies a filter specification to produce a paginated view of catalog items.
  • Catalog Item Cache Key Generation: Generates a cache key for catalog items based on brand, type, and page index, enabling cached retrieval of catalog item results.
  • Catalog Item Collection Retrieval: Retrieves the collection of catalog items matching a specification.
  • Catalog Item Creation: Lets the user create a new catalog item with brand and type selections and add it to the catalog.
  • Catalog Item Deletion: Lets the user delete an existing catalog item from the catalog.
  • Catalog Item Details: Lets the user open and view the details of a single catalog item.
  • Catalog Item Details Editing: Edit a catalog item's descriptive and pricing details such as name, description, and price.
  • Catalog Item Display: Presents catalog item details—name, description, price, brand, type, and picture URI—to a user.
  • Catalog Item Editing: Lets the user modify an existing catalog item's details and save the changes.
  • Catalog Item Filtering: Allows callers to obtain a filtered or paged view of catalog items via a specification.
  • Catalog Item Image Upload: Lets a user attach an image to a catalog item, enforcing size and file-extension validity before converting it to base64.
  • Catalog Item Listing: Displays the catalog items (with their brands and types) in an admin page so the user can browse the catalog.
  • Catalog Item Management: Create, edit, delete, and retrieve individual catalog items.
  • Catalog Item Picture Management: Set or change the picture URI associated with a catalog item.
  • Catalog Item Picture Upload: Allows attaching an image to a catalog item by supplying either a base64 payload with a file name or a picture URI.
  • Catalog Item Retrieval: Fetch individual catalog items by id or list them, including paged listing.
  • Catalog Item Specification Matching: Provides a specification object that matches catalog items either against all catalog items or a specific set of catalog item identifiers.
  • Catalog Item Update: Allows a user to modify an existing catalog item and receive a response confirming the update.
  • Catalog Lookup Data Retrieval: Provides retrieval of catalog lookup data over HTTP for use by the admin UI.
  • Catalog Type Configuration: Configures the persistence mapping for catalog types so the catalog domain can be stored and retrieved.
  • Catalog Type Listing: Exposes a catalog-of-types listing endpoint that returns the set of catalog types to a client.
  • Catalog Type Management: Create and modify catalog types identified by an id and name, including updating type details.
  • Custom Schema Filtering: Applies caller-supplied inclusion and exclusion criteria, expressed against a schema and context, to filter items by custom schema properties.
  • Delete Catalog Item: Allows a user to remove an existing catalog item through the public API.
  • File Item Management: Represents and manages a file item with its metadata such as name, size, type, URL, and base64 content.
  • File Upload: Allows a user to supply a file for upload, represented by a view model carrying filename, base64 data, and URL.
  • Paged Catalog Item Browsing: Exposes a paged listing of catalog items via an API endpoint, letting clients browse the catalog in pages.
  • Paged Catalog Item Listing: Retrieve a paged list of catalog items, optionally filtered by catalog brand and type, with page index and page size controls.
  • Paginated Catalog Listing: Retrieves a page of catalog items, supporting parallel requests and correct pagination by page index.
  • Pagination Navigation: Provides paginated result navigation with page position, page size, total counts, and next/previous controls that users or clients observe and act on.
  • Product Catalog Browsing: Lets users browse products organized by catalog type and brand.
  • Product Catalog Filtering: Lets users filter the product listing via labeled filter controls with selectable options.
  • Product Image URI Composition: Composes product picture URIs from catalog settings so product images can be resolved and displayed.
  • Product Image Upload: Allows uploading a product image file with validation of its extension and size before acceptance.
  • Product Listing Home Page: The store's home page displays a product listing to visitors, verified by the FunctionalTests.WebRazorPages suite.
  • Update Catalog Item: Allows a user to submit changes to an existing catalog item's details, including name, description, price, picture, brand, and type.

Identity and Authentication

Authentication, credential handling, token issuance, and account lifecycle management across the system.

  • API Token Generation: Generates JWT API tokens for users, including admin and normal user variants, with role and user claims.
  • Account Lockout: Tracking and enforcement of the lockout state for a user account after failed access attempts.
  • Account Password Management: Users can change or set their account password from the account management page.
  • Authentication Claims Access: Exposes authenticated user identity and role information through claims and an authentication flag.
  • Authentication Mode Selection: Configures which authentication scheme (anonymous or Windows) the hosted application uses at launch.
  • Authentication Revocation: Revokes a user's authentication session, observed as signed-out or invalidated login state.
  • Authentication Status Check: Exposes whether the current user is authenticated along with their identity claims for consuming systems.
  • Change Password: Authenticated users can change their account password by supplying their current password and a new confirmed password.
  • Claim-Based Authorization: Attachment of typed claim values to users and roles to drive fine-grained authorization.
  • Claim-Based Identity Resolution: Resolves user identity attributes such as name and role from the configured claim types.
  • Claims-Based Identity: Support for reading and working with user identity claims in applications.
  • Default User Seeding: Bootstraps the application with preconfigured admin and default user accounts plus their roles.
  • Email Confirmation: Confirms a user's email address by processing a user id and confirmation code and updating the account via the user manager.
  • Email Confirmation Link Generation: Generates a URL that a user can click to confirm their email address, producing the confirmation link used in email confirmation flows.
  • Email Confirmation Sending: Sends a confirmation email containing a link to a recipient via a configured email sender.
  • Email Verification: Users receive verification emails and see status messages confirming the outcome of account operations.
  • External Login Linking: Association of third-party identity provider logins with local user accounts.
  • External Login Management: Lets a user view their linked external login providers and remove them.
  • External Login Providers: Linking user accounts to external identity providers and tracking provider display metadata.
  • Identity Area Hosting: Hosts the ASP.NET Identity area with its startup configuration that wires up identity-related routes and services.
  • Identity Scope Configuration: Configures authentication scope inclusion and Microsoft identity settings used for securing the application.
  • Identity Token Issuance: Produces an identity/security token that a caller can request and consume for authenticated access.
  • Principal Identity: Identification of the principal identity used for access.
  • Recovery Codes Display: Presents a user's account recovery codes for viewing and safekeeping.
  • Request Authentication Validation: Validates an authenticated principal on incoming requests so only properly authenticated users proceed.
  • Role-Based Access Control: Assignment of named roles to users so that authorization decisions can be made from role membership.
  • Sign In: Users authenticate through a sign-in screen and are granted a successful session when valid credentials are supplied.
  • Token Management: Provides access to the user's authentication token for downstream use.
  • Token Retrieval: Retrieves an authentication token for a given user identity.
  • Two-Factor Authentication: Enabling a second authentication factor for a user and storing the associated verification tokens.
  • Two-Factor Authentication Management: Users can set up, view, and manage two-factor authentication, including authenticator apps and recovery codes.
  • Two-Factor Authentication Status View: Displays the user's two-factor authentication state, including whether an authenticator is configured, whether 2FA is enabled, and how many recovery codes remain.
  • Two-Factor Authentication Tokens: Persistence of authentication tokens used for two-factor and token-based login flows.
  • Two-Factor Authenticator Setup: Enables a user to configure an authenticator app for two-factor authentication, providing the shared key, authenticator URI, and verification code.
  • Update Phone Number: Users can update the phone number on their account profile.
  • User Account Management: Identity infrastructure supporting user account representation and management for the application.
  • User Authentication: Authenticates a user from submitted username and password credentials.
  • User Authentication State: Provides the current user's authentication state and identity to the application.
  • User Claims: Storage and management of claims associated with individual users.
  • User Login: Authentication of a user via email/password credentials through the account login page, including external logins and optional remember-me.
  • User Logout: Allows an authenticated user to sign out of the application, performing sign-out cleanup on request handlers and caching logging state.
  • User Password Management: Management of the application user's password credential.
  • User Registration: New users can create an account by supplying email and password, providing it twice for confirmation, and are then signed in.

Order Management and Checkout

Placing, persisting, and viewing customer orders and their line items through checkout and order history flows.

  • Address Capture: Captures and represents a structured postal address composed of street, city, state, zip code, and country components.
  • Address Construction: Building an address by supplying field values with defaults.
  • Checkout: Capability to enter client information and complete an order checkout.
  • Checkout Initiation: Authenticated users can proceed from the basket to checkout, requiring sign-in and building a checkout model.
  • Customer Orders With Items Retrieval: Provides the ability to retrieve a customer's orders together with their line items, scoped to a specific buyer.
  • My Orders Display: Retrieves and displays the current user's orders for review.
  • Order Construction: Building an order through a fluent builder, including configuring its items, default values, and empty states.
  • Order Detail View: A dedicated section of the order UI where the details of a single order are displayed.
  • Order Details View: Allows a user to retrieve and view the details of a specific order by its identifier.
  • Order Details Viewing: Allows a signed-in user to retrieve and view the details of a specific past order.
  • Order Display: Presents a single order's details — order number, date, shipping address, total, and status — to the user.
  • Order Entity Configuration: Configures the persistence mapping for orders so order data can be stored and retrieved by the application.
  • Order History Display: Provides a view of a user's past orders on the order index page.
  • Order History Viewing: Users can view the list of their own orders through the MyOrders capability served by the order controller.
  • Order Item Capture: Represents a single line item in an order, recording the product, how many units were ordered, and the unit price at which it was taken.
  • Order Item Catalog Snapshot: Captures the ordered item's catalog identity, product name, and picture at the time of ordering so the order retains a point-in-time record of what was purchased.
  • Order Item Discount: Exposes the discount applied to an order line item.
  • Order Item Display: Presents a single line item's product details, quantity, unit price, and picture for display within an order.
  • Order Lookup With Line Items: Retrieves a single order together with its associated line items by order identifier.
  • Order Management: Handling of customer orders and their associated line items.
  • Order Management UI: A user-facing web interface for viewing and interacting with the list of a user's orders.
  • Order Placement: Enables users to submit an order with shipping address and ordered items.
  • Order Retrieval: Look up an existing order by identifier so the caller or system can observe its details.
  • Order Submission: Allows a user to place a new order through the order service by invoking create-order behaviour.
  • Order Test Data Construction: Builds orders with known contents so order retrieval behaviour can be exercised deterministically.
  • Successful Payment: Capability to complete payment for an order successfully.
  • Test Order Data Provisioning: Supplying sample buyer, catalog, product, and pricing data used to construct representative orders.

Application Configuration and Hosting

Startup wiring, environment-specific configuration, logging, and launch profiles for running the application.

  • .NET Build and Test in CI: A CI job that sets up the .NET SDK and builds and tests a .NET project within workflow steps.
  • .NET SDK Version Selection: Allows specifying the .NET SDK version and whether to include prerelease versions when setting up the environment.
  • Application Service Configuration: Enables setup and registration of application services and dependencies at startup, allowing the runtime to be configured for a specific environment or data store mode.
  • Azure Architecture Diagram Elements: A catalog of Azure resource types that users can place as icons/elements when drawing architecture diagrams.
  • Build Job Definition: Constructs a job composed of ordered steps for execution.
  • Container Image Build: Builds container images from provided Dockerfiles, build context, and environment settings.
  • Cookie Management: Allows reading and deleting browser cookies from the application.
  • Cookie Settings Configuration: Configures application cookie behavior, including the cookie identifier name and its validity period.
  • Countdown Timer: A countdown timer can be started and configured with a count value, then disposed.
  • Debug Launch Configuration: Provides debugger launch and attach configurations for .NET Core applications, including web server launch with environment and readiness detection.
  • Development Browser Launch: Configures whether and how a browser is launched and which URL is inspected when starting the application in development.
  • Environment Configuration: Provisioning of deployment parameters such as environment name and location.
  • Environment Variable Configuration: Sets application environment variables such as ASPNETCORE_ENVIRONMENT for the launched process.
  • JavaScript Interop: Enables Blazor components to invoke JavaScript at runtime for browser-level operations.
  • Lazy Instance Refresh: Supports refreshing a lazily-initialized instance when a refresh is requested.
  • Logging Configuration: Controls application log verbosity and log level settings exposed through configuration.
  • Manual Refresh Request: Allows a user or client to request a refresh that is tracked as a refresh request and broadcast to interested parties.
  • Package and Project Reference Resolution: Resolve external package dependencies and references to other projects so they participate in the build.
  • Pagination Navigation: Provides paginated result navigation with page position, page size, total counts, and next/previous controls that users or clients observe and act on.
  • Project Compilation: Compile one or more code projects, resolving their item groups and dependency relationships into a build.
  • Service Container Provisioning: Provisions and runs application service containers such as the public API, web MVC frontend, and SQL Server database.
  • Structured Application Logging: Application components emit informational and warning log messages through a shared logger abstraction.
  • Web App Launch Profile Configuration: Defines named launch profiles (e.g. IIS Express and BlazorAdmin) describing how the application is started, including application URL, SSL port, and environment configuration.
  • Web Application Configuration: Provides configuration wiring that enables the web application's authentication behaviors.
  • Web Service Registration: Registering the application's web services so they are available to clients and other systems.

Shopping Basket

Management of a shopper's basket across anonymous and authenticated sessions, including items, quantities, and transfer.

  • Add Item to Basket: Adds an item to a buyer's basket by retrieving the basket for the buyer and updating it with the new item.
  • Add to Cart Action: Provides a button to add a product to the cart, with a disabled state when unavailable.
  • Anonymous Basket Transfer: Merges an anonymous shopper's basket into their user basket on login, creating a user basket if needed and removing the anonymous one afterward.
  • Anonymous Basket Transfer on Login: Carries a guest user's anonymous basket over to their account when they authenticate.
  • Anonymous Cart Identification: Resolving an anonymous shopper's basket via a cookie-stored identifier.
  • Basket Checkout: Authenticated users can view their basket and proceed through checkout from the basket page.
  • Basket Construction: Building test basket instances for unit testing scenarios, including empty and single-item baskets with buyer and basket identifiers.
  • Basket Deletion: Deletes a buyer's shopping basket, with the service expected to delegate the delete operation to the basket repository exactly once.
  • Basket Display: Viewing the current shopping basket contents and item count in the UI.
  • Basket Item Addition: Adds an item to a shopping basket, including quantity defaults, incrementing existing items, and guarding against invalid quantities.
  • Basket Item Count: Provides the total number of items in a user's shopping basket.
  • Basket Item Management: Users can add and remove items from a basket, with the basket tracking its items and total item count.
  • Basket Item Quantity Management: Allows a user to set or increment the quantity of a catalog item held in a basket at a given unit price.
  • Basket Lookup: Retrieve and match baskets by basket identifier or buyer identifier, returning the matching basket collection when present and empty results otherwise.
  • Basket Management: Users can add items to a basket, set item quantities, and delete their basket.
  • Basket Quantity Management: Allows a user to set quantities for items in a shopping basket and have empty/zero quantities removed.
  • Basket Total Quantity: Computes and exposes the total number of items in a basket, including baskets containing multiple items.
  • Basket Transfer: An anonymous or existing basket is transferred to a user, preserving its contents across sessions.
  • Basket Update: Users can modify their basket contents (e.g. change quantities) which are persisted back to the basket service.
  • Basket with Items Query: A capability that returns a basket together with its line items, letting a caller observe a basket and its contained items as a single result.
  • Buyer Assignment: A basket can be associated with a specific buyer identity.
  • Remove Empty Basket Items: Capability to purge empty line items from a shopping basket, relied upon by the basket domain and validated by its unit tests.
  • Shopping Basket Display: Shows the user their shopping basket contents and the current item count in the UI.
  • Shopping Basket Management: Allows users to maintain a basket of items and quantities for later checkout.
  • Shopping Cart View: Displays the current user's basket contents with a success confirmation state.

Administrative Web UI

Blazor-based administrative front end with shared component library, navigation, notifications, and UI infrastructure.

  • Blazor Admin Application: A Blazor-based administrative front end that consumes the catalog, brand, and type services over HTTP.
  • Blazor Server Hosting Setup: Registers and boots the Blazor server application by wiring up the required Blazor services at startup, allowing users to reach the Blazor UI.
  • Blazor Shared Library: A shared Blazor component library project consumed by other projects to provide common UI and domain resources.
  • Body Overflow Control: Showing and hiding body overflow, typically for modal/dialog display control.
  • Code Container Display: Renders a styled code container with header, title, detail, and nested item sections that users can view and hover over.
  • Code Container Hover Interaction: Provides hover and alternating-row visual feedback for code container elements.
  • Code Container Item List: Presents a list of items inside a code container with hover highlighting and navigational links.
  • Component Initialization: Initializes the component when it is first rendered so its behavior is ready to use.
  • Component Refresh: Allows a component to trigger and perform a refresh of its displayed state.
  • Custom Select Input: A custom input select component that parses and binds user-provided string values for selection-based form input.
  • Data Element Sizing: Defines height variables used to size the data element presentation.
  • Error Details Reporting: Surfaces structured error information, including a message and status code, to a user or calling system.
  • Error Page Display: Renders a user-facing error page that shows the error request ID when available.
  • Manage Account Navigation: Renders the account management navigation menu with links to profile, password, external logins, and two-factor authentication pages.
  • Responsive Layout Adaptation: Adjusts presentation of the surrounding UI at narrower viewport widths via media query breakpoints.
  • Route Outside Display: Routes users to an external or outside route, triggering navigation away from the current view.
  • Route Outside Navigation: Navigating a user to a route outside the current application context.
  • Toast Notification Display: Displays transient toast messages to the user with configurable heading, message, icon, and background styling.
  • Toast Notifications: Users are shown transient toast messages at a given severity level and can dismiss them.
  • User Notification Feedback: Surfaces operation results to the user through toast notifications.

HTTP API Client and Routing

HTTP request/response handling, route registration, and base URL configuration that connects web clients to API endpoints.

  • Authorization Enforcement: The API rejects requests from tokens lacking sufficient privileges while allowing authorized admin requests.
  • Base URL Configuration: Defines the API and web base URLs and allowed hosts used to address and serve the application's endpoints.
  • Catalog Item Route Registration: Registers the HTTP route for catalog item endpoints so clients can reach the retrieval capability.
  • Endpoint Route Registration: Registers the HTTP route that exposes the catalog item endpoint to external callers.
  • Global Exception Handling: Catches unhandled exceptions during request processing and returns a coherent error response to the caller.
  • HTTP Request Operations: Provides typed GET, POST, PUT, and DELETE HTTP request capabilities against an API endpoint.
  • HTTP Response Deserialization: Converts raw HTTP response messages into typed .NET objects for callers.
  • HTTP Route Registration: Registers the catalog item creation endpoint on an HTTP route so clients can invoke it.
  • JSON Conversion: Convert objects to and from JSON text via extension helpers with configurable serialization options.
  • JSON Serialization: System.Text.Json integration enabling JSON (de)serialization of data exchanged with or exposed to users.
  • Picture URI Composition: Compose a fully qualified picture URI for a given picture, exposed as a URI composer capability.
  • Route Registration: Registers routes so that incoming requests are mapped to the appropriate handlers.
  • URI Composition: Composes resource URIs used when building responses for catalog item endpoints.
  • URL Slug Generation: Transforms URL route segments into lowercase hyphenated slugs for friendly, SEO-style routing.

Automated Testing

Integration and functional test hosting, fixtures, token retrieval, and web page testing utilities across the codebase.

  • Public API Integration Testing: Integration test harness that bootstraps the application and exercises public API endpoints with a new client.
  • Public API Test Hosting: Bootstraps an in-process test host for the public API so functional tests can exercise API endpoints against a configured environment.
  • Role-Based Test Token Retrieval: Obtain API tokens differentiated by admin and normal user roles for integration testing.
  • Test Collection Retrieval: A test collection can be retrieved for running the test suite.
  • Test Item Collection Retrieval: Retrieves a collection of test items, optionally validated against an expected item count.
  • Web Page Test Helpers: Helpers that let automated tests locate page elements by regex and extract page identifiers and anti-forgery verification tokens, supporting functional testing of the web UI.

Persistence and Data Store

Database schema provisioning, entity mapping configuration, and data access for the application's domain.

  • Connection String Configuration: Supplies database and service connection strings (catalog, identity) that the application uses to establish its backing connections.
  • Database Schema Migration: Defines and maintains the EF Core database schema through generated migration snapshots and models, enabling the application to create and evolve its persistence store.
  • Identity Schema Migration: Provision of up/down schema migrations that create and roll back the ASP.NET Identity tables.
  • Identity Schema Provisioning: Building and maintaining the persistence schema for identity-related entities.
  • Persistence Entity Configuration: Applies database mapping configuration for persisted entities so the application's data model is correctly stored and retrieved.
  • SQL Admin Credential Management: Management of the SQL administrator password credential.

Health Checks and Monitoring

Reachability probes for the application's services and pages, reporting availability to callers.

  • Home Page Health Check: A health check that verifies the application's home page is reachable by fetching its URL and inspecting the response.
  • Service Health Check: Exposes an HTTP health-check capability that probes a remote API endpoint and reports whether the service is reachable.

Payment Method Handling

Management and display of a buyer's stored payment methods used during checkout.

  • Buyer Payment Methods: A buyer's stored payment methods capability, exposing the buyer's identity and the collection of payment methods associated with them.
  • Payment Method Display: Surfaces stored payment method information such as card identifiers and last digits for display to the user.

Email Notification

Sending of email messages with recipients, subjects, and bodies to users.

  • Email Sending: A capability to send an email message with a recipient address, subject, and body via the email sender abstraction.
03 · Size

What was analyzed

  • C# · 254 files · 8,656 lines
  • SVG · 6 files · 4,266 lines
  • Razor · 59 files · 2,023 lines
  • CSS · 24 files · 659 lines
  • JSON · 22 files · 636 lines
  • SCSS · 9 files · 494 lines
  • MSBuild script · 10 files · 305 lines
  • Visual Studio Solution · 2 files · 207 lines
  • Markdown · 4 files · 205 lines
  • XML · 5 files · 171 lines
  • INI · 1 file · 144 lines
  • Other (3 languages) · 9 files · 116 lines

Whole repository: 459 files. cloc 2.06 counts 17,882 lines of code in 405 of them (20,707 lines with comments and blanks).

04 · Source

Where this came from

Extracted by CoreStory V3 (build 4470 with two small engine fixes) using DeepSeek-V4.1-Flash from the public repository at commit 4da8212 on 2026-11-15. Capability descriptions are from the same run.

Code excerpts are from the upstream repository and remain under its MIT license. CoreStory is not affiliated with or endorsed by the .NET architecture team at Microsoft.

Want this for your own codebase?

Talk to us about mapping the business rules in your repositories.

Talk to an expert