# karthikayan-m/eshopmodernizing architecture

> Architecture diagram of the GitHub repository karthikayan-m/eshopmodernizing, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/karthikayan-m/eshopmodernizing
- Repository: https://github.com/karthikayan-m/eshopmodernizing

## Overview

#### Purpose and top-level entry points
This is a lift-and-shift modernization sample for three .NET Framework catalog-management applications: ASP.NET MVC, ASP.NET Web Forms, and WinForms backed by WCF. Legacy and containerized variants coexist to demonstrate deployment without redesigning application code. Local orchestration starts at `build.cmd`, `docker-compose.yml`, and `docker-compose.override.yml`.

#### Application variants
The legacy implementations are separate Visual Studio solutions:
- MVC: `eShopLegacyMVCSolution/eShopLegacyMVC.sln`
- Web Forms: `eShopLegacyWebFormsSolution/eShopLegacyWebForms.sln`
- N-tier WCF/WinForms: `eShopLegacyNTier/eShopLegacyNTier.sln`

Modernized equivalents retain these application architectures while adding container, Azure, identity, telemetry, and cloud-storage integration:
- `eShopModernizedMVCSolution/eShopModernizedMVC.sln`
- `eShopModernizedWebFormsSolution/eShopModernizedWebForms.sln`
- `eShopModernizedNTier/eShopModernizedNTier.sln`

#### MVC catalog application
The modernized MVC app is an IIS-hosted ASP.NET MVC CRUD site. ASP.NET startup and HTTP pipeline entry points are `eShopModernizedMVCSolution/src/eShopModernizedMVC/Global.asax.cs` and `eShopModernizedMVCSolution/src/eShopModernizedMVC/Startup.cs`. Catalog requests pass through `Controllers/CatalogController.cs`, service abstractions/implementations, then EF-backed catalog models:
- `eShopModernizedMVCSolution/src/eShopModernizedMVC/Controllers/CatalogController.cs`
- `eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/CatalogService.cs`
- `eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/CatalogDBContext.cs`

#### Web Forms catalog application
The Web Forms app provides the same catalog CRUD domain through `.aspx` pages and code-behind. Its process/pipeline starts in `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Global.asax.cs`; catalog editing is centered in `Catalog/*.aspx.cs`, backed by the same service-to-Entity Framework pattern:
- `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Default.aspx.cs`
- `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Catalog/Edit.aspx.cs`
- `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Models/CatalogDBContext.cs`

#### N-tier desktop/service boundary
The N-tier sample separates a WinForms client from a SOAP/WCF catalog service. The desktop executable begins at `eShopModernizedNTier/src/eShopWinForms/Program.cs`, uses generated service-reference code, and delegates catalog operations to the WCF service endpoint. The service contract/endpoint and persistence model form the remote boundary:
- `eShopModernizedNTier/src/eShopWinForms/Connected Services/eShopServiceReference/Reference.cs`
- `eShopModernizedNTier/src/eShopWCFService/CatalogService.svc.cs`
- `eShopModernizedNTier/src/eShopWCFService/EntityModel.cs`

#### Data, identity, images, and observability
The catalog domain consists of items, brands, and types, persisted in SQL Server; initial data and HiLo SQL sequences are included with each web app. The modernized web apps can switch service implementations to mocks when SQL is unavailable. They add optional Azure Key Vault configuration, Azure SQL token support, Azure Blob image storage, Application Insights telemetry, and authentication middleware:
- `eShopModernizedMVCSolution/src/eShopModernizedMVC/App_Start/OptionalKeyVaultConfigurationBuilder.cs`
- `eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ImageAzureStorage.cs`
- `eShopModernizedMVCSolution/src/eShopModernizedMVC/Middleware/AuthenticationMiddleware.cs`

#### Container build and local runtime
Each modernized server-side application has a Windows-container Dockerfile; solution-level Compose files define the multi-container topology of MVC, Web Forms, WCF, and SQL Server. The root compose stack exposes the applications on host ports while services communicate over the internal Docker network:
- `eShopModernizedMVCSolution/src/eShopModernizedMVC/Dockerfile`
- `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Dockerfile`
- `eShopModernizedNTier/src/eShopWCFService/Dockerfile`

#### Deployment targets
Deployment descriptors package the same containerized workloads for Azure Container Instances, Windows Server VMs, Kubernetes/AKS, and Service Fabric. Kubernetes manifests define service/deployment topology, while Service Fabric application manifests wrap individual MVC, Web Forms, and SQL container packages:
- `ACI/aci.json`
- `Kubernetes/eShopModernizedMVC-K8s/ServiceDeployments/eshop-modernized-mvc-k8s-services-deployment.yml`
- `ServiceFabric/eShopModernizedMVC-ServiceFabricApp/ApplicationPackageRoot/ApplicationManifest.xml`

Main entry points: [`docker-compose.yml`](https://github.com/karthikayan-m/eshopmodernizing/blob/master/docker-compose.yml) (Compose stack), [`eShopModernizedMVCSolution/src/eShopModernizedMVC/Dockerfile`](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Dockerfile) (Windows container images), [`eShopModernizedMVCSolution/src/eShopModernizedMVC/Startup.cs`](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Startup.cs) (MVC HTTP startup), [`eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/CatalogService.cs`](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/CatalogService.cs) (Catalog service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_local["Local build &amp; runtime"]
  node_build["Build script<br/>orchestrator<br/>[build.cmd]"]
  node_compose["Compose stack<br/>container orchestration<br/>[docker-compose.yml]"]
  node_containers["Windows container images<br/>application packaging"]
end

subgraph group_mvc["Modernized MVC"]
  node_mvc_startup["MVC HTTP startup<br/>ASP.NET MVC host<br/>[Startup.cs]"]
  node_mvc_catalog["Catalog controller<br/>MVC request handler"]
  node_mvc_service["Catalog service<br/>domain service<br/>[CatalogService.cs]"]
  node_mvc_db[("MVC catalog context<br/>Entity Framework context")]
  node_mvc_images["Blob image storage<br/>Azure Blob adapter"]
  node_mvc_auth["Authentication middleware<br/>identity middleware"]
end

subgraph group_webforms["Modernized Web Forms"]
  node_web_startup["Web Forms pipeline<br/>ASP.NET Web Forms host<br/>[Global.asax.cs]"]
  node_web_catalog["Catalog edit pages<br/>Web Forms code-behind<br/>[Edit.aspx.cs]"]
  node_web_db[("Web Forms catalog context<br/>Entity Framework context")]
end

subgraph group_ntier["Modernized N-tier"]
  node_winforms["WinForms client<br/>desktop application<br/>[Program.cs]"]
  node_wcf_proxy["Generated WCF proxy<br/>service reference<br/>[Reference.cs]"]
  node_wcf_service["WCF catalog service<br/>SOAP service endpoint"]
  node_wcf_model[("WCF entity model<br/>persistence model<br/>[EntityModel.cs]")]
end

subgraph group_cloud["Shared platform services"]
  node_sql[("SQL Server catalog<br/>catalog database")]
  node_keyvault["Azure Key Vault<br/>optional configuration source"]
  node_observability["Application Insights<br/>telemetry"]
end

subgraph group_deploy["Deployment targets"]
  node_kubernetes{{"Kubernetes / AKS<br/>container deployment"}}
  node_aci{{"Azure Container Instances<br/>container deployment<br/>[aci.json]"}}
  node_servicefabric{{"Service Fabric<br/>container deployment"}}
end

node_legacy["Legacy .NET Framework apps<br/>reference implementations<br/>[eShopLegacyMVC.sln]"]

node_build -->|"starts"| node_compose
node_containers -->|"runs as"| node_compose
node_compose -->|"hosts"| node_mvc_startup
node_compose -->|"hosts"| node_web_startup
node_compose -->|"hosts"| node_wcf_service
node_mvc_startup -->|"applies"| node_mvc_auth
node_mvc_auth -->|"authorizes"| node_mvc_catalog
node_mvc_catalog -->|"uses"| node_mvc_service
node_mvc_service -->|"persists through"| node_mvc_db
node_mvc_db -->|"stores in"| node_sql
node_mvc_service -->|"manages images"| node_mvc_images
node_web_startup -->|"routes to"| node_web_catalog
node_web_catalog -->|"persists through"| node_web_db
node_web_db -->|"stores in"| node_sql
node_winforms -->|"uses"| node_wcf_proxy
node_wcf_proxy -->|"SOAP calls"| node_wcf_service
node_wcf_service -->|"uses"| node_wcf_model
node_wcf_model -->|"stores in"| node_sql
node_keyvault -.->|"optional config"| node_mvc_startup
node_mvc_startup -.->|"emits telemetry"| node_observability
node_containers -->|"deploys to"| node_aci
node_containers -->|"deploys to"| node_kubernetes
node_containers -->|"packages for"| node_servicefabric

click node_build "https://github.com/karthikayan-m/eshopmodernizing/blob/master/build.cmd"
click node_compose "https://github.com/karthikayan-m/eshopmodernizing/blob/master/docker-compose.yml"
click node_legacy "https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopLegacyMVCSolution/eShopLegacyMVC.sln"
click node_mvc_startup "https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Startup.cs"
click node_mvc_catalog "https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Controllers/CatalogController.cs"
click node_mvc_service "https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/CatalogService.cs"
click node_mvc_db "https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/CatalogDBContext.cs"
click node_mvc_images "https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ImageAzureStorage.cs"
click node_mvc_auth "https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Middleware/AuthenticationMiddleware.cs"
click node_web_startup "https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Global.asax.cs"
click node_web_catalog "https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Catalog/Edit.aspx.cs"
click node_web_db "https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Models/CatalogDBContext.cs"
click node_winforms "https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedNTier/src/eShopWinForms/Program.cs"
click node_wcf_proxy "https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedNTier/src/eShopWinForms/Connected%20Services/eShopServiceReference/Reference.cs"
click node_wcf_service "https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedNTier/src/eShopWCFService/CatalogService.svc.cs"
click node_wcf_model "https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedNTier/src/eShopWCFService/EntityModel.cs"
click node_keyvault "https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/App_Start/OptionalKeyVaultConfigurationBuilder.cs"
click node_containers "https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Dockerfile"
click node_kubernetes "https://github.com/karthikayan-m/eshopmodernizing/blob/master/Kubernetes/eShopModernizedMVC-K8s/ServiceDeployments/eshop-modernized-mvc-k8s-services-deployment.yml"
click node_aci "https://github.com/karthikayan-m/eshopmodernizing/blob/master/ACI/aci.json"
click node_servicefabric "https://github.com/karthikayan-m/eshopmodernizing/blob/master/ServiceFabric/eShopModernizedMVC-ServiceFabricApp/ApplicationPackageRoot/ApplicationManifest.xml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_build,node_compose,node_containers toneBlue
class node_mvc_startup,node_mvc_catalog,node_mvc_service,node_mvc_db,node_mvc_images,node_mvc_auth toneAmber
class node_web_startup,node_web_catalog,node_web_db toneMint
class node_winforms,node_wcf_proxy,node_wcf_service,node_wcf_model toneRose
class node_sql,node_keyvault,node_observability toneIndigo
class node_kubernetes,node_aci,node_servicefabric toneTeal
class node_legacy toneNeutral
```

## Components

### Local build & runtime

- [Build script](https://github.com/karthikayan-m/eshopmodernizing/blob/master/build.cmd): orchestrator · `build.cmd`
- [Compose stack](https://github.com/karthikayan-m/eshopmodernizing/blob/master/docker-compose.yml): container orchestration · Runs MVC, Web Forms, WCF, and SQL containers on an internal network. · `docker-compose.yml`
- [Windows container images](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Dockerfile): application packaging · Built separately for MVC, Web Forms, and WCF server workloads. · `eShopModernizedMVCSolution/src/eShopModernizedMVC/Dockerfile`

### Modernized MVC

- [MVC HTTP startup](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Startup.cs): ASP.NET MVC host · `eShopModernizedMVCSolution/src/eShopModernizedMVC/Startup.cs`
- [Catalog controller](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Controllers/CatalogController.cs): MVC request handler · `eShopModernizedMVCSolution/src/eShopModernizedMVC/Controllers/CatalogController.cs`
- [Catalog service](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/CatalogService.cs): domain service · `eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/CatalogService.cs`
- [MVC catalog context](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/CatalogDBContext.cs): Entity Framework context · `eShopModernizedMVCSolution/src/eShopModernizedMVC/Models/CatalogDBContext.cs`
- [Blob image storage](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ImageAzureStorage.cs): Azure Blob adapter · `eShopModernizedMVCSolution/src/eShopModernizedMVC/Services/ImageAzureStorage.cs`
- [Authentication middleware](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/Middleware/AuthenticationMiddleware.cs): identity middleware · `eShopModernizedMVCSolution/src/eShopModernizedMVC/Middleware/AuthenticationMiddleware.cs`

### Modernized Web Forms

- [Web Forms pipeline](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Global.asax.cs): ASP.NET Web Forms host · `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Global.asax.cs`
- [Catalog edit pages](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Catalog/Edit.aspx.cs): Web Forms code-behind · `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Catalog/Edit.aspx.cs`
- [Web Forms catalog context](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Models/CatalogDBContext.cs): Entity Framework context · `eShopModernizedWebFormsSolution/src/eShopModernizedWebForms/Models/CatalogDBContext.cs`

### Modernized N-tier

- [WinForms client](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedNTier/src/eShopWinForms/Program.cs): desktop application · `eShopModernizedNTier/src/eShopWinForms/Program.cs`
- [Generated WCF proxy](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedNTier/src/eShopWinForms/Connected%20Services/eShopServiceReference/Reference.cs): service reference · `eShopModernizedNTier/src/eShopWinForms/Connected Services/eShopServiceReference/Reference.cs`
- [WCF catalog service](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedNTier/src/eShopWCFService/CatalogService.svc.cs): SOAP service endpoint · `eShopModernizedNTier/src/eShopWCFService/CatalogService.svc.cs`
- [WCF entity model](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedNTier/src/eShopWCFService/EntityModel.cs): persistence model · `eShopModernizedNTier/src/eShopWCFService/EntityModel.cs`

### Shared platform services

- **SQL Server catalog**: catalog database · Stores catalog items, brands, types, and HiLo sequences.
- [Azure Key Vault](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopModernizedMVCSolution/src/eShopModernizedMVC/App_Start/OptionalKeyVaultConfigurationBuilder.cs): optional configuration source · `eShopModernizedMVCSolution/src/eShopModernizedMVC/App_Start/OptionalKeyVaultConfigurationBuilder.cs`
- **Application Insights**: telemetry

### Deployment targets

- [Kubernetes / AKS](https://github.com/karthikayan-m/eshopmodernizing/blob/master/Kubernetes/eShopModernizedMVC-K8s/ServiceDeployments/eshop-modernized-mvc-k8s-services-deployment.yml): container deployment · `Kubernetes/eShopModernizedMVC-K8s/ServiceDeployments/eshop-modernized-mvc-k8s-services-deployment.yml`
- [Azure Container Instances](https://github.com/karthikayan-m/eshopmodernizing/blob/master/ACI/aci.json): container deployment · `ACI/aci.json`
- [Service Fabric](https://github.com/karthikayan-m/eshopmodernizing/blob/master/ServiceFabric/eShopModernizedMVC-ServiceFabricApp/ApplicationPackageRoot/ApplicationManifest.xml): container deployment · `ServiceFabric/eShopModernizedMVC-ServiceFabricApp/ApplicationPackageRoot/ApplicationManifest.xml`

### Other components

- [Legacy .NET Framework apps](https://github.com/karthikayan-m/eshopmodernizing/blob/master/eShopLegacyMVCSolution/eShopLegacyMVC.sln): reference implementations · MVC, Web Forms, and N-tier solutions coexist with their modernized variants. · `eShopLegacyMVCSolution/eShopLegacyMVC.sln`

## Connections

- Build script → Compose stack: starts
- Windows container images → Compose stack: runs as
- Compose stack → MVC HTTP startup: hosts
- Compose stack → Web Forms pipeline: hosts
- Compose stack → WCF catalog service: hosts
- MVC HTTP startup → Authentication middleware: applies
- Authentication middleware → Catalog controller: authorizes
- Catalog controller → Catalog service: uses
- Catalog service → MVC catalog context: persists through
- MVC catalog context → SQL Server catalog: stores in
- Catalog service → Blob image storage: manages images
- Web Forms pipeline → Catalog edit pages: routes to
- Catalog edit pages → Web Forms catalog context: persists through
- Web Forms catalog context → SQL Server catalog: stores in
- WinForms client → Generated WCF proxy: uses
- Generated WCF proxy → WCF catalog service: SOAP calls
- WCF catalog service → WCF entity model: uses
- WCF entity model → SQL Server catalog: stores in
- Azure Key Vault → MVC HTTP startup: optional config
- MVC HTTP startup → Application Insights: emits telemetry
- Windows container images → Azure Container Instances: deploys to
- Windows container images → Kubernetes / AKS: deploys to
- Windows container images → Service Fabric: packages for
