# saikiran155/techcart architecture

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

- Interactive diagram: https://gitdiagram.com/saikiran155/techcart
- Repository: https://github.com/saikiran155/techcart

## Overview

Techcart is an ASP.NET Core MVC storefront with product browsing and administration, account/role management, a cart, and order checkout. The main customer workflow is browsing products, adding items to a cart, then creating an order and viewing payment success; the excerpts show these actions but no external payment provider. The graph includes the shared EF Core store and principal domain models. Source excerpts do not establish every view binding or runtime configuration detail, so those relationships are omitted where not directly visible.

Main entry points: [`WebApplication2/Data/AppIdentityDbContext.cs`](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Data/AppIdentityDbContext.cs) (Application database), [`WebApplication2/Program.cs`](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Program.cs) (App startup), [`WebApplication2/Controllers/OrderController.cs`](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Controllers/OrderController.cs) (Order checkout), [`WebApplication2/Controllers/HomeController.cs`](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Controllers/HomeController.cs) (Catalog home)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry and setup"]
  node_startup["App startup<br/>[Program.cs]"]
  node_errormodel["Error view data<br/>[ErrorViewModel.cs]"]
end

subgraph group_identity["Accounts and access"]
  node_accounts["Account actions"]
  node_registermodel["Registration input"]
  node_loginmodel["Login input<br/>[LoginViewModel.cs]"]
end

subgraph group_commerce["Storefront and checkout"]
  node_home["Catalog home<br/>[HomeController.cs]"]
  node_products["Product management"]
  node_cart["Cart actions<br/>[CartController.cs]"]
  node_orders["Order checkout<br/>[OrderController.cs]"]
end

subgraph group_domain["Domain and persistence"]
  node_productmodel["Product entity<br/>[Product.cs]"]
  node_cartmodel["Cart entity<br/>[Cart.cs]"]
  node_ordermodel["Order entity<br/>[Order.cs]"]
  node_orderitem["Order line entity<br/>[OrderItem.cs]"]
  node_database[("Application database")]
end

node_visitor(("Shopper or admin"))
node_sqlserver[("SQL Server")]

node_visitor -->|"requests pages"| node_startup
node_startup -->|"routes requests"| node_home
node_startup -->|"configures context"| node_database
node_startup -->|"uses connection"| node_sqlserver
node_startup -->|"sets login route"| node_accounts
node_home -->|"reads products"| node_database
node_home -->|"filters products"| node_productmodel
node_home -->|"creates error data"| node_errormodel
node_products -->|"manages products"| node_database
node_products -->|"creates and updates"| node_productmodel
node_cart -->|"reads and writes"| node_database
node_cart -->|"updates cart items"| node_cartmodel
node_orders -->|"saves order data"| node_database
node_orders -->|"reads and clears cart"| node_cartmodel
node_orders -->|"creates and retrieves"| node_ordermodel
node_orders -->|"creates order lines"| node_orderitem
node_accounts -->|"accepts registration"| node_registermodel
node_accounts -->|"accepts credentials"| node_loginmodel
node_ordermodel -->|"contains lines"| node_orderitem
node_database -->|"stores products"| node_productmodel
node_database -->|"stores carts"| node_cartmodel
node_database -->|"stores orders"| node_ordermodel

click node_startup "https://github.com/saikiran155/techcart/blob/master/WebApplication2/Program.cs"
click node_home "https://github.com/saikiran155/techcart/blob/master/WebApplication2/Controllers/HomeController.cs"
click node_products "https://github.com/saikiran155/techcart/blob/master/WebApplication2/Controllers/ProductController.cs"
click node_cart "https://github.com/saikiran155/techcart/blob/master/WebApplication2/Controllers/CartController.cs"
click node_orders "https://github.com/saikiran155/techcart/blob/master/WebApplication2/Controllers/OrderController.cs"
click node_accounts "https://github.com/saikiran155/techcart/blob/master/WebApplication2/Controllers/AccountController.cs"
click node_registermodel "https://github.com/saikiran155/techcart/blob/master/WebApplication2/Models/RegisterViewModel.cs"
click node_loginmodel "https://github.com/saikiran155/techcart/blob/master/WebApplication2/Models/LoginViewModel.cs"
click node_productmodel "https://github.com/saikiran155/techcart/blob/master/WebApplication2/Models/Product.cs"
click node_cartmodel "https://github.com/saikiran155/techcart/blob/master/WebApplication2/Models/Cart.cs"
click node_ordermodel "https://github.com/saikiran155/techcart/blob/master/WebApplication2/Models/Order.cs"
click node_orderitem "https://github.com/saikiran155/techcart/blob/master/WebApplication2/Models/OrderItem.cs"
click node_errormodel "https://github.com/saikiran155/techcart/blob/master/WebApplication2/Models/ErrorViewModel.cs"
click node_database "https://github.com/saikiran155/techcart/blob/master/WebApplication2/Data/AppIdentityDbContext.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_startup,node_errormodel toneBlue
class node_accounts,node_registermodel,node_loginmodel,node_sqlserver toneAmber
class node_home,node_products,node_cart,node_orders toneMint
class node_productmodel,node_cartmodel,node_ordermodel,node_orderitem,node_database toneRose
class node_visitor toneIndigo
```

## Components

### Web entry and setup

- [App startup](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Program.cs): `WebApplication2/Program.cs`
- [Error view data](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Models/ErrorViewModel.cs): `WebApplication2/Models/ErrorViewModel.cs`

### Accounts and access

- [Account actions](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Controllers/AccountController.cs): `WebApplication2/Controllers/AccountController.cs`
- [Registration input](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Models/RegisterViewModel.cs): `WebApplication2/Models/RegisterViewModel.cs`
- [Login input](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Models/LoginViewModel.cs): `WebApplication2/Models/LoginViewModel.cs`

### Storefront and checkout

- [Catalog home](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Controllers/HomeController.cs): `WebApplication2/Controllers/HomeController.cs`
- [Product management](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Controllers/ProductController.cs): `WebApplication2/Controllers/ProductController.cs`
- [Cart actions](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Controllers/CartController.cs): `WebApplication2/Controllers/CartController.cs`
- [Order checkout](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Controllers/OrderController.cs): `WebApplication2/Controllers/OrderController.cs`

### Domain and persistence

- [Product entity](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Models/Product.cs): `WebApplication2/Models/Product.cs`
- [Cart entity](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Models/Cart.cs): `WebApplication2/Models/Cart.cs`
- [Order entity](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Models/Order.cs): `WebApplication2/Models/Order.cs`
- [Order line entity](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Models/OrderItem.cs): `WebApplication2/Models/OrderItem.cs`
- [Application database](https://github.com/saikiran155/techcart/blob/master/WebApplication2/Data/AppIdentityDbContext.cs): `WebApplication2/Data/AppIdentityDbContext.cs`

### Other components

- **Shopper or admin**
- **SQL Server**

## Connections

- Shopper or admin → App startup: requests pages (evidence: `WebApplication2/Program.cs`)
- App startup → Catalog home: routes requests (evidence: `WebApplication2/Program.cs`)
- App startup → Application database: configures context (evidence: `WebApplication2/Program.cs`)
- App startup → SQL Server: uses connection (evidence: `WebApplication2/Program.cs`)
- App startup → Account actions: sets login route (evidence: `WebApplication2/Program.cs`)
- Catalog home → Application database: reads products (evidence: `WebApplication2/Controllers/HomeController.cs`)
- Catalog home → Product entity: filters products (evidence: `WebApplication2/Controllers/HomeController.cs`)
- Catalog home → Error view data: creates error data (evidence: `WebApplication2/Controllers/HomeController.cs`)
- Product management → Application database: manages products (evidence: `WebApplication2/Controllers/ProductController.cs`)
- Product management → Product entity: creates and updates (evidence: `WebApplication2/Controllers/ProductController.cs`)
- Cart actions → Application database: reads and writes (evidence: `WebApplication2/Controllers/CartController.cs`)
- Cart actions → Cart entity: updates cart items (evidence: `WebApplication2/Controllers/CartController.cs`)
- Order checkout → Application database: saves order data (evidence: `WebApplication2/Controllers/OrderController.cs`)
- Order checkout → Cart entity: reads and clears cart (evidence: `WebApplication2/Controllers/OrderController.cs`)
- Order checkout → Order entity: creates and retrieves (evidence: `WebApplication2/Controllers/OrderController.cs`)
- Order checkout → Order line entity: creates order lines (evidence: `WebApplication2/Controllers/OrderController.cs`)
- Account actions → Registration input: accepts registration (evidence: `WebApplication2/Controllers/AccountController.cs`)
- Account actions → Login input: accepts credentials (evidence: `WebApplication2/Controllers/AccountController.cs`)
- Order entity → Order line entity: contains lines (evidence: `WebApplication2/Models/Order.cs`)
- Application database → Product entity: stores products (evidence: `WebApplication2/Data/AppIdentityDbContext.cs`)
- Application database → Cart entity: stores carts (evidence: `WebApplication2/Data/AppIdentityDbContext.cs`)
- Application database → Order entity: stores orders (evidence: `WebApplication2/Data/AppIdentityDbContext.cs`)
