# aherezanobert15/pvim architecture

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

- Interactive diagram: https://gitdiagram.com/aherezanobert15/pvim
- Repository: https://github.com/aherezanobert15/pvim

## Overview

MUST-PVIM is a role-based PHP/MySQL marketplace for discovering and buying verified university innovations, with a parallel investor-opportunity pathway and public-value reporting. The customer journey runs from product discovery through cart, checkout, sandbox payment, and order tracking; innovators list products and fulfil sales, while admins verify listings. The README documents several subsystems whose page implementations were not sampled, so their documented capabilities are represented without inferring internal call wiring.

Main entry points: [`db.php`](https://github.com/aherezanobert15/pvim/blob/main/db.php) (MySQL Database), [`login.php`](https://github.com/aherezanobert15/pvim/blob/main/login.php) (Login & Registration), [`browse-products.php`](https://github.com/aherezanobert15/pvim/blob/main/browse-products.php) (Browse Products), [`product-details.php`](https://github.com/aherezanobert15/pvim/blob/main/product-details.php) (Product Details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access &amp; Accounts"]
  node_auth["Login &amp; Registration<br/>[login.php]"]
  node_roles["Role Checks<br/>[auth.php]"]
end

subgraph group_market["Product Marketplace"]
  node_home["Marketplace Home<br/>[index.php]"]
  node_browse["Browse Products"]
  node_details["Product Details"]
  node_listing["Create &amp; Edit Listings<br/>[add-product.php]"]
  node_requests["Product Requests"]
end

subgraph group_commerce["Orders &amp; Fulfilment"]
  node_cart["Session Cart<br/>[cart.php]"]
  node_checkout["Checkout<br/>[checkout.php]"]
  node_payment["Sandbox Payment<br/>[pay.php]"]
  node_callback["Payment Callback"]
  node_orders["Order History &amp; Tracking<br/>[orders.php]"]
  node_fulfilment["Innovator Fulfilment"]
  node_inventory["Inventory Management<br/>[inventory.php]"]
end

subgraph group_investment["Investment Pathway"]
  node_investment_profile["Investment Profile"]
  node_opportunities["Investment Opportunities<br/>[opportunities.php]"]
  node_opportunity_details["Opportunity &amp; Interest"]
  node_investor_leads["Investor Leads<br/>[investor-leads.php]"]
end

subgraph group_oversight["Administration &amp; Impact"]
  node_verification["Product Verification"]
  node_management["Platform Management<br/>[manage-users.php]"]
  node_impact["Public Value Dashboard"]
end

node_visitor(("Visitor"))
node_customer(("Customer"))
node_innovator(("Innovator"))
node_admin(("Admin"))
node_investor(("Investor"))
node_database[("MySQL Database<br/>[db.php]")]

node_visitor -->|"visits"| node_home
node_customer -->|"registers or signs in"| node_auth
node_innovator -->|"registers or signs in"| node_auth
node_investor -->|"registers or signs in"| node_auth
node_admin -->|"signs in"| node_auth
node_auth -->|"reads and writes accounts"| node_database
node_auth -->|"checks access"| node_roles
node_visitor -->|"discovers products"| node_browse
node_customer -->|"searches listings"| node_browse
node_home -->|"links to"| node_browse
node_browse -->|"reads verified listings"| node_database
node_browse -->|"opens listing"| node_details
node_customer -->|"views product"| node_details
node_details -->|"reads product and reviews"| node_database
node_innovator -->|"submits listing"| node_listing
node_listing -->|"writes product and documents"| node_database
node_admin -->|"reviews listings"| node_verification
node_verification -->|"updates verification status"| node_database
node_customer -->|"manages cart"| node_cart
node_details -->|"adds product"| node_cart
node_cart -->|"reads current product data"| node_database
node_customer -->|"places order"| node_checkout
node_checkout -->|"creates order and reserves stock"| node_database
node_checkout -->|"opens payment"| node_payment
node_customer -->|"simulates payment"| node_payment
node_payment -->|"posts payment result"| node_callback
node_callback -->|"updates payment and order"| node_database
node_customer -->|"views and tracks orders"| node_orders
node_orders -->|"reads customer orders"| node_database
node_innovator -->|"updates delivery status"| node_fulfilment
node_fulfilment -->|"updates order and delivery"| node_database
node_innovator -->|"adjusts stock"| node_inventory
node_inventory -->|"updates stock and log"| node_database
node_customer -->|"requests a product"| node_requests
node_requests -->|"writes demand request"| node_database
node_innovator -->|"prepares opportunity"| node_investment_profile
node_investment_profile -->|"writes investment profile"| node_database
node_investor -->|"discovers opportunities"| node_opportunities
node_opportunities -->|"reads active profiles"| node_database
node_investor -->|"reviews opportunity"| node_opportunity_details
node_opportunity_details -->|"reads profile and writes interest"| node_database
node_innovator -->|"reviews investor interest"| node_investor_leads
node_investor_leads -->|"reads investor interests"| node_database
node_admin -->|"manages platform"| node_management
node_management -->|"manages users and categories"| node_database
node_visitor -->|"views impact metrics"| node_impact
node_admin -->|"views impact metrics"| node_impact
node_impact -->|"aggregates marketplace data"| node_database

click node_auth "https://github.com/aherezanobert15/pvim/blob/main/login.php"
click node_roles "https://github.com/aherezanobert15/pvim/blob/main/auth.php"
click node_home "https://github.com/aherezanobert15/pvim/blob/main/index.php"
click node_browse "https://github.com/aherezanobert15/pvim/blob/main/browse-products.php"
click node_details "https://github.com/aherezanobert15/pvim/blob/main/product-details.php"
click node_listing "https://github.com/aherezanobert15/pvim/blob/main/add-product.php"
click node_verification "https://github.com/aherezanobert15/pvim/blob/main/verify-products.php"
click node_cart "https://github.com/aherezanobert15/pvim/blob/main/cart.php"
click node_checkout "https://github.com/aherezanobert15/pvim/blob/main/checkout.php"
click node_payment "https://github.com/aherezanobert15/pvim/blob/main/pay.php"
click node_callback "https://github.com/aherezanobert15/pvim/blob/main/payment-callback.php"
click node_orders "https://github.com/aherezanobert15/pvim/blob/main/orders.php"
click node_fulfilment "https://github.com/aherezanobert15/pvim/blob/main/update-order-status.php"
click node_inventory "https://github.com/aherezanobert15/pvim/blob/main/inventory.php"
click node_requests "https://github.com/aherezanobert15/pvim/blob/main/request-product.php"
click node_investment_profile "https://github.com/aherezanobert15/pvim/blob/main/investment-profile.php"
click node_opportunities "https://github.com/aherezanobert15/pvim/blob/main/opportunities.php"
click node_opportunity_details "https://github.com/aherezanobert15/pvim/blob/main/opportunity-details.php"
click node_investor_leads "https://github.com/aherezanobert15/pvim/blob/main/investor-leads.php"
click node_management "https://github.com/aherezanobert15/pvim/blob/main/manage-users.php"
click node_impact "https://github.com/aherezanobert15/pvim/blob/main/impact-dashboard.php"
click node_database "https://github.com/aherezanobert15/pvim/blob/main/db.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_auth,node_roles toneBlue
class node_home,node_browse,node_details,node_listing,node_requests,node_database toneAmber
class node_cart,node_checkout,node_payment,node_callback,node_orders,node_fulfilment,node_inventory toneMint
class node_investment_profile,node_opportunities,node_opportunity_details,node_investor_leads toneRose
class node_verification,node_management,node_impact,node_visitor,node_customer,node_innovator,node_admin,node_investor toneIndigo
```

## Components

### Access & Accounts

- [Login & Registration](https://github.com/aherezanobert15/pvim/blob/main/login.php): `login.php`
- [Role Checks](https://github.com/aherezanobert15/pvim/blob/main/auth.php): `auth.php`

### Product Marketplace

- [Marketplace Home](https://github.com/aherezanobert15/pvim/blob/main/index.php): `index.php`
- [Browse Products](https://github.com/aherezanobert15/pvim/blob/main/browse-products.php): `browse-products.php`
- [Product Details](https://github.com/aherezanobert15/pvim/blob/main/product-details.php): `product-details.php`
- [Create & Edit Listings](https://github.com/aherezanobert15/pvim/blob/main/add-product.php): `add-product.php`
- [Product Requests](https://github.com/aherezanobert15/pvim/blob/main/request-product.php): `request-product.php`

### Orders & Fulfilment

- [Session Cart](https://github.com/aherezanobert15/pvim/blob/main/cart.php): `cart.php`
- [Checkout](https://github.com/aherezanobert15/pvim/blob/main/checkout.php): `checkout.php`
- [Sandbox Payment](https://github.com/aherezanobert15/pvim/blob/main/pay.php): `pay.php`
- [Payment Callback](https://github.com/aherezanobert15/pvim/blob/main/payment-callback.php): `payment-callback.php`
- [Order History & Tracking](https://github.com/aherezanobert15/pvim/blob/main/orders.php): `orders.php`
- [Innovator Fulfilment](https://github.com/aherezanobert15/pvim/blob/main/update-order-status.php): `update-order-status.php`
- [Inventory Management](https://github.com/aherezanobert15/pvim/blob/main/inventory.php): `inventory.php`

### Investment Pathway

- [Investment Profile](https://github.com/aherezanobert15/pvim/blob/main/investment-profile.php): `investment-profile.php`
- [Investment Opportunities](https://github.com/aherezanobert15/pvim/blob/main/opportunities.php): `opportunities.php`
- [Opportunity & Interest](https://github.com/aherezanobert15/pvim/blob/main/opportunity-details.php): `opportunity-details.php`
- [Investor Leads](https://github.com/aherezanobert15/pvim/blob/main/investor-leads.php): `investor-leads.php`

### Administration & Impact

- [Product Verification](https://github.com/aherezanobert15/pvim/blob/main/verify-products.php): `verify-products.php`
- [Platform Management](https://github.com/aherezanobert15/pvim/blob/main/manage-users.php): `manage-users.php`
- [Public Value Dashboard](https://github.com/aherezanobert15/pvim/blob/main/impact-dashboard.php): `impact-dashboard.php`

### Other components

- **Visitor**
- **Customer**
- **Innovator**
- **Admin**
- **Investor**
- [MySQL Database](https://github.com/aherezanobert15/pvim/blob/main/db.php): `db.php`

## Connections

- Visitor → Marketplace Home: visits
- Customer → Login & Registration: registers or signs in
- Innovator → Login & Registration: registers or signs in
- Investor → Login & Registration: registers or signs in
- Admin → Login & Registration: signs in
- Login & Registration → MySQL Database: reads and writes accounts
- Login & Registration → Role Checks: checks access
- Visitor → Browse Products: discovers products
- Customer → Browse Products: searches listings
- Marketplace Home → Browse Products: links to
- Browse Products → MySQL Database: reads verified listings
- Browse Products → Product Details: opens listing
- Customer → Product Details: views product
- Product Details → MySQL Database: reads product and reviews
- Innovator → Create & Edit Listings: submits listing
- Create & Edit Listings → MySQL Database: writes product and documents
- Admin → Product Verification: reviews listings
- Product Verification → MySQL Database: updates verification status
- Customer → Session Cart: manages cart
- Product Details → Session Cart: adds product
- Session Cart → MySQL Database: reads current product data
- Customer → Checkout: places order
- Checkout → MySQL Database: creates order and reserves stock
- Checkout → Sandbox Payment: opens payment
- Customer → Sandbox Payment: simulates payment
- Sandbox Payment → Payment Callback: posts payment result
- Payment Callback → MySQL Database: updates payment and order
- Customer → Order History & Tracking: views and tracks orders
- Order History & Tracking → MySQL Database: reads customer orders
- Innovator → Innovator Fulfilment: updates delivery status
- Innovator Fulfilment → MySQL Database: updates order and delivery
- Innovator → Inventory Management: adjusts stock
- Inventory Management → MySQL Database: updates stock and log
- Customer → Product Requests: requests a product
- Product Requests → MySQL Database: writes demand request
- Innovator → Investment Profile: prepares opportunity
- Investment Profile → MySQL Database: writes investment profile
- Investor → Investment Opportunities: discovers opportunities
- Investment Opportunities → MySQL Database: reads active profiles
- Investor → Opportunity & Interest: reviews opportunity
- Opportunity & Interest → MySQL Database: reads profile and writes interest
- Innovator → Investor Leads: reviews investor interest
- Investor Leads → MySQL Database: reads investor interests
- Admin → Platform Management: manages platform
- Platform Management → MySQL Database: manages users and categories
- Visitor → Public Value Dashboard: views impact metrics
- Admin → Public Value Dashboard: views impact metrics
- Public Value Dashboard → MySQL Database: aggregates marketplace data
