# st10356476/khumalo-craft-emporium architecture

> Architecture diagram of the GitHub repository st10356476/khumalo-craft-emporium, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/st10356476/khumalo-craft-emporium
- Repository: https://github.com/st10356476/khumalo-craft-emporium

## Overview

Khumalo Craft Emporium is an ASP.NET Core Razor Pages storefront. Visitors browse the craft catalog, select items, and proceed through checkout to an order confirmation; separate pages support account registration/login, contact, and administration. The sampled checkout and catalog handlers are available, while several other page handlers are only named in the source index or tree, so their links are shown only where README-described workflow supports them and are marked unverified. SQL-backed admin and client listing code is sampled, but no general persistence layer or payment gateway is established; payment is documented as future work.

Main entry points: [`Khumalo_Craft_Emporium/Program.cs`](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Program.cs) (Razor Pages App), [`Khumalo_Craft_Emporium/Pages/Checkout.cshtml.cs`](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Checkout.cshtml.cs) (Checkout), [`Khumalo_Craft_Emporium/Pages/CraftsWorks.cshtml.cs`](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/CraftsWorks.cshtml.cs) (Craft Catalog), [`Khumalo_Craft_Emporium/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js`](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js) (Form Validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_catalog["Craft Catalog"]
  node_home["Home Page<br/>[Index.cshtml.cs]"]
  node_craftowner["Craft Owner"]
  node_contact["Contact<br/>[Contact.cshtml.cs]"]
  node_about["About Page<br/>[About.cshtml.cs]"]
end

subgraph group_purchase["Purchase Flow"]
  node_checkout["Checkout<br/>[Checkout.cshtml.cs]"]
  node_confirmation["Order Confirmation"]
end

subgraph group_accounts["Accounts"]
  node_register["Registration<br/>[Register.cshtml.cs]"]
  node_login["Login<br/>[Login.cshtml.cs]"]
end

subgraph group_operations["Administration"]
  node_admin["Admin Console"]
  node_clients["Client Listing"]
  node_sql[("SQL Server")]
end

subgraph group_platform["Web Platform"]
  node_app["Razor Pages App<br/>[Program.cs]"]
  node_layout["Shared Layout<br/>[_Layout.cshtml]"]
  node_validation["Form Validation"]
  node_privacy["Privacy Page<br/>[Privacy.cshtml.cs]"]
  node_error["Error Page<br/>[Error.cshtml.cs]"]
end

node_visitor(("Shopper"))

node_visitor -->|"requests pages"| node_app
node_app -->|"routes pages"| node_home
node_app -->|"routes pages"| node_catalog
node_visitor -.->|"browses crafts"| node_catalog
node_catalog -.->|"selects for purchase"| node_checkout
node_visitor -.->|"submits checkout"| node_checkout
node_checkout -.->|"completes order"| node_confirmation
node_visitor -.->|"creates account"| node_register
node_visitor -.->|"signs in"| node_login
node_visitor -.->|"sends inquiry"| node_contact
node_visitor -.->|"views artisans"| node_craftowner
node_visitor -.->|"views information"| node_about
node_visitor -.->|"views policy"| node_privacy
node_app -->|"routes pages"| node_admin
node_admin -->|"reads and inserts"| node_sql
node_clients -->|"reads users"| node_sql
node_app -->|"routes pages"| node_login
node_app -->|"handles exceptions"| node_error
node_app -.->|"serves shared UI"| node_layout
node_validation -.->|"validates forms"| node_register
node_validation -.->|"validates forms"| node_checkout

click node_app "https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Program.cs"
click node_catalog "https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/CraftsWorks.cshtml.cs"
click node_home "https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Index.cshtml.cs"
click node_craftowner "https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/CraftworkOwner.cshtml.cs"
click node_checkout "https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Checkout.cshtml.cs"
click node_confirmation "https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/OrderConfirmation.cshtml.cs"
click node_register "https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Register.cshtml.cs"
click node_login "https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Login.cshtml.cs"
click node_admin "https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/AdminPage.cshtml.cs"
click node_clients "https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/ViewClients.cshtml.cs"
click node_contact "https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Contact.cshtml.cs"
click node_layout "https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Shared/_Layout.cshtml"
click node_validation "https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"
click node_about "https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/About.cshtml.cs"
click node_privacy "https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Privacy.cshtml.cs"
click node_error "https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Error.cshtml.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_catalog,node_home,node_craftowner,node_contact,node_about toneBlue
class node_checkout,node_confirmation toneAmber
class node_register,node_login toneMint
class node_admin,node_clients,node_sql toneRose
class node_app,node_layout,node_validation,node_privacy,node_error,node_visitor toneIndigo
```

## Components

### Storefront

- [Craft Catalog](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/CraftsWorks.cshtml.cs): `Khumalo_Craft_Emporium/Pages/CraftsWorks.cshtml.cs`
- [Home Page](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Index.cshtml.cs): `Khumalo_Craft_Emporium/Pages/Index.cshtml.cs`
- [Craft Owner](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/CraftworkOwner.cshtml.cs): `Khumalo_Craft_Emporium/Pages/CraftworkOwner.cshtml.cs`
- [Contact](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Contact.cshtml.cs): `Khumalo_Craft_Emporium/Pages/Contact.cshtml.cs`
- [About Page](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/About.cshtml.cs): `Khumalo_Craft_Emporium/Pages/About.cshtml.cs`

### Purchase Flow

- [Checkout](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Checkout.cshtml.cs): `Khumalo_Craft_Emporium/Pages/Checkout.cshtml.cs`
- [Order Confirmation](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/OrderConfirmation.cshtml.cs): `Khumalo_Craft_Emporium/Pages/OrderConfirmation.cshtml.cs`

### Accounts

- [Registration](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Register.cshtml.cs): `Khumalo_Craft_Emporium/Pages/Register.cshtml.cs`
- [Login](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Login.cshtml.cs): `Khumalo_Craft_Emporium/Pages/Login.cshtml.cs`

### Administration

- [Admin Console](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/AdminPage.cshtml.cs): `Khumalo_Craft_Emporium/Pages/AdminPage.cshtml.cs`
- [Client Listing](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/ViewClients.cshtml.cs): `Khumalo_Craft_Emporium/Pages/ViewClients.cshtml.cs`
- **SQL Server**

### Web Platform

- [Razor Pages App](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Program.cs): `Khumalo_Craft_Emporium/Program.cs`
- [Shared Layout](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Shared/_Layout.cshtml): `Khumalo_Craft_Emporium/Pages/Shared/_Layout.cshtml`
- [Form Validation](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js): `Khumalo_Craft_Emporium/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js`
- [Privacy Page](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Privacy.cshtml.cs): `Khumalo_Craft_Emporium/Pages/Privacy.cshtml.cs`
- [Error Page](https://github.com/st10356476/khumalo-craft-emporium/blob/main/Khumalo_Craft_Emporium/Pages/Error.cshtml.cs): `Khumalo_Craft_Emporium/Pages/Error.cshtml.cs`

### Other components

- **Shopper**

## Connections

- Shopper → Razor Pages App: requests pages (evidence: `Khumalo_Craft_Emporium/Program.cs`)
- Razor Pages App → Home Page: routes pages (evidence: `Khumalo_Craft_Emporium/Program.cs`)
- Razor Pages App → Craft Catalog: routes pages (evidence: `Khumalo_Craft_Emporium/Program.cs`)
- Shopper → Craft Catalog: browses crafts (evidence: `README.md`)
- Craft Catalog → Checkout: selects for purchase (evidence: `README.md`)
- Shopper → Checkout: submits checkout (evidence: `README.md`)
- Checkout → Order Confirmation: completes order (evidence: `README.md`)
- Shopper → Registration: creates account
- Shopper → Login: signs in
- Shopper → Contact: sends inquiry (evidence: `README.md`)
- Shopper → Craft Owner: views artisans
- Shopper → About Page: views information
- Shopper → Privacy Page: views policy
- Razor Pages App → Admin Console: routes pages (evidence: `Khumalo_Craft_Emporium/Program.cs`)
- Admin Console → SQL Server: reads and inserts (evidence: `Khumalo_Craft_Emporium/Pages/AdminPage.cshtml.cs`)
- Client Listing → SQL Server: reads users (evidence: `Khumalo_Craft_Emporium/Pages/ViewClients.cshtml.cs`)
- Razor Pages App → Login: routes pages (evidence: `Khumalo_Craft_Emporium/Program.cs`)
- Razor Pages App → Error Page: handles exceptions (evidence: `Khumalo_Craft_Emporium/Program.cs`)
- Razor Pages App → Shared Layout: serves shared UI
- Form Validation → Registration: validates forms
- Form Validation → Checkout: validates forms
