# dineshkadel/e_commerce-_website-about_-local-_mart architecture

> Architecture diagram of the GitHub repository dineshkadel/e_commerce-_website-about_-local-_mart, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dineshkadel/e_commerce-_website-about_-local-_mart
- Repository: https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart

## Overview

Sasto Bazaar is a PHP storefront and administration platform for local retail. Customers browse the catalog, inspect products and reviews, add items to a cart, check out, then view or cancel orders; account endpoints support registration and login. Store staff manage products, categories, users and order status through the admin area. The sampled pages show direct PDO access to MySQL and product-image uploads. Cart, checkout, account-history and several admin implementations were not sampled, so their documented roles are shown without speculative internal wiring; wishlist and payment integrations are not represented as implemented subsystems.

Main entry points: [`admin/dashboard.php`](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/admin/dashboard.php) (Admin Dashboard), [`public/auth.html`](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/auth.html) (Account Page), [`config/db.php`](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/config/db.php) (PDO Connection), [`public/index.php`](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/index.php) (Store Home)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Customer Storefront"]
  node_home["Store Home<br/>[index.php]"]
  node_catalog["Product Catalog<br/>[products.php]"]
  node_detail["Product Detail and Reviews<br/>[product.php]"]
  node_cartadd["Add to Cart<br/>[add-to-cart.php]"]
  node_cart["Shopping Cart<br/>[cart.php]"]
  node_checkout["Checkout<br/>[checkout.php]"]
  node_history["Order History<br/>[my-order.php]"]
  node_cancel["Cancel Order<br/>[cancel-order.php]"]
end

subgraph group_accounts["Accounts"]
  node_authui["Account Page<br/>[auth.html]"]
  node_login["Login API<br/>[login.php]"]
  node_register["Registration API<br/>[register.php]"]
  node_logout["Logout API<br/>[logout.php]"]
end

subgraph group_operations["Store Operations"]
  node_dashboard["Admin Dashboard<br/>[dashboard.php]"]
  node_productsadmin["Product Management"]
  node_categories["Category Management"]
  node_ordersadmin["Order Management<br/>[manage_orders.php]"]
  node_usersadmin["User Management<br/>[manage_users.php]"]
  node_adminauth["Admin Authorization<br/>[auth.php]"]
end

subgraph group_data["Data and Media"]
  node_dbconfig["PDO Connection<br/>[db.php]"]
  node_schema["Schema Definition<br/>[tables.php]"]
  node_database[("MySQL Store")]
  node_productimages["Product Images"]
end

node_customer(("Customer"))
node_staff(("Store Staff"))

node_customer -->|"opens"| node_home
node_home -->|"browses"| node_catalog
node_catalog -->|"opens product"| node_detail
node_detail -->|"adds item"| node_cartadd
node_cartadd -->|"updates cart"| node_cart
node_cart -->|"proceeds"| node_checkout
node_checkout -->|"places order"| node_history
node_history -->|"cancels order"| node_cancel
node_customer -->|"opens account"| node_authui
node_authui -->|"submits login"| node_login
node_authui -->|"submits registration"| node_register
node_authui -->|"requests logout"| node_logout
node_staff -->|"opens admin"| node_dashboard
node_dashboard -->|"manages products"| node_productsadmin
node_dashboard -->|"manages categories"| node_categories
node_dashboard -->|"manages orders"| node_ordersadmin
node_dashboard -->|"manages users"| node_usersadmin
node_productsadmin -->|"stores images"| node_productimages
node_home -->|"connects"| node_dbconfig
node_detail -->|"connects"| node_dbconfig
node_login -->|"connects"| node_dbconfig
node_register -->|"connects"| node_dbconfig
node_dbconfig -->|"opens connection"| node_database
node_schema -->|"creates tables"| node_database
node_home -->|"reads catalog and reviews"| node_database
node_detail -->|"reads product and reviews"| node_database
node_login -->|"reads user"| node_database
node_register -->|"writes user"| node_database
node_productsadmin -->|"manages products"| node_database
node_ordersadmin -->|"reads orders"| node_database
node_adminauth -->|"redirects unauthenticated"| node_authui

click node_home "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/index.php"
click node_catalog "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/products.php"
click node_detail "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/product.php"
click node_cartadd "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/add-to-cart.php"
click node_cart "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/cart.php"
click node_checkout "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/checkout.php"
click node_history "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/my-order.php"
click node_cancel "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/cancel-order.php"
click node_authui "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/auth.html"
click node_login "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/api/login.php"
click node_register "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/api/register.php"
click node_logout "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/api/logout.php"
click node_dashboard "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/admin/dashboard.php"
click node_productsadmin "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/admin/manage_products.php"
click node_categories "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/admin/manage_categories.php"
click node_ordersadmin "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/admin/manage_orders.php"
click node_usersadmin "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/admin/manage_users.php"
click node_adminauth "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/admin/includes/auth.php"
click node_dbconfig "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/config/db.php"
click node_schema "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/config/tables.php"
click node_productimages "https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/tree/main/upload/products"

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_catalog,node_detail,node_cartadd,node_cart,node_checkout,node_history,node_cancel toneBlue
class node_authui,node_login,node_register,node_logout toneAmber
class node_dashboard,node_productsadmin,node_categories,node_ordersadmin,node_usersadmin,node_adminauth toneMint
class node_dbconfig,node_schema,node_database,node_productimages toneRose
class node_customer,node_staff toneIndigo
```

## Components

### Customer Storefront

- [Store Home](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/index.php): `public/index.php`
- [Product Catalog](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/products.php): `public/products.php`
- [Product Detail and Reviews](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/product.php): `public/product.php`
- [Add to Cart](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/add-to-cart.php): `public/add-to-cart.php`
- [Shopping Cart](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/cart.php): `public/cart.php`
- [Checkout](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/checkout.php): `public/checkout.php`
- [Order History](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/my-order.php): `public/my-order.php`
- [Cancel Order](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/cancel-order.php): `public/cancel-order.php`

### Accounts

- [Account Page](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/auth.html): `public/auth.html`
- [Login API](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/api/login.php): `public/api/login.php`
- [Registration API](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/api/register.php): `public/api/register.php`
- [Logout API](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/public/api/logout.php): `public/api/logout.php`

### Store Operations

- [Admin Dashboard](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/admin/dashboard.php): `admin/dashboard.php`
- [Product Management](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/admin/manage_products.php): `admin/manage_products.php`
- [Category Management](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/admin/manage_categories.php): `admin/manage_categories.php`
- [Order Management](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/admin/manage_orders.php): `admin/manage_orders.php`
- [User Management](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/admin/manage_users.php): `admin/manage_users.php`
- [Admin Authorization](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/admin/includes/auth.php): `admin/includes/auth.php`

### Data and Media

- [PDO Connection](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/config/db.php): `config/db.php`
- [Schema Definition](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/blob/main/config/tables.php): `config/tables.php`
- **MySQL Store**
- [Product Images](https://github.com/dineshkadel/e_commerce-_website-about_-local-_mart/tree/main/upload/products): `upload/products`

### Other components

- **Customer**
- **Store Staff**

## Connections

- Customer → Store Home: opens
- Store Home → Product Catalog: browses
- Product Catalog → Product Detail and Reviews: opens product
- Product Detail and Reviews → Add to Cart: adds item
- Add to Cart → Shopping Cart: updates cart
- Shopping Cart → Checkout: proceeds
- Checkout → Order History: places order
- Order History → Cancel Order: cancels order
- Customer → Account Page: opens account
- Account Page → Login API: submits login
- Account Page → Registration API: submits registration
- Account Page → Logout API: requests logout
- Store Staff → Admin Dashboard: opens admin
- Admin Dashboard → Product Management: manages products
- Admin Dashboard → Category Management: manages categories
- Admin Dashboard → Order Management: manages orders
- Admin Dashboard → User Management: manages users
- Product Management → Product Images: stores images
- Store Home → PDO Connection: connects
- Product Detail and Reviews → PDO Connection: connects
- Login API → PDO Connection: connects
- Registration API → PDO Connection: connects
- PDO Connection → MySQL Store: opens connection
- Schema Definition → MySQL Store: creates tables
- Store Home → MySQL Store: reads catalog and reviews
- Product Detail and Reviews → MySQL Store: reads product and reviews
- Login API → MySQL Store: reads user
- Registration API → MySQL Store: writes user
- Product Management → MySQL Store: manages products
- Order Management → MySQL Store: reads orders
- Admin Authorization → Account Page: redirects unauthenticated
