# bunyim-kong/pinky-studio architecture

> Architecture diagram of the GitHub repository bunyim-kong/pinky-studio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bunyim-kong/pinky-studio
- Repository: https://github.com/bunyim-kong/pinky-studio

## Overview

Pinky Studio is a mock-data React skincare storefront. Shoppers browse curated collections, search/filter and inspect product details, then add items to a shared cart; account-gated demo checkout records local orders for account history. State persists through browser localStorage; the README confirms there is no real payment or customer-data backend. Edges reflect imports and explicit calls in the excerpts or SOURCE INDEX; unsampled account, cart, login, and informational page internals are represented by their exact page paths, with only documented or indexed links asserted.

Main entry points: [`src/App.jsx`](https://github.com/bunyim-kong/pinky-studio/blob/main/src/App.jsx) (Route dispatcher), [`src/context/StoreContext.jsx`](https://github.com/bunyim-kong/pinky-studio/blob/main/src/context/StoreContext.jsx) (Store state), [`src/data/products.js`](https://github.com/bunyim-kong/pinky-studio/blob/main/src/data/products.js) (Mock catalogue), [`src/components/Layout.jsx`](https://github.com/bunyim-kong/pinky-studio/blob/main/src/components/Layout.jsx) (Shared layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browse["Product discovery"]
  node_home["Home collections<br/>[HomePage.jsx]"]
  node_shop["Search and filters<br/>[ShopPage.jsx]"]
  node_product["Product details<br/>[ProductPage.jsx]"]
  node_catalog["Mock catalogue<br/>[products.js]"]
  node_grid["Product grid<br/>[ProductGrid.jsx]"]
  node_card["Product card<br/>[ProductCard.jsx]"]
  node_info["Brand and support pages<br/>[InfoPages.jsx]"]
end

subgraph group_commerce["Cart and checkout"]
  node_cart["Cart screen<br/>[CartPage.jsx]"]
  node_checkout["Demo checkout<br/>[CheckoutPage.jsx]"]
end

subgraph group_account["Account and orders"]
  node_login["Login screen<br/>[LoginPage.jsx]"]
  node_account["Account history<br/>[AccountPage.jsx]"]
end

subgraph group_shared["Shared storefront services"]
  node_store["Store state<br/>[StoreContext.jsx]"]
  node_storage[("Browser storage<br/>[storage.js]")]
  node_format["Formatting helpers<br/>[format.js]"]
end

subgraph group_shell["Application shell"]
  node_app["Route dispatcher<br/>[App.jsx]"]
  node_header["Navigation and search<br/>[Header.jsx]"]
  node_layout["Shared layout<br/>[Layout.jsx]"]
  node_toast["Notice display<br/>[Toast.jsx]"]
  node_footer["Store footer<br/>[Footer.jsx]"]
  node_scroll["Scroll reset<br/>[ScrollToTop.jsx]"]
  node_entry["React entry and providers<br/>[main.jsx]"]
end

node_shopper(("Shopper"))

node_shopper -->|"opens storefront"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_shop
node_app -->|"routes to"| node_product
node_app -->|"routes to"| node_cart
node_app -->|"routes to"| node_checkout
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_account
node_app -->|"routes to"| node_info
node_home -->|"reads collections"| node_catalog
node_home -->|"renders"| node_grid
node_shop -->|"filters and sorts"| node_catalog
node_shop -->|"renders results"| node_grid
node_product -->|"looks up product"| node_catalog
node_product -->|"adds item"| node_store
node_product -->|"renders recommendations"| node_grid
node_grid -->|"renders items"| node_card
node_card -->|"adds to cart"| node_store
node_cart -.->|"reads and updates"| node_store
node_checkout -->|"submits order"| node_store
node_checkout -->|"formats totals"| node_format
node_store -->|"resolves cart products"| node_catalog
node_store -->|"reads and writes"| node_storage
node_login -.->|"authenticates demo user"| node_store
node_account -->|"reads orders"| node_store
node_account -->|"formats values"| node_format
node_info -->|"reads catalogue"| node_catalog
node_info -->|"formats values"| node_format
node_header -->|"reads account and cart"| node_store
node_header -->|"formats count"| node_format
node_layout -->|"renders"| node_header
node_layout -->|"renders"| node_footer
node_layout -->|"renders"| node_scroll
node_layout -->|"renders"| node_toast
node_toast -->|"reads notice"| node_store
node_entry -->|"mounts"| node_app
node_entry -->|"provides shared state"| node_store

click node_app "https://github.com/bunyim-kong/pinky-studio/blob/main/src/App.jsx"
click node_home "https://github.com/bunyim-kong/pinky-studio/blob/main/src/pages/HomePage.jsx"
click node_shop "https://github.com/bunyim-kong/pinky-studio/blob/main/src/pages/ShopPage.jsx"
click node_product "https://github.com/bunyim-kong/pinky-studio/blob/main/src/pages/ProductPage.jsx"
click node_catalog "https://github.com/bunyim-kong/pinky-studio/blob/main/src/data/products.js"
click node_grid "https://github.com/bunyim-kong/pinky-studio/blob/main/src/components/ProductGrid.jsx"
click node_card "https://github.com/bunyim-kong/pinky-studio/blob/main/src/components/ProductCard.jsx"
click node_cart "https://github.com/bunyim-kong/pinky-studio/blob/main/src/pages/CartPage.jsx"
click node_checkout "https://github.com/bunyim-kong/pinky-studio/blob/main/src/pages/CheckoutPage.jsx"
click node_store "https://github.com/bunyim-kong/pinky-studio/blob/main/src/context/StoreContext.jsx"
click node_storage "https://github.com/bunyim-kong/pinky-studio/blob/main/src/services/storage.js"
click node_format "https://github.com/bunyim-kong/pinky-studio/blob/main/src/utils/format.js"
click node_login "https://github.com/bunyim-kong/pinky-studio/blob/main/src/pages/LoginPage.jsx"
click node_account "https://github.com/bunyim-kong/pinky-studio/blob/main/src/pages/AccountPage.jsx"
click node_info "https://github.com/bunyim-kong/pinky-studio/blob/main/src/pages/InfoPages.jsx"
click node_header "https://github.com/bunyim-kong/pinky-studio/blob/main/src/components/Header.jsx"
click node_layout "https://github.com/bunyim-kong/pinky-studio/blob/main/src/components/Layout.jsx"
click node_toast "https://github.com/bunyim-kong/pinky-studio/blob/main/src/components/Toast.jsx"
click node_footer "https://github.com/bunyim-kong/pinky-studio/blob/main/src/components/Footer.jsx"
click node_scroll "https://github.com/bunyim-kong/pinky-studio/blob/main/src/components/ScrollToTop.jsx"
click node_entry "https://github.com/bunyim-kong/pinky-studio/blob/main/src/main.jsx"

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_home,node_shop,node_product,node_catalog,node_grid,node_card,node_info toneBlue
class node_cart,node_checkout toneAmber
class node_login,node_account toneMint
class node_store,node_storage,node_format toneRose
class node_app,node_header,node_layout,node_toast,node_footer,node_scroll,node_entry,node_shopper toneIndigo
```

## Components

### Product discovery

- [Home collections](https://github.com/bunyim-kong/pinky-studio/blob/main/src/pages/HomePage.jsx): `src/pages/HomePage.jsx`
- [Search and filters](https://github.com/bunyim-kong/pinky-studio/blob/main/src/pages/ShopPage.jsx): `src/pages/ShopPage.jsx`
- [Product details](https://github.com/bunyim-kong/pinky-studio/blob/main/src/pages/ProductPage.jsx): `src/pages/ProductPage.jsx`
- [Mock catalogue](https://github.com/bunyim-kong/pinky-studio/blob/main/src/data/products.js): `src/data/products.js`
- [Product grid](https://github.com/bunyim-kong/pinky-studio/blob/main/src/components/ProductGrid.jsx): `src/components/ProductGrid.jsx`
- [Product card](https://github.com/bunyim-kong/pinky-studio/blob/main/src/components/ProductCard.jsx): `src/components/ProductCard.jsx`
- [Brand and support pages](https://github.com/bunyim-kong/pinky-studio/blob/main/src/pages/InfoPages.jsx): `src/pages/InfoPages.jsx`

### Cart and checkout

- [Cart screen](https://github.com/bunyim-kong/pinky-studio/blob/main/src/pages/CartPage.jsx): `src/pages/CartPage.jsx`
- [Demo checkout](https://github.com/bunyim-kong/pinky-studio/blob/main/src/pages/CheckoutPage.jsx): `src/pages/CheckoutPage.jsx`

### Account and orders

- [Login screen](https://github.com/bunyim-kong/pinky-studio/blob/main/src/pages/LoginPage.jsx): `src/pages/LoginPage.jsx`
- [Account history](https://github.com/bunyim-kong/pinky-studio/blob/main/src/pages/AccountPage.jsx): `src/pages/AccountPage.jsx`

### Shared storefront services

- [Store state](https://github.com/bunyim-kong/pinky-studio/blob/main/src/context/StoreContext.jsx): `src/context/StoreContext.jsx`
- [Browser storage](https://github.com/bunyim-kong/pinky-studio/blob/main/src/services/storage.js): `src/services/storage.js`
- [Formatting helpers](https://github.com/bunyim-kong/pinky-studio/blob/main/src/utils/format.js): `src/utils/format.js`

### Application shell

- [Route dispatcher](https://github.com/bunyim-kong/pinky-studio/blob/main/src/App.jsx): `src/App.jsx`
- [Navigation and search](https://github.com/bunyim-kong/pinky-studio/blob/main/src/components/Header.jsx): `src/components/Header.jsx`
- [Shared layout](https://github.com/bunyim-kong/pinky-studio/blob/main/src/components/Layout.jsx): `src/components/Layout.jsx`
- [Notice display](https://github.com/bunyim-kong/pinky-studio/blob/main/src/components/Toast.jsx): `src/components/Toast.jsx`
- [Store footer](https://github.com/bunyim-kong/pinky-studio/blob/main/src/components/Footer.jsx): `src/components/Footer.jsx`
- [Scroll reset](https://github.com/bunyim-kong/pinky-studio/blob/main/src/components/ScrollToTop.jsx): `src/components/ScrollToTop.jsx`
- [React entry and providers](https://github.com/bunyim-kong/pinky-studio/blob/main/src/main.jsx): `src/main.jsx`

### Other components

- **Shopper**

## Connections

- Shopper → Route dispatcher: opens storefront
- Route dispatcher → Home collections: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Search and filters: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Product details: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Cart screen: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Demo checkout: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Login screen: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Account history: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Brand and support pages: routes to (evidence: `src/App.jsx`)
- Home collections → Mock catalogue: reads collections (evidence: `src/pages/HomePage.jsx`)
- Home collections → Product grid: renders (evidence: `src/pages/HomePage.jsx`)
- Search and filters → Mock catalogue: filters and sorts (evidence: `src/pages/ShopPage.jsx`)
- Search and filters → Product grid: renders results (evidence: `src/pages/ShopPage.jsx`)
- Product details → Mock catalogue: looks up product (evidence: `src/pages/ProductPage.jsx`)
- Product details → Store state: adds item (evidence: `src/pages/ProductPage.jsx`)
- Product details → Product grid: renders recommendations (evidence: `src/pages/ProductPage.jsx`)
- Product grid → Product card: renders items (evidence: `src/components/ProductGrid.jsx`)
- Product card → Store state: adds to cart (evidence: `src/components/ProductCard.jsx`)
- Cart screen → Store state: reads and updates (evidence: `src/pages/CartPage.jsx`)
- Demo checkout → Store state: submits order (evidence: `src/pages/CheckoutPage.jsx`)
- Demo checkout → Formatting helpers: formats totals (evidence: `src/pages/CheckoutPage.jsx`)
- Store state → Mock catalogue: resolves cart products (evidence: `src/context/StoreContext.jsx`)
- Store state → Browser storage: reads and writes (evidence: `src/context/StoreContext.jsx`)
- Login screen → Store state: authenticates demo user (evidence: `src/pages/LoginPage.jsx`)
- Account history → Store state: reads orders (evidence: `src/pages/AccountPage.jsx`)
- Account history → Formatting helpers: formats values (evidence: `src/pages/AccountPage.jsx`)
- Brand and support pages → Mock catalogue: reads catalogue (evidence: `src/pages/InfoPages.jsx`)
- Brand and support pages → Formatting helpers: formats values (evidence: `src/pages/InfoPages.jsx`)
- Navigation and search → Store state: reads account and cart (evidence: `src/components/Header.jsx`)
- Navigation and search → Formatting helpers: formats count (evidence: `src/components/Header.jsx`)
- Shared layout → Navigation and search: renders (evidence: `src/components/Layout.jsx`)
- Shared layout → Store footer: renders (evidence: `src/components/Layout.jsx`)
- Shared layout → Scroll reset: renders (evidence: `src/components/Layout.jsx`)
- Shared layout → Notice display: renders (evidence: `src/components/Layout.jsx`)
- Notice display → Store state: reads notice (evidence: `src/components/Toast.jsx`)
- React entry and providers → Route dispatcher: mounts (evidence: `src/main.jsx`)
- React entry and providers → Store state: provides shared state (evidence: `src/main.jsx`)
