# nasstyfox/part-2 architecture

> Architecture diagram of the GitHub repository nasstyfox/part-2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nasstyfox/part-2
- Repository: https://github.com/nasstyfox/part-2

## Overview

Pastimes is a PHP second-hand clothing marketplace. Buyers browse available items, add them to a session cart, enter a delivery address, and place an order; sellers list and review items, while administrators approve accounts. MySQL-backed PHP pages implement these stages directly. The graph also includes registration and login, seller management, and database setup. Connections are based on the shown source and SOURCE INDEX; cart mutation and removal behavior is not described in the available excerpts, so those links are omitted.

Main entry points: [`PART-2-main/DBConn.php`](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/DBConn.php) (DB Connection), [`PART-2-main/login.php`](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/login.php) (Login), [`PART-2-main/seller_dashboard.php`](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/seller_dashboard.php) (Seller Dashboard), [`PART-2-main/index.php`](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/index.php) (Clothing Catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts and Approval"]
  node_register["Registration<br/>[register.php]"]
  node_login["Login<br/>[login.php]"]
  node_admin["User Approval"]
end

subgraph group_shopping["Buyer Shopping"]
  node_catalog["Clothing Catalog<br/>[index.php]"]
  node_cartaction["Cart Action<br/>[cart_action.php]"]
  node_cart["Shopping Cart<br/>[cart.php]"]
  node_checkout["Checkout<br/>[checkout.php]"]
  node_order["Order Processing<br/>[process_order.php]"]
end

subgraph group_seller["Seller Tools"]
  node_sellerdash["Seller Dashboard"]
  node_upload["Item Upload<br/>[upload_item.php]"]
  node_listings["Seller Listings<br/>[my_listings.php]"]
end

subgraph group_data["Database Access"]
  node_connection["DB Connection<br/>[DBConn.php]"]
  node_schema["Table Setup<br/>[createTable.php]"]
  node_database[("MySQL Database")]
end

node_visitor(("Visitor"))

node_visitor -->|"registers"| node_register
node_visitor -->|"signs in"| node_login
node_visitor -->|"browses"| node_catalog
node_visitor -->|"submits address"| node_checkout
node_register -->|"inserts user"| node_connection
node_register -->|"redirects after success"| node_login
node_login -->|"checks credentials"| node_connection
node_login -->|"routes admin"| node_admin
node_login -->|"routes seller"| node_sellerdash
node_login -->|"routes buyer"| node_catalog
node_admin -->|"updates and reads users"| node_connection
node_catalog -->|"reads available items"| node_connection
node_catalog -->|"submits product"| node_cartaction
node_cart -->|"reads item prices"| node_connection
node_cart -->|"links to checkout"| node_checkout
node_checkout -->|"reads prices"| node_connection
node_checkout -->|"submits order"| node_order
node_order -->|"creates order and updates items"| node_connection
node_sellerdash -->|"reads status and counts"| node_connection
node_sellerdash -->|"links to upload"| node_upload
node_sellerdash -->|"links to listings"| node_listings
node_upload -->|"inserts listing"| node_connection
node_listings -->|"reads seller items"| node_connection
node_schema -->|"uses connection"| node_connection
node_connection -->|"connects and selects"| node_database
node_schema -->|"creates tables"| node_database

click node_register "https://github.com/nasstyfox/part-2/blob/master/PART-2-main/register.php"
click node_login "https://github.com/nasstyfox/part-2/blob/master/PART-2-main/login.php"
click node_admin "https://github.com/nasstyfox/part-2/blob/master/PART-2-main/admin_dashboard.php"
click node_catalog "https://github.com/nasstyfox/part-2/blob/master/PART-2-main/index.php"
click node_cartaction "https://github.com/nasstyfox/part-2/blob/master/PART-2-main/cart_action.php"
click node_cart "https://github.com/nasstyfox/part-2/blob/master/PART-2-main/cart.php"
click node_checkout "https://github.com/nasstyfox/part-2/blob/master/PART-2-main/checkout.php"
click node_order "https://github.com/nasstyfox/part-2/blob/master/PART-2-main/process_order.php"
click node_sellerdash "https://github.com/nasstyfox/part-2/blob/master/PART-2-main/seller_dashboard.php"
click node_upload "https://github.com/nasstyfox/part-2/blob/master/PART-2-main/upload_item.php"
click node_listings "https://github.com/nasstyfox/part-2/blob/master/PART-2-main/my_listings.php"
click node_connection "https://github.com/nasstyfox/part-2/blob/master/PART-2-main/DBConn.php"
click node_schema "https://github.com/nasstyfox/part-2/blob/master/PART-2-main/createTable.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_register,node_login,node_admin toneBlue
class node_catalog,node_cartaction,node_cart,node_checkout,node_order toneAmber
class node_sellerdash,node_upload,node_listings toneMint
class node_connection,node_schema,node_database toneRose
class node_visitor toneIndigo
```

## Components

### Accounts and Approval

- [Registration](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/register.php): `PART-2-main/register.php`
- [Login](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/login.php): `PART-2-main/login.php`
- [User Approval](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/admin_dashboard.php): `PART-2-main/admin_dashboard.php`

### Buyer Shopping

- [Clothing Catalog](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/index.php): `PART-2-main/index.php`
- [Cart Action](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/cart_action.php): `PART-2-main/cart_action.php`
- [Shopping Cart](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/cart.php): `PART-2-main/cart.php`
- [Checkout](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/checkout.php): `PART-2-main/checkout.php`
- [Order Processing](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/process_order.php): `PART-2-main/process_order.php`

### Seller Tools

- [Seller Dashboard](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/seller_dashboard.php): `PART-2-main/seller_dashboard.php`
- [Item Upload](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/upload_item.php): `PART-2-main/upload_item.php`
- [Seller Listings](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/my_listings.php): `PART-2-main/my_listings.php`

### Database Access

- [DB Connection](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/DBConn.php): `PART-2-main/DBConn.php`
- [Table Setup](https://github.com/nasstyfox/part-2/blob/master/PART-2-main/createTable.php): `PART-2-main/createTable.php`
- **MySQL Database**

### Other components

- **Visitor**

## Connections

- Visitor → Registration: registers (evidence: `PART-2-main/register.php`)
- Visitor → Login: signs in (evidence: `PART-2-main/login.php`)
- Visitor → Clothing Catalog: browses (evidence: `PART-2-main/index.php`)
- Visitor → Checkout: submits address (evidence: `PART-2-main/checkout.php`)
- Registration → DB Connection: inserts user (evidence: `PART-2-main/register.php`)
- Registration → Login: redirects after success (evidence: `PART-2-main/register.php`)
- Login → DB Connection: checks credentials (evidence: `PART-2-main/login.php`)
- Login → User Approval: routes admin (evidence: `PART-2-main/login.php`)
- Login → Seller Dashboard: routes seller (evidence: `PART-2-main/login.php`)
- Login → Clothing Catalog: routes buyer (evidence: `PART-2-main/login.php`)
- User Approval → DB Connection: updates and reads users (evidence: `PART-2-main/admin_dashboard.php`)
- Clothing Catalog → DB Connection: reads available items (evidence: `PART-2-main/index.php`)
- Clothing Catalog → Cart Action: submits product (evidence: `PART-2-main/index.php`)
- Shopping Cart → DB Connection: reads item prices (evidence: `PART-2-main/cart.php`)
- Shopping Cart → Checkout: links to checkout (evidence: `PART-2-main/cart.php`)
- Checkout → DB Connection: reads prices (evidence: `PART-2-main/checkout.php`)
- Checkout → Order Processing: submits order (evidence: `PART-2-main/checkout.php`)
- Order Processing → DB Connection: creates order and updates items (evidence: `PART-2-main/process_order.php`)
- Seller Dashboard → DB Connection: reads status and counts (evidence: `PART-2-main/seller_dashboard.php`)
- Seller Dashboard → Item Upload: links to upload (evidence: `PART-2-main/seller_dashboard.php`)
- Seller Dashboard → Seller Listings: links to listings (evidence: `PART-2-main/seller_dashboard.php`)
- Item Upload → DB Connection: inserts listing (evidence: `PART-2-main/upload_item.php`)
- Seller Listings → DB Connection: reads seller items (evidence: `PART-2-main/my_listings.php`)
- Table Setup → DB Connection: uses connection (evidence: `PART-2-main/createTable.php`)
- DB Connection → MySQL Database: connects and selects (evidence: `PART-2-main/DBConn.php`)
- Table Setup → MySQL Database: creates tables (evidence: `PART-2-main/createTable.php`)
