# jjampongg1/integprog_finalproject architecture

> Architecture diagram of the GitHub repository jjampongg1/integprog_finalproject, 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/jjampongg1/integprog_finalproject
- Repository: https://github.com/jjampongg1/integprog_finalproject

## Overview

This is a lightweight browser-based clothing storefront. The principal workflow loads product data, lets shoppers browse and filter the catalog, manage a persistent cart, and submit checkout details to create an order. The sampled JavaScript shows these runtime responsibilities, but the HTML pages and most checkout implementation were not excerpted, and the README is empty; their specific behavior and wiring cannot be confirmed.

Main entry points: [`script.js`](https://github.com/jjampongg1/integprog_finalproject/blob/main/script.js) (Browse and filter), [`products.json`](https://github.com/jjampongg1/integprog_finalproject/blob/main/products.json) (Product data), [`product.html`](https://github.com/jjampongg1/integprog_finalproject/blob/main/product.html) (Product page), [`product-form.html`](https://github.com/jjampongg1/integprog_finalproject/blob/main/product-form.html) (Product form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_product_data["Product data<br/>[products.json]"]
  node_catalog["Catalog loading<br/>[script.js]"]
  node_discovery["Browse and filter<br/>[script.js]"]
  node_product_details["Product details<br/>[script.js]"]
  node_product_page["Product page<br/>[product.html]"]
  node_product_form["Product form<br/>[product-form.html]"]
  node_home_page["Home page<br/>[index.html]"]
end

subgraph group_commerce["Commerce"]
  node_cart["Cart<br/>[script.js]"]
  node_cart_storage[("Cart storage<br/>[script.js]")]
  node_checkout["Checkout<br/>[script.js]"]
  node_customer_order["Customer and order<br/>[script.js]"]
end

subgraph group_account["Account pages"]
  node_login_page["Login page<br/>[login.html]"]
end

node_shopper(("Shopper"))

node_catalog -->|"fetches"| node_product_data
node_catalog -->|"renders catalog"| node_discovery
node_discovery -->|"shows details"| node_product_details
node_discovery -->|"adds products"| node_cart
node_cart -->|"persists and restores"| node_cart_storage
node_checkout -->|"reads items and total"| node_cart
node_checkout -->|"creates"| node_customer_order
node_shopper -.->|"visits"| node_home_page
node_shopper -.->|"visits"| node_login_page
node_shopper -.->|"visits"| node_product_page
node_shopper -.->|"visits"| node_product_form

click node_product_data "https://github.com/jjampongg1/integprog_finalproject/blob/main/products.json"
click node_catalog "https://github.com/jjampongg1/integprog_finalproject/blob/main/script.js"
click node_discovery "https://github.com/jjampongg1/integprog_finalproject/blob/main/script.js"
click node_product_details "https://github.com/jjampongg1/integprog_finalproject/blob/main/script.js"
click node_cart "https://github.com/jjampongg1/integprog_finalproject/blob/main/script.js"
click node_cart_storage "https://github.com/jjampongg1/integprog_finalproject/blob/main/script.js"
click node_checkout "https://github.com/jjampongg1/integprog_finalproject/blob/main/script.js"
click node_customer_order "https://github.com/jjampongg1/integprog_finalproject/blob/main/script.js"
click node_login_page "https://github.com/jjampongg1/integprog_finalproject/blob/main/login.html"
click node_product_page "https://github.com/jjampongg1/integprog_finalproject/blob/main/product.html"
click node_product_form "https://github.com/jjampongg1/integprog_finalproject/blob/main/product-form.html"
click node_home_page "https://github.com/jjampongg1/integprog_finalproject/blob/main/index.html"

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_product_data,node_catalog,node_discovery,node_product_details,node_product_page,node_product_form,node_home_page toneBlue
class node_cart,node_cart_storage,node_checkout,node_customer_order toneAmber
class node_login_page toneMint
class node_shopper toneIndigo
```

## Components

### Storefront

- [Product data](https://github.com/jjampongg1/integprog_finalproject/blob/main/products.json): `products.json`
- [Catalog loading](https://github.com/jjampongg1/integprog_finalproject/blob/main/script.js): `script.js`
- [Browse and filter](https://github.com/jjampongg1/integprog_finalproject/blob/main/script.js): `script.js`
- [Product details](https://github.com/jjampongg1/integprog_finalproject/blob/main/script.js): `script.js`
- [Product page](https://github.com/jjampongg1/integprog_finalproject/blob/main/product.html): `product.html`
- [Product form](https://github.com/jjampongg1/integprog_finalproject/blob/main/product-form.html): `product-form.html`
- [Home page](https://github.com/jjampongg1/integprog_finalproject/blob/main/index.html): `index.html`

### Commerce

- [Cart](https://github.com/jjampongg1/integprog_finalproject/blob/main/script.js): `script.js`
- [Cart storage](https://github.com/jjampongg1/integprog_finalproject/blob/main/script.js): `script.js`
- [Checkout](https://github.com/jjampongg1/integprog_finalproject/blob/main/script.js): `script.js`
- [Customer and order](https://github.com/jjampongg1/integprog_finalproject/blob/main/script.js): `script.js`

### Account pages

- [Login page](https://github.com/jjampongg1/integprog_finalproject/blob/main/login.html): `login.html`

### Other components

- **Shopper**

## Connections

- Catalog loading → Product data: fetches (evidence: `script.js`)
- Catalog loading → Browse and filter: renders catalog (evidence: `script.js`)
- Browse and filter → Product details: shows details (evidence: `script.js`)
- Browse and filter → Cart: adds products (evidence: `script.js`)
- Cart → Cart storage: persists and restores (evidence: `script.js`)
- Checkout → Cart: reads items and total (evidence: `script.js`)
- Checkout → Customer and order: creates (evidence: `script.js`)
- Shopper → Home page: visits
- Shopper → Login page: visits
- Shopper → Product page: visits
- Shopper → Product form: visits
