# artcodecreator/almas-clothing-brand architecture

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

- Interactive diagram: https://gitdiagram.com/artcodecreator/almas-clothing-brand
- Repository: https://github.com/artcodecreator/almas-clothing-brand

## Overview

Almas Clothing Brand is a PHP/MySQL apparel storefront with customer shopping and an administrator back office. The customer journey runs from browsing and filtering products through cart management, coupon application, COD checkout, and order tracking; account, wishlist, reviews, and support are additional capabilities. Administrators manage products, orders, users, couriers, coupons, reviews, analytics, and messages. The graph combines documented capabilities with sampled call/include evidence; several feature implementations were not sampled, so their internal links are omitted.

Main entry points: [`ACB/includes/db.php`](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/includes/db.php) (Database Connection), [`ACB/index.php`](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/index.php) (Home and Featured), [`ACB/admin/manage_orders.php`](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/manage_orders.php) (Order Management), [`ACB/user/shop.php`](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/shop.php) (Product Catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Home and Featured<br/>[index.php]"]
  node_catalog["Product Catalog<br/>[shop.php]"]
  node_product["Product Details"]
end

subgraph group_purchase["Shopping and Orders"]
  node_cart["Cart Management<br/>[cart.php]"]
  node_cart_actions["Cart Actions<br/>[add_to_cart.php]"]
  node_coupon["Coupon Application<br/>[apply_coupon.php]"]
  node_checkout["COD Checkout<br/>[checkout.php]"]
  node_orders["Order History<br/>[orders.php]"]
  node_tracking["Order Tracking<br/>[track_order.php]"]
end

subgraph group_accounts["Accounts and Support"]
  node_identity["Registration and Login<br/>[register.php]"]
  node_profile["Profile Management<br/>[profile.php]"]
  node_wishlist["Wishlist<br/>[wishlist.php]"]
  node_chat_api["Chat API<br/>[chat_api.php]"]
  node_chat_widget["Customer Chat Widget<br/>[chat_widget.php]"]
end

subgraph group_admin["Administration"]
  node_reviews["Review Moderation"]
  node_admin_products["Product Management"]
  node_admin_orders["Order Management<br/>[manage_orders.php]"]
  node_order_detail["Order Details<br/>[order_details.php]"]
  node_couriers["Courier Management"]
  node_coupons_admin["Coupon Management<br/>[manage_coupons.php]"]
  node_users_admin["User Management<br/>[manage_users.php]"]
  node_analytics["Financial Analytics"]
  node_dashboard["Admin Dashboard<br/>[dashboard.php]"]
  node_admin_chat["Admin Live Chat<br/>[chat.php]"]
end

subgraph group_platform["Shared Platform"]
  node_db_config["Database Connection<br/>[db.php]"]
  node_database[("MySQL Store")]
  node_header["Shared Header<br/>[header.php]"]
  node_footer["Shared Footer<br/>[footer.php]"]
  node_config["URL and Asset Helpers<br/>[config.php]"]
end

node_customer(("Customer"))
node_admin_actor(("Administrator"))

node_customer -->|"opens storefront"| node_home
node_customer -->|"browses and filters"| node_catalog
node_customer -->|"views details"| node_product
node_customer -->|"registers or logs in"| node_identity
node_customer -->|"manages cart"| node_cart
node_customer -->|"applies discount"| node_coupon
node_customer -->|"places COD order"| node_checkout
node_customer -->|"views history"| node_orders
node_customer -->|"tracks order"| node_tracking
node_customer -->|"manages profile"| node_profile
node_customer -->|"uses wishlist"| node_wishlist
node_customer -->|"submits reviews"| node_reviews
node_admin_actor -->|"views overview"| node_dashboard
node_admin_actor -->|"manages products"| node_admin_products
node_admin_actor -->|"manages orders"| node_admin_orders
node_admin_actor -->|"inspects order"| node_order_detail
node_admin_actor -->|"assigns couriers"| node_couriers
node_admin_actor -->|"manages coupons"| node_coupons_admin
node_admin_actor -->|"manages users"| node_users_admin
node_admin_actor -->|"moderates reviews"| node_reviews
node_admin_actor -->|"views reports"| node_analytics
node_admin_actor -->|"handles support chat"| node_admin_chat
node_home -->|"links to shop"| node_catalog
node_home -->|"posts add request"| node_cart_actions
node_footer -->|"includes widget"| node_chat_widget
node_chat_widget -->|"sends and fetches"| node_chat_api
node_db_config -->|"opens connection"| node_database
node_header -->|"loads helpers"| node_config
node_home -->|"queries products"| node_db_config
node_catalog -->|"queries catalog"| node_db_config
node_checkout -->|"reads products and writes orders"| node_db_config
node_chat_api -->|"reads and writes messages"| node_db_config
node_admin_orders -->|"links order details"| node_order_detail
node_dashboard -->|"loads shared database"| node_db_config
node_admin_products -->|"loads shared database"| node_db_config
node_admin_orders -->|"loads shared database"| node_db_config
node_order_detail -->|"queries order data"| node_db_config
node_analytics -->|"loads shared database"| node_db_config
node_couriers -->|"loads shared database"| node_db_config
node_coupons_admin -->|"loads shared database"| node_db_config
node_users_admin -->|"loads shared database"| node_db_config
node_reviews -->|"queries review records"| node_db_config
node_admin_chat -->|"loads shared database"| node_db_config

click node_home "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/index.php"
click node_catalog "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/shop.php"
click node_product "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/product_details.php"
click node_cart "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/cart.php"
click node_cart_actions "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/add_to_cart.php"
click node_coupon "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/apply_coupon.php"
click node_checkout "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/checkout.php"
click node_orders "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/orders.php"
click node_tracking "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/track_order.php"
click node_identity "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/register.php"
click node_profile "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/profile.php"
click node_wishlist "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/wishlist.php"
click node_reviews "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/moderate_reviews.php"
click node_admin_products "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/manage_products.php"
click node_admin_orders "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/manage_orders.php"
click node_order_detail "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/order_details.php"
click node_couriers "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/manage_couriers.php"
click node_coupons_admin "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/manage_coupons.php"
click node_users_admin "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/manage_users.php"
click node_analytics "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/financial_analytics.php"
click node_dashboard "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/dashboard.php"
click node_admin_chat "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/chat.php"
click node_chat_api "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/ajax/chat_api.php"
click node_chat_widget "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/includes/chat_widget.php"
click node_db_config "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/includes/db.php"
click node_header "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/includes/header.php"
click node_footer "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/includes/footer.php"
click node_config "https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/config/config.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_home,node_catalog,node_product toneBlue
class node_cart,node_cart_actions,node_coupon,node_checkout,node_orders,node_tracking toneAmber
class node_identity,node_profile,node_wishlist,node_chat_api,node_chat_widget toneMint
class node_reviews,node_admin_products,node_admin_orders,node_order_detail,node_couriers,node_coupons_admin,node_users_admin,node_analytics,node_dashboard,node_admin_chat toneRose
class node_db_config,node_database,node_header,node_footer,node_config,node_customer,node_admin_actor toneIndigo
```

## Components

### Storefront

- [Home and Featured](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/index.php): `ACB/index.php`
- [Product Catalog](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/shop.php): `ACB/user/shop.php`
- [Product Details](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/product_details.php): `ACB/user/product_details.php`

### Shopping and Orders

- [Cart Management](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/cart.php): `ACB/user/cart.php`
- [Cart Actions](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/add_to_cart.php): `ACB/user/add_to_cart.php`
- [Coupon Application](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/apply_coupon.php): `ACB/user/apply_coupon.php`
- [COD Checkout](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/checkout.php): `ACB/user/checkout.php`
- [Order History](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/orders.php): `ACB/user/orders.php`
- [Order Tracking](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/track_order.php): `ACB/user/track_order.php`

### Accounts and Support

- [Registration and Login](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/register.php): `ACB/user/register.php`
- [Profile Management](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/profile.php): `ACB/user/profile.php`
- [Wishlist](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/user/wishlist.php): `ACB/user/wishlist.php`
- [Chat API](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/ajax/chat_api.php): `ACB/ajax/chat_api.php`
- [Customer Chat Widget](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/includes/chat_widget.php): `ACB/includes/chat_widget.php`

### Administration

- [Review Moderation](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/moderate_reviews.php): `ACB/admin/moderate_reviews.php`
- [Product Management](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/manage_products.php): `ACB/admin/manage_products.php`
- [Order Management](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/manage_orders.php): `ACB/admin/manage_orders.php`
- [Order Details](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/order_details.php): `ACB/admin/order_details.php`
- [Courier Management](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/manage_couriers.php): `ACB/admin/manage_couriers.php`
- [Coupon Management](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/manage_coupons.php): `ACB/admin/manage_coupons.php`
- [User Management](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/manage_users.php): `ACB/admin/manage_users.php`
- [Financial Analytics](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/financial_analytics.php): `ACB/admin/financial_analytics.php`
- [Admin Dashboard](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/dashboard.php): `ACB/admin/dashboard.php`
- [Admin Live Chat](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/admin/chat.php): `ACB/admin/chat.php`

### Shared Platform

- [Database Connection](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/includes/db.php): `ACB/includes/db.php`
- **MySQL Store**
- [Shared Header](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/includes/header.php): `ACB/includes/header.php`
- [Shared Footer](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/includes/footer.php): `ACB/includes/footer.php`
- [URL and Asset Helpers](https://github.com/artcodecreator/almas-clothing-brand/blob/main/ACB/config/config.php): `ACB/config/config.php`

### Other components

- **Customer**
- **Administrator**

## Connections

- Customer → Home and Featured: opens storefront
- Customer → Product Catalog: browses and filters
- Customer → Product Details: views details
- Customer → Registration and Login: registers or logs in
- Customer → Cart Management: manages cart
- Customer → Coupon Application: applies discount
- Customer → COD Checkout: places COD order
- Customer → Order History: views history
- Customer → Order Tracking: tracks order
- Customer → Profile Management: manages profile
- Customer → Wishlist: uses wishlist
- Customer → Review Moderation: submits reviews
- Administrator → Admin Dashboard: views overview
- Administrator → Product Management: manages products
- Administrator → Order Management: manages orders
- Administrator → Order Details: inspects order (evidence: `ACB/admin/order_details.php`)
- Administrator → Courier Management: assigns couriers
- Administrator → Coupon Management: manages coupons
- Administrator → User Management: manages users
- Administrator → Review Moderation: moderates reviews
- Administrator → Financial Analytics: views reports
- Administrator → Admin Live Chat: handles support chat
- Home and Featured → Product Catalog: links to shop (evidence: `ACB/index.php`)
- Home and Featured → Cart Actions: posts add request (evidence: `ACB/index.php`)
- Shared Footer → Customer Chat Widget: includes widget (evidence: `ACB/includes/footer.php`)
- Customer Chat Widget → Chat API: sends and fetches (evidence: `ACB/includes/chat_widget.php`)
- Database Connection → MySQL Store: opens connection (evidence: `ACB/includes/db.php`)
- Shared Header → URL and Asset Helpers: loads helpers (evidence: `ACB/includes/header.php`)
- Home and Featured → Database Connection: queries products (evidence: `ACB/index.php`)
- Product Catalog → Database Connection: queries catalog (evidence: `ACB/user/shop.php`)
- COD Checkout → Database Connection: reads products and writes orders (evidence: `ACB/user/checkout.php`)
- Chat API → Database Connection: reads and writes messages (evidence: `ACB/ajax/chat_api.php`)
- Order Management → Order Details: links order details (evidence: `ACB/admin/order_details.php`)
- Admin Dashboard → Database Connection: loads shared database (evidence: `ACB/admin/dashboard.php`)
- Product Management → Database Connection: loads shared database (evidence: `ACB/admin/manage_products.php`)
- Order Management → Database Connection: loads shared database (evidence: `ACB/admin/manage_orders.php`)
- Order Details → Database Connection: queries order data (evidence: `ACB/admin/order_details.php`)
- Financial Analytics → Database Connection: loads shared database (evidence: `ACB/admin/financial_analytics.php`)
- Courier Management → Database Connection: loads shared database (evidence: `ACB/admin/manage_couriers.php`)
- Coupon Management → Database Connection: loads shared database (evidence: `ACB/admin/manage_coupons.php`)
- User Management → Database Connection: loads shared database (evidence: `ACB/admin/manage_users.php`)
- Review Moderation → Database Connection: queries review records (evidence: `ACB/admin/moderate_reviews.php`)
- Admin Live Chat → Database Connection: loads shared database (evidence: `ACB/admin/chat.php`)
