# akhil200331/online-shopping-website architecture

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

- Interactive diagram: https://gitdiagram.com/akhil200331/online-shopping-website
- Repository: https://github.com/akhil200331/online-shopping-website

## Overview

This is a PHP/MySQL online shop. Shoppers sign in, browse category product pages, save items to a wishlist/cart, and can begin checkout from a product page, which records the selected item and redirects to address entry. The README identifies the home page and sign-in gate; sampled product pages show catalog reads and cart writes. Checkout, payment, order history/status, and profile are represented from the file tree, but their internal wiring was not sampled.

Main entry points: [`mjeans.php`](https://github.com/akhil200331/online-shopping-website/blob/main/mjeans.php) (Category listings), [`ONLINESHOPPING.php`](https://github.com/akhil200331/online-shopping-website/blob/main/ONLINESHOPPING.php) (Shop home), [`header.php`](https://github.com/akhil200331/online-shopping-website/blob/main/header.php) (Category navigation), [`signin.php`](https://github.com/akhil200331/online-shopping-website/blob/main/signin.php) (Sign in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_account["Accounts"]
  node_signin["Sign in<br/>[signin.php]"]
  node_signup["Registration<br/>[signuppagemain.php]"]
  node_forgot["Password recovery<br/>[forgotpassword.php]"]
  node_signout["Sign out<br/>[signout.php]"]
  node_profile["Profile<br/>[profile.php]"]
end

subgraph group_browse["Product browsing"]
  node_home["Shop home<br/>[ONLINESHOPPING.php]"]
  node_navigation["Category navigation<br/>[header.php]"]
  node_catalog["Category listings<br/>[mjeans.php]"]
  node_client_interactions["Menu interactions<br/>[main.js]"]
end

subgraph group_purchase["Shopping and orders"]
  node_wishlist["Wishlist<br/>[wishlist.php]"]
  node_address["Address entry<br/>[address.php]"]
  node_payment["Payment<br/>[paymentpage.php]"]
  node_history["Order history<br/>[history.php]"]
  node_order_status["Order status<br/>[orderstatus.txt]"]
end

subgraph group_state["Persistent state"]
  node_buy_selection["Selected item<br/>[buy.txt]"]
  node_mysql[("MySQL database")]
end

node_shopper(("Shopper"))

node_shopper -->|"opens"| node_home
node_home -->|"redirects unsigned"| node_signin
node_shopper -->|"signs in"| node_signin
node_shopper -->|"registers"| node_signup
node_shopper -->|"requests recovery"| node_forgot
node_shopper -->|"signs out"| node_signout
node_shopper -->|"browses"| node_home
node_home -->|"renders navigation"| node_navigation
node_navigation -->|"opens category"| node_catalog
node_navigation -->|"uses menu handlers"| node_client_interactions
node_catalog -->|"reads products"| node_mysql
node_catalog -->|"writes saved items"| node_mysql
node_shopper -->|"selects item"| node_catalog
node_catalog -->|"writes selection"| node_buy_selection
node_catalog -->|"redirects for purchase"| node_address
node_shopper -->|"views saved items"| node_wishlist
node_shopper -->|"provides address"| node_address
node_shopper -->|"continues checkout"| node_payment
node_shopper -->|"views orders"| node_history
node_shopper -->|"views profile"| node_profile

click node_home "https://github.com/akhil200331/online-shopping-website/blob/main/ONLINESHOPPING.php"
click node_navigation "https://github.com/akhil200331/online-shopping-website/blob/main/header.php"
click node_catalog "https://github.com/akhil200331/online-shopping-website/blob/main/mjeans.php"
click node_client_interactions "https://github.com/akhil200331/online-shopping-website/blob/main/main.js"
click node_signin "https://github.com/akhil200331/online-shopping-website/blob/main/signin.php"
click node_signup "https://github.com/akhil200331/online-shopping-website/blob/main/signuppagemain.php"
click node_forgot "https://github.com/akhil200331/online-shopping-website/blob/main/forgotpassword.php"
click node_signout "https://github.com/akhil200331/online-shopping-website/blob/main/signout.php"
click node_profile "https://github.com/akhil200331/online-shopping-website/blob/main/profile.php"
click node_wishlist "https://github.com/akhil200331/online-shopping-website/blob/main/wishlist.php"
click node_address "https://github.com/akhil200331/online-shopping-website/blob/main/address.php"
click node_payment "https://github.com/akhil200331/online-shopping-website/blob/main/paymentpage.php"
click node_history "https://github.com/akhil200331/online-shopping-website/blob/main/history.php"
click node_order_status "https://github.com/akhil200331/online-shopping-website/blob/main/orderstatus.txt"
click node_buy_selection "https://github.com/akhil200331/online-shopping-website/blob/main/buy.txt"

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_signin,node_signup,node_forgot,node_signout,node_profile toneBlue
class node_home,node_navigation,node_catalog,node_client_interactions toneAmber
class node_wishlist,node_address,node_payment,node_history,node_order_status toneMint
class node_buy_selection,node_mysql toneRose
class node_shopper toneIndigo
```

## Components

### Accounts

- [Sign in](https://github.com/akhil200331/online-shopping-website/blob/main/signin.php): `signin.php`
- [Registration](https://github.com/akhil200331/online-shopping-website/blob/main/signuppagemain.php): `signuppagemain.php`
- [Password recovery](https://github.com/akhil200331/online-shopping-website/blob/main/forgotpassword.php): `forgotpassword.php`
- [Sign out](https://github.com/akhil200331/online-shopping-website/blob/main/signout.php): `signout.php`
- [Profile](https://github.com/akhil200331/online-shopping-website/blob/main/profile.php): `profile.php`

### Product browsing

- [Shop home](https://github.com/akhil200331/online-shopping-website/blob/main/ONLINESHOPPING.php): `ONLINESHOPPING.php`
- [Category navigation](https://github.com/akhil200331/online-shopping-website/blob/main/header.php): `header.php`
- [Category listings](https://github.com/akhil200331/online-shopping-website/blob/main/mjeans.php): `mjeans.php`
- [Menu interactions](https://github.com/akhil200331/online-shopping-website/blob/main/main.js): `main.js`

### Shopping and orders

- [Wishlist](https://github.com/akhil200331/online-shopping-website/blob/main/wishlist.php): `wishlist.php`
- [Address entry](https://github.com/akhil200331/online-shopping-website/blob/main/address.php): `address.php`
- [Payment](https://github.com/akhil200331/online-shopping-website/blob/main/paymentpage.php): `paymentpage.php`
- [Order history](https://github.com/akhil200331/online-shopping-website/blob/main/history.php): `history.php`
- [Order status](https://github.com/akhil200331/online-shopping-website/blob/main/orderstatus.txt): `orderstatus.txt`

### Persistent state

- [Selected item](https://github.com/akhil200331/online-shopping-website/blob/main/buy.txt): `buy.txt`
- **MySQL database**

### Other components

- **Shopper**

## Connections

- Shopper → Shop home: opens
- Shop home → Sign in: redirects unsigned
- Shopper → Sign in: signs in
- Shopper → Registration: registers
- Shopper → Password recovery: requests recovery
- Shopper → Sign out: signs out
- Shopper → Shop home: browses
- Shop home → Category navigation: renders navigation
- Category navigation → Category listings: opens category
- Category navigation → Menu interactions: uses menu handlers
- Category listings → MySQL database: reads products
- Category listings → MySQL database: writes saved items
- Shopper → Category listings: selects item
- Category listings → Selected item: writes selection
- Category listings → Address entry: redirects for purchase
- Shopper → Wishlist: views saved items
- Shopper → Address entry: provides address
- Shopper → Payment: continues checkout
- Shopper → Order history: views orders
- Shopper → Profile: views profile
