# greydelta/shoe-ecommerce-website architecture

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

- Interactive diagram: https://gitdiagram.com/greydelta/shoe-ecommerce-website
- Repository: https://github.com/greydelta/shoe-ecommerce-website

## Overview

Urban Shoes is a PHP/MySQL shoe storefront for guests, members, and admins. The primary shopping flow is product discovery in the catalog, opening a product detail, adding items to a cart, and reviewing the cart; the README also describes size selection, discounts, and delivery fees. Separate branches cover login/signup, admin product CRUD, and informational pages. The graph uses excerpted calls and links plus SOURCE INDEX references and README capabilities; unsampled modules are represented only where the tree or README identifies them, so some relationships remain unverified.

Main entry points: [`db_config.php`](https://github.com/greydelta/shoe-ecommerce-website/blob/main/db_config.php) (DB Configuration), [`session.php`](https://github.com/greydelta/shoe-ecommerce-website/blob/main/session.php) (Session Context), [`cart.php`](https://github.com/greydelta/shoe-ecommerce-website/blob/main/cart.php) (Shopping Cart), [`maindashboard.php`](https://github.com/greydelta/shoe-ecommerce-website/blob/main/maindashboard.php) (Catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Shopping"]
  node_catalog["Catalog<br/>[maindashboard.php]"]
  node_category["Category Listings<br/>[men.php]"]
  node_product["Product Detail<br/>[product.php]"]
  node_cart["Shopping Cart<br/>[cart.php]"]
  node_remove["Remove Cart Item"]
end

subgraph group_identity["Accounts"]
  node_login["Sign In<br/>[login.php]"]
  node_login_action["Login Handler<br/>[loginScript.php]"]
  node_signup["Sign Up<br/>[signup.php]"]
  node_signup_action["Signup Handler<br/>[signUpScript.php]"]
  node_session["Session Context<br/>[session.php]"]
end

subgraph group_admin["Product Admin"]
  node_dashboard["Admin Dashboard<br/>[maindashboard.php]"]
  node_manage["Manage Products<br/>[manageProducts.php]"]
  node_add_form["Add Product Form<br/>[addProducts.php]"]
  node_add_action["Add Product Handler"]
  node_update_form["Update Product Form<br/>[updateProducts.php]"]
  node_update_action["Update Product Handler"]
  node_delete_action["Delete Product Handler"]
end

subgraph group_content["Information"]
  node_info["Help and About<br/>[faq.php]"]
  node_contact["Contact Page<br/>[contactus.php]"]
  node_blog["Footwear Blog<br/>[blog.php]"]
end

subgraph group_runtime["Runtime and Data"]
  node_db_config["DB Configuration<br/>[db_config.php]"]
  node_database[("Urban Shoes DB<br/>[urbanshoes.sql]")]
  node_debug["Shared Helpers<br/>[debug.php]"]
end

node_visitor(("Shopper"))

node_visitor -->|"browses"| node_catalog
node_catalog -->|"opens item"| node_product
node_visitor -->|"browses category"| node_category
node_product -.->|"adds item"| node_cart
node_visitor -->|"reviews cart"| node_cart
node_cart -->|"links removal"| node_remove
node_visitor -->|"signs in"| node_login
node_login -->|"submits"| node_login_action
node_visitor -->|"registers"| node_signup
node_signup -->|"submits"| node_signup_action
node_login_action -->|"connects"| node_db_config
node_signup_action -->|"connects"| node_db_config
node_catalog -->|"loads context"| node_session
node_product -->|"loads context"| node_session
node_cart -->|"loads context"| node_session
node_session -->|"connects"| node_db_config
node_session -->|"logs status"| node_debug
node_visitor -->|"admin access"| node_manage
node_manage -.->|"links management"| node_add_form
node_add_form -->|"submits"| node_add_action
node_update_form -->|"submits"| node_update_action
node_add_action -->|"connects"| node_db_config
node_update_action -->|"connects"| node_db_config
node_delete_action -->|"connects"| node_db_config
node_visitor -->|"reads help"| node_info
node_visitor -->|"contacts shop"| node_contact
node_visitor -->|"reads articles"| node_blog
node_db_config -.->|"configures access"| node_database

click node_catalog "https://github.com/greydelta/shoe-ecommerce-website/blob/main/maindashboard.php"
click node_category "https://github.com/greydelta/shoe-ecommerce-website/blob/main/men.php"
click node_product "https://github.com/greydelta/shoe-ecommerce-website/blob/main/product.php"
click node_cart "https://github.com/greydelta/shoe-ecommerce-website/blob/main/cart.php"
click node_remove "https://github.com/greydelta/shoe-ecommerce-website/blob/main/removeProductFromCart.php"
click node_login "https://github.com/greydelta/shoe-ecommerce-website/blob/main/login.php"
click node_login_action "https://github.com/greydelta/shoe-ecommerce-website/blob/main/loginScript.php"
click node_signup "https://github.com/greydelta/shoe-ecommerce-website/blob/main/signup.php"
click node_signup_action "https://github.com/greydelta/shoe-ecommerce-website/blob/main/signUpScript.php"
click node_session "https://github.com/greydelta/shoe-ecommerce-website/blob/main/session.php"
click node_dashboard "https://github.com/greydelta/shoe-ecommerce-website/blob/main/maindashboard.php"
click node_manage "https://github.com/greydelta/shoe-ecommerce-website/blob/main/manageProducts.php"
click node_add_form "https://github.com/greydelta/shoe-ecommerce-website/blob/main/addProducts.php"
click node_add_action "https://github.com/greydelta/shoe-ecommerce-website/blob/main/addProductsScript.php"
click node_update_form "https://github.com/greydelta/shoe-ecommerce-website/blob/main/updateProducts.php"
click node_update_action "https://github.com/greydelta/shoe-ecommerce-website/blob/main/updateProductsScript.php"
click node_delete_action "https://github.com/greydelta/shoe-ecommerce-website/blob/main/deleteProductsScript.php"
click node_info "https://github.com/greydelta/shoe-ecommerce-website/blob/main/faq.php"
click node_contact "https://github.com/greydelta/shoe-ecommerce-website/blob/main/contactus.php"
click node_blog "https://github.com/greydelta/shoe-ecommerce-website/blob/main/blog.php"
click node_db_config "https://github.com/greydelta/shoe-ecommerce-website/blob/main/db_config.php"
click node_database "https://github.com/greydelta/shoe-ecommerce-website/blob/main/database/urbanshoes.sql"
click node_debug "https://github.com/greydelta/shoe-ecommerce-website/blob/main/debug.php"

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_category,node_product,node_cart,node_remove toneBlue
class node_login,node_login_action,node_signup,node_signup_action,node_session toneAmber
class node_dashboard,node_manage,node_add_form,node_add_action,node_update_form,node_update_action,node_delete_action toneMint
class node_info,node_contact,node_blog toneRose
class node_db_config,node_database,node_debug,node_visitor toneIndigo
```

## Components

### Shopping

- [Catalog](https://github.com/greydelta/shoe-ecommerce-website/blob/main/maindashboard.php): `maindashboard.php`
- [Category Listings](https://github.com/greydelta/shoe-ecommerce-website/blob/main/men.php): `men.php`
- [Product Detail](https://github.com/greydelta/shoe-ecommerce-website/blob/main/product.php): `product.php`
- [Shopping Cart](https://github.com/greydelta/shoe-ecommerce-website/blob/main/cart.php): `cart.php`
- [Remove Cart Item](https://github.com/greydelta/shoe-ecommerce-website/blob/main/removeProductFromCart.php): `removeProductFromCart.php`

### Accounts

- [Sign In](https://github.com/greydelta/shoe-ecommerce-website/blob/main/login.php): `login.php`
- [Login Handler](https://github.com/greydelta/shoe-ecommerce-website/blob/main/loginScript.php): `loginScript.php`
- [Sign Up](https://github.com/greydelta/shoe-ecommerce-website/blob/main/signup.php): `signup.php`
- [Signup Handler](https://github.com/greydelta/shoe-ecommerce-website/blob/main/signUpScript.php): `signUpScript.php`
- [Session Context](https://github.com/greydelta/shoe-ecommerce-website/blob/main/session.php): `session.php`

### Product Admin

- [Admin Dashboard](https://github.com/greydelta/shoe-ecommerce-website/blob/main/maindashboard.php): `maindashboard.php`
- [Manage Products](https://github.com/greydelta/shoe-ecommerce-website/blob/main/manageProducts.php): `manageProducts.php`
- [Add Product Form](https://github.com/greydelta/shoe-ecommerce-website/blob/main/addProducts.php): `addProducts.php`
- [Add Product Handler](https://github.com/greydelta/shoe-ecommerce-website/blob/main/addProductsScript.php): `addProductsScript.php`
- [Update Product Form](https://github.com/greydelta/shoe-ecommerce-website/blob/main/updateProducts.php): `updateProducts.php`
- [Update Product Handler](https://github.com/greydelta/shoe-ecommerce-website/blob/main/updateProductsScript.php): `updateProductsScript.php`
- [Delete Product Handler](https://github.com/greydelta/shoe-ecommerce-website/blob/main/deleteProductsScript.php): `deleteProductsScript.php`

### Information

- [Help and About](https://github.com/greydelta/shoe-ecommerce-website/blob/main/faq.php): `faq.php`
- [Contact Page](https://github.com/greydelta/shoe-ecommerce-website/blob/main/contactus.php): `contactus.php`
- [Footwear Blog](https://github.com/greydelta/shoe-ecommerce-website/blob/main/blog.php): `blog.php`

### Runtime and Data

- [DB Configuration](https://github.com/greydelta/shoe-ecommerce-website/blob/main/db_config.php): `db_config.php`
- [Urban Shoes DB](https://github.com/greydelta/shoe-ecommerce-website/blob/main/database/urbanshoes.sql): `database/urbanshoes.sql`
- [Shared Helpers](https://github.com/greydelta/shoe-ecommerce-website/blob/main/debug.php): `debug.php`

### Other components

- **Shopper**

## Connections

- Shopper → Catalog: browses (evidence: `README.md`)
- Catalog → Product Detail: opens item (evidence: `maindashboard.php`)
- Shopper → Category Listings: browses category (evidence: `README.md`)
- Product Detail → Shopping Cart: adds item (evidence: `README.md`)
- Shopper → Shopping Cart: reviews cart (evidence: `README.md`)
- Shopping Cart → Remove Cart Item: links removal (evidence: `cart.php`)
- Shopper → Sign In: signs in (evidence: `README.md`)
- Sign In → Login Handler: submits (evidence: `login.php`)
- Shopper → Sign Up: registers (evidence: `README.md`)
- Sign Up → Signup Handler: submits (evidence: `signup.php`)
- Login Handler → DB Configuration: connects (evidence: `loginScript.php`)
- Signup Handler → DB Configuration: connects (evidence: `signUpScript.php`)
- Catalog → Session Context: loads context (evidence: `maindashboard.php`)
- Product Detail → Session Context: loads context (evidence: `product.php`)
- Shopping Cart → Session Context: loads context (evidence: `cart.php`)
- Session Context → DB Configuration: connects (evidence: `session.php`)
- Session Context → Shared Helpers: logs status (evidence: `session.php`)
- Shopper → Manage Products: admin access (evidence: `README.md`)
- Manage Products → Add Product Form: links management
- Add Product Form → Add Product Handler: submits (evidence: `addProducts.php`)
- Update Product Form → Update Product Handler: submits (evidence: `updateProducts.php`)
- Add Product Handler → DB Configuration: connects (evidence: `addProductsScript.php`)
- Update Product Handler → DB Configuration: connects (evidence: `updateProductsScript.php`)
- Delete Product Handler → DB Configuration: connects (evidence: `deleteProductsScript.php`)
- Shopper → Help and About: reads help (evidence: `README.md`)
- Shopper → Contact Page: contacts shop (evidence: `README.md`)
- Shopper → Footwear Blog: reads articles (evidence: `README.md`)
- DB Configuration → Urban Shoes DB: configures access
