# nihalakasmooth/chips-web architecture

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

- Interactive diagram: https://gitdiagram.com/nihalakasmooth/chips-web
- Repository: https://github.com/nihalakasmooth/chips-web

## Overview

This is a browser-based storefront for Obsidian snack products, with a separate admin page for managing custom products. Shoppers browse and search products, use cart and favorites, and access product details and simulated account flows; admins unlock a panel to add or remove products and view dashboard counts. Both pages use browser storage rather than a shown backend. The README is empty, and the HTML/CSS and portions of storefront code were not sampled, so links are limited to relationships visible in the JavaScript excerpts.

Main entry points: [`Website/eg-website.html`](https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.html) (Storefront UI), [`Website/admin.js`](https://github.com/nihalakasmooth/chips-web/blob/main/Website/admin.js) (Admin Panel), [`Website/eg-website.js`](https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.js) (Product Catalog), [`Website/admin.html`](https://github.com/nihalakasmooth/chips-web/blob/main/Website/admin.html) (Admin Interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Customer Storefront"]
  node_storefront_ui["Storefront UI<br/>[eg-website.html]"]
  node_catalog["Product Catalog<br/>[eg-website.js]"]
  node_product_search["Product Search<br/>[eg-website.js]"]
  node_product_details["Product Details<br/>[eg-website.js]"]
  node_cart["Shopping Cart<br/>[eg-website.js]"]
  node_favorites["Favorites<br/>[eg-website.js]"]
  node_customer_accounts["Customer Accounts<br/>[eg-website.js]"]
end

subgraph group_management["Product Administration"]
  node_admin["Admin Panel<br/>[admin.js]"]
  node_admin_ui["Admin Interface<br/>[admin.html]"]
  node_product_management["Product Management<br/>[admin.js]"]
  node_admin_dashboard["Admin Dashboard<br/>[admin.js]"]
end

subgraph group_browser_state["Browser State"]
  node_product_storage[("Custom Product Storage<br/>[admin.js]")]
  node_cart_storage[("Cart Storage<br/>[eg-website.js]")]
  node_order_storage[("Order Storage<br/>[admin.js]")]
  node_session_storage[("Admin Session State<br/>[admin.js]")]
end

node_shopper(("Shopper"))

node_shopper -.->|"uses"| node_storefront_ui
node_storefront_ui -.->|"loads"| node_catalog
node_catalog -->|"reads"| node_product_storage
node_storefront_ui -.->|"offers"| node_product_search
node_storefront_ui -.->|"offers"| node_product_details
node_storefront_ui -.->|"offers"| node_cart
node_cart -->|"writes"| node_cart_storage
node_storefront_ui -.->|"offers"| node_favorites
node_storefront_ui -.->|"offers"| node_customer_accounts
node_admin_ui -.->|"loads"| node_admin
node_admin -->|"reads writes"| node_session_storage
node_admin -->|"dispatches"| node_product_management
node_product_management -->|"reads writes"| node_product_storage
node_admin -->|"refreshes"| node_admin_dashboard
node_admin_dashboard -->|"reads"| node_order_storage
node_admin_dashboard -->|"reads"| node_product_storage

click node_storefront_ui "https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.html"
click node_catalog "https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.js"
click node_product_search "https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.js"
click node_product_details "https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.js"
click node_cart "https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.js"
click node_favorites "https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.js"
click node_customer_accounts "https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.js"
click node_admin "https://github.com/nihalakasmooth/chips-web/blob/main/Website/admin.js"
click node_admin_ui "https://github.com/nihalakasmooth/chips-web/blob/main/Website/admin.html"
click node_product_management "https://github.com/nihalakasmooth/chips-web/blob/main/Website/admin.js"
click node_admin_dashboard "https://github.com/nihalakasmooth/chips-web/blob/main/Website/admin.js"
click node_product_storage "https://github.com/nihalakasmooth/chips-web/blob/main/Website/admin.js"
click node_cart_storage "https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.js"
click node_order_storage "https://github.com/nihalakasmooth/chips-web/blob/main/Website/admin.js"
click node_session_storage "https://github.com/nihalakasmooth/chips-web/blob/main/Website/admin.js"

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_storefront_ui,node_catalog,node_product_search,node_product_details,node_cart,node_favorites,node_customer_accounts toneBlue
class node_admin,node_admin_ui,node_product_management,node_admin_dashboard toneAmber
class node_product_storage,node_cart_storage,node_order_storage,node_session_storage toneMint
class node_shopper toneIndigo
```

## Components

### Customer Storefront

- [Storefront UI](https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.html): `Website/eg-website.html`
- [Product Catalog](https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.js): `Website/eg-website.js`
- [Product Search](https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.js): `Website/eg-website.js`
- [Product Details](https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.js): `Website/eg-website.js`
- [Shopping Cart](https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.js): `Website/eg-website.js`
- [Favorites](https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.js): `Website/eg-website.js`
- [Customer Accounts](https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.js): `Website/eg-website.js`

### Product Administration

- [Admin Panel](https://github.com/nihalakasmooth/chips-web/blob/main/Website/admin.js): `Website/admin.js`
- [Admin Interface](https://github.com/nihalakasmooth/chips-web/blob/main/Website/admin.html): `Website/admin.html`
- [Product Management](https://github.com/nihalakasmooth/chips-web/blob/main/Website/admin.js): `Website/admin.js`
- [Admin Dashboard](https://github.com/nihalakasmooth/chips-web/blob/main/Website/admin.js): `Website/admin.js`

### Browser State

- [Custom Product Storage](https://github.com/nihalakasmooth/chips-web/blob/main/Website/admin.js): `Website/admin.js`
- [Cart Storage](https://github.com/nihalakasmooth/chips-web/blob/main/Website/eg-website.js): `Website/eg-website.js`
- [Order Storage](https://github.com/nihalakasmooth/chips-web/blob/main/Website/admin.js): `Website/admin.js`
- [Admin Session State](https://github.com/nihalakasmooth/chips-web/blob/main/Website/admin.js): `Website/admin.js`

### Other components

- **Shopper**

## Connections

- Shopper → Storefront UI: uses
- Storefront UI → Product Catalog: loads
- Product Catalog → Custom Product Storage: reads (evidence: `Website/eg-website.js`)
- Storefront UI → Product Search: offers
- Storefront UI → Product Details: offers
- Storefront UI → Shopping Cart: offers
- Shopping Cart → Cart Storage: writes (evidence: `Website/eg-website.js`)
- Storefront UI → Favorites: offers
- Storefront UI → Customer Accounts: offers
- Admin Interface → Admin Panel: loads
- Admin Panel → Admin Session State: reads writes (evidence: `Website/admin.js`)
- Admin Panel → Product Management: dispatches (evidence: `Website/admin.js`)
- Product Management → Custom Product Storage: reads writes (evidence: `Website/admin.js`)
- Admin Panel → Admin Dashboard: refreshes (evidence: `Website/admin.js`)
- Admin Dashboard → Order Storage: reads (evidence: `Website/admin.js`)
- Admin Dashboard → Custom Product Storage: reads (evidence: `Website/admin.js`)
