# omar-khecharem/techzone-aspdotnes architecture

> Architecture diagram of the GitHub repository omar-khecharem/techzone-aspdotnes, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/omar-khecharem/techzone-aspdotnes
- Repository: https://github.com/omar-khecharem/techzone-aspdotnes

## Overview

TechZone is an ASP.NET Core storefront for browsing products, managing a cart, registering and maintaining an account, and placing and reviewing orders. The main buyer journey runs from catalog browsing through cart and checkout to order history; account management is a separate branch. The service layer handles catalog, cart, order, and account operations over an Entity Framework context. Edges are limited to relationships visible in the supplied excerpts or SOURCE INDEX; the README is empty, and the UI templates were not included.

Main entry points: [`Data/ApplicationDbContext.cs`](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Data/ApplicationDbContext.cs) (Application Context), [`Program.cs`](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Program.cs) (Application Setup), [`Services/ProductService.cs`](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Services/ProductService.cs) (Product Service), [`Controllers/OrderController.cs`](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Controllers/OrderController.cs) (Checkout & Orders)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Storefront"]
  node_home["Home &amp; Catalog<br/>[HomeController.cs]"]
  node_product["Product Details"]
  node_category_nav["Category Navigation"]
  node_cart_ui["Cart<br/>[CartController.cs]"]
  node_order_ui["Checkout &amp; Orders<br/>[OrderController.cs]"]
  node_account_ui["Account"]
  node_site_js["Storefront Scripts<br/>[site.js]"]
end

subgraph group_services["Commerce Services"]
  node_product_service["Product Service<br/>[ProductService.cs]"]
  node_cart_service["Cart Service<br/>[CartService.cs]"]
  node_order_service["Order Service<br/>[OrderService.cs]"]
  node_app_setup["Application Setup<br/>[Program.cs]"]
end

subgraph group_identity["Accounts"]
  node_account_service["Account Service<br/>[AccountService.cs]"]
  node_identity_errors["Identity Errors"]
end

subgraph group_data["Commerce Data"]
  node_context["Application Context"]
  node_users["Users<br/>[ApplicationUser.cs]"]
  node_catalog_data["Products &amp; Categories<br/>[Product.cs]"]
  node_cart_data["Cart &amp; Items<br/>[Cart.cs]"]
  node_order_data["Orders &amp; Items<br/>[Order.cs]"]
  node_database[("Application Database")]
  node_seeder["Catalog Seeder<br/>[DbSeeder.cs]"]
end

node_shopper(("Shopper"))

node_shopper -->|"browses"| node_home
node_shopper -->|"views"| node_product
node_shopper -->|"manages cart"| node_cart_ui
node_shopper -->|"checks out"| node_order_ui
node_shopper -->|"manages account"| node_account_ui
node_home -->|"requests catalog"| node_product_service
node_product -->|"requests products"| node_product_service
node_category_nav -->|"requests categories"| node_product_service
node_cart_ui -->|"updates cart"| node_cart_service
node_order_ui -->|"reads cart"| node_cart_service
node_order_ui -->|"places and reads orders"| node_order_service
node_order_ui -->|"reads account"| node_account_service
node_account_ui -->|"manages profile"| node_account_service
node_product_service -->|"queries catalog"| node_context
node_cart_service -->|"reads and writes cart"| node_context
node_order_service -->|"reads and writes orders"| node_context
node_account_service -->|"manages user"| node_users
node_context -->|"maps entities"| node_catalog_data
node_context -->|"maps entities"| node_cart_data
node_context -->|"maps entities"| node_order_data
node_context -->|"maps identity"| node_users
node_context -.->|"persists data"| node_database
node_app_setup -->|"configures"| node_context
node_app_setup -->|"registers service"| node_product_service
node_app_setup -->|"registers service"| node_cart_service
node_app_setup -->|"registers service"| node_order_service
node_app_setup -->|"registers service"| node_account_service
node_seeder -->|"seeds catalog"| node_context

click node_home "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Controllers/HomeController.cs"
click node_product "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Controllers/ProductController.cs"
click node_category_nav "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/ViewComponents/CategoryNavViewComponent.cs"
click node_cart_ui "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Controllers/CartController.cs"
click node_order_ui "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Controllers/OrderController.cs"
click node_account_ui "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Controllers/AccountController.cs"
click node_site_js "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/wwwroot/js/site.js"
click node_product_service "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Services/ProductService.cs"
click node_cart_service "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Services/CartService.cs"
click node_order_service "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Services/OrderService.cs"
click node_account_service "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Services/AccountService.cs"
click node_identity_errors "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Services/FrenchIdentityErrorDescriber.cs"
click node_context "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Data/ApplicationDbContext.cs"
click node_users "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Models/ApplicationUser.cs"
click node_catalog_data "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Models/Product.cs"
click node_cart_data "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Models/Cart.cs"
click node_order_data "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Models/Order.cs"
click node_app_setup "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Program.cs"
click node_seeder "https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Data/DbSeeder.cs"

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_home,node_product,node_category_nav,node_cart_ui,node_order_ui,node_account_ui,node_site_js toneBlue
class node_product_service,node_cart_service,node_order_service,node_app_setup toneAmber
class node_account_service,node_identity_errors toneMint
class node_context,node_users,node_catalog_data,node_cart_data,node_order_data,node_database,node_seeder toneRose
class node_shopper toneIndigo
```

## Components

### Storefront

- [Home & Catalog](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Controllers/HomeController.cs): `Controllers/HomeController.cs`
- [Product Details](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Controllers/ProductController.cs): `Controllers/ProductController.cs`
- [Category Navigation](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/ViewComponents/CategoryNavViewComponent.cs): `ViewComponents/CategoryNavViewComponent.cs`
- [Cart](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Controllers/CartController.cs): `Controllers/CartController.cs`
- [Checkout & Orders](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Controllers/OrderController.cs): `Controllers/OrderController.cs`
- [Account](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Controllers/AccountController.cs): `Controllers/AccountController.cs`
- [Storefront Scripts](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/wwwroot/js/site.js): `wwwroot/js/site.js`

### Commerce Services

- [Product Service](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Services/ProductService.cs): `Services/ProductService.cs`
- [Cart Service](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Services/CartService.cs): `Services/CartService.cs`
- [Order Service](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Services/OrderService.cs): `Services/OrderService.cs`
- [Application Setup](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Program.cs): `Program.cs`

### Accounts

- [Account Service](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Services/AccountService.cs): `Services/AccountService.cs`
- [Identity Errors](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Services/FrenchIdentityErrorDescriber.cs): `Services/FrenchIdentityErrorDescriber.cs`

### Commerce Data

- [Application Context](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Data/ApplicationDbContext.cs): `Data/ApplicationDbContext.cs`
- [Users](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Models/ApplicationUser.cs): `Models/ApplicationUser.cs`
- [Products & Categories](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Models/Product.cs): `Models/Product.cs`
- [Cart & Items](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Models/Cart.cs): `Models/Cart.cs`
- [Orders & Items](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Models/Order.cs): `Models/Order.cs`
- **Application Database**
- [Catalog Seeder](https://github.com/omar-khecharem/techzone-aspdotnes/blob/main/Data/DbSeeder.cs): `Data/DbSeeder.cs`

### Other components

- **Shopper**

## Connections

- Shopper → Home & Catalog: browses
- Shopper → Product Details: views
- Shopper → Cart: manages cart
- Shopper → Checkout & Orders: checks out
- Shopper → Account: manages account
- Home & Catalog → Product Service: requests catalog (evidence: `Controllers/HomeController.cs`)
- Product Details → Product Service: requests products (evidence: `Controllers/ProductController.cs`)
- Category Navigation → Product Service: requests categories (evidence: `ViewComponents/CategoryNavViewComponent.cs`)
- Cart → Cart Service: updates cart (evidence: `Controllers/CartController.cs`)
- Checkout & Orders → Cart Service: reads cart (evidence: `Controllers/OrderController.cs`)
- Checkout & Orders → Order Service: places and reads orders (evidence: `Controllers/OrderController.cs`)
- Checkout & Orders → Account Service: reads account (evidence: `Controllers/OrderController.cs`)
- Account → Account Service: manages profile (evidence: `Controllers/AccountController.cs`)
- Product Service → Application Context: queries catalog (evidence: `Services/ProductService.cs`)
- Cart Service → Application Context: reads and writes cart (evidence: `Services/CartService.cs`)
- Order Service → Application Context: reads and writes orders (evidence: `Services/OrderService.cs`)
- Account Service → Users: manages user (evidence: `Services/AccountService.cs`)
- Application Context → Products & Categories: maps entities (evidence: `Data/ApplicationDbContext.cs`)
- Application Context → Cart & Items: maps entities (evidence: `Data/ApplicationDbContext.cs`)
- Application Context → Orders & Items: maps entities (evidence: `Data/ApplicationDbContext.cs`)
- Application Context → Users: maps identity (evidence: `Data/ApplicationDbContext.cs`)
- Application Context → Application Database: persists data
- Application Setup → Application Context: configures (evidence: `Program.cs`)
- Application Setup → Product Service: registers service (evidence: `Program.cs`)
- Application Setup → Cart Service: registers service (evidence: `Program.cs`)
- Application Setup → Order Service: registers service (evidence: `Program.cs`)
- Application Setup → Account Service: registers service (evidence: `Program.cs`)
- Catalog Seeder → Application Context: seeds catalog (evidence: `Data/DbSeeder.cs`)
