# debshopify/cosmetics architecture

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

- Interactive diagram: https://gitdiagram.com/debshopify/cosmetics
- Repository: https://github.com/debshopify/cosmetics

## Overview

This is a Shopify storefront theme: it combines page templates and Liquid sections with browser-side interactions for product selection, cart operations, discovery, and localization. The tree supports these capability areas, but no README or source excerpts were provided. Accordingly, the relationships below are dashed and have no evidence path; they indicate likely theme responsibilities, not inspected call flows.

Main entry points: [`templates/index.json`](https://github.com/debshopify/cosmetics/blob/main/templates/index.json) (Page templates), [`sections/main-product.liquid`](https://github.com/debshopify/cosmetics/blob/main/sections/main-product.liquid) (Product page), [`layout/theme.liquid`](https://github.com/debshopify/cosmetics/blob/main/layout/theme.liquid) (Theme layout), [`assets/product-form.js`](https://github.com/debshopify/cosmetics/blob/main/assets/product-form.js) (Product purchase)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Storefront presentation"]
  node_theme_layout["Theme layout<br/>[theme.liquid]"]
  node_page_templates["Page templates<br/>[index.json]"]
  node_product_page["Product page"]
  node_collection_page["Collection grid"]
  node_content_pages["Content sections"]
end

subgraph group_commerce["Shopping and cart"]
  node_product_purchase["Product purchase<br/>[product-form.js]"]
  node_cart_state["Cart interactions<br/>[cart.js]"]
  node_cart_drawer["Cart drawer<br/>[cart-drawer.liquid]"]
  node_quick_order["Quick ordering"]
end

subgraph group_discovery["Product discovery"]
  node_search["Search experience"]
  node_facets["Collection filters<br/>[facets.js]"]
  node_related_products["Related products"]
end

subgraph group_interaction["Browser interactions"]
  node_product_media["Product media<br/>[media-gallery.js]"]
  node_variant_picker["Variant selection<br/>[product-info.js]"]
  node_disclosures["Disclosure controls<br/>[disclosures.js]"]
  node_newsletter["Email signup<br/>[newsletter.liquid]"]
end

subgraph group_localization["Localization"]
  node_localization_forms["Locale selection"]
  node_translations["Theme translations<br/>[en.default.json]"]
end

node_visitor(("Storefront visitor"))
node_shopify{{"Shopify platform"}}

node_shopify -.->|"renders theme"| node_theme_layout
node_theme_layout -.->|"frames pages"| node_page_templates
node_page_templates -.->|"presents product"| node_product_page
node_page_templates -.->|"presents collection"| node_collection_page
node_page_templates -.->|"presents content"| node_content_pages
node_visitor -.->|"selects products"| node_product_purchase
node_product_page -.->|"offers purchase"| node_product_purchase
node_product_purchase -.->|"adds to cart"| node_shopify
node_visitor -.->|"updates cart"| node_cart_state
node_cart_state -.->|"updates display"| node_cart_drawer
node_visitor -.->|"orders in bulk"| node_quick_order
node_visitor -.->|"searches catalog"| node_search
node_visitor -.->|"filters results"| node_facets
node_collection_page -.->|"offers filters"| node_facets
node_product_page -.->|"shows recommendations"| node_related_products
node_visitor -.->|"views media"| node_product_media
node_product_page -.->|"offers variants"| node_variant_picker
node_visitor -.->|"opens details"| node_disclosures
node_visitor -.->|"signs up"| node_newsletter
node_visitor -.->|"chooses locale"| node_localization_forms
node_localization_forms -.->|"sets locale"| node_shopify
node_theme_layout -.->|"uses translations"| node_translations

click node_theme_layout "https://github.com/debshopify/cosmetics/blob/main/layout/theme.liquid"
click node_page_templates "https://github.com/debshopify/cosmetics/blob/main/templates/index.json"
click node_product_page "https://github.com/debshopify/cosmetics/blob/main/sections/main-product.liquid"
click node_collection_page "https://github.com/debshopify/cosmetics/blob/main/sections/main-collection-product-grid.liquid"
click node_content_pages "https://github.com/debshopify/cosmetics/blob/main/sections/main-article.liquid"
click node_product_purchase "https://github.com/debshopify/cosmetics/blob/main/assets/product-form.js"
click node_cart_state "https://github.com/debshopify/cosmetics/blob/main/assets/cart.js"
click node_cart_drawer "https://github.com/debshopify/cosmetics/blob/main/sections/cart-drawer.liquid"
click node_quick_order "https://github.com/debshopify/cosmetics/blob/main/assets/quick-order-list.js"
click node_search "https://github.com/debshopify/cosmetics/blob/main/assets/predictive-search.js"
click node_facets "https://github.com/debshopify/cosmetics/blob/main/assets/facets.js"
click node_related_products "https://github.com/debshopify/cosmetics/blob/main/sections/related-products.liquid"
click node_product_media "https://github.com/debshopify/cosmetics/blob/main/assets/media-gallery.js"
click node_variant_picker "https://github.com/debshopify/cosmetics/blob/main/assets/product-info.js"
click node_disclosures "https://github.com/debshopify/cosmetics/blob/main/assets/disclosures.js"
click node_newsletter "https://github.com/debshopify/cosmetics/blob/main/sections/newsletter.liquid"
click node_localization_forms "https://github.com/debshopify/cosmetics/blob/main/assets/localization-form.js"
click node_translations "https://github.com/debshopify/cosmetics/blob/main/locales/en.default.json"

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_theme_layout,node_page_templates,node_product_page,node_collection_page,node_content_pages toneBlue
class node_product_purchase,node_cart_state,node_cart_drawer,node_quick_order toneAmber
class node_search,node_facets,node_related_products toneMint
class node_product_media,node_variant_picker,node_disclosures,node_newsletter toneRose
class node_localization_forms,node_translations,node_visitor,node_shopify toneIndigo
```

## Components

### Storefront presentation

- [Theme layout](https://github.com/debshopify/cosmetics/blob/main/layout/theme.liquid): `layout/theme.liquid`
- [Page templates](https://github.com/debshopify/cosmetics/blob/main/templates/index.json): `templates/index.json`
- [Product page](https://github.com/debshopify/cosmetics/blob/main/sections/main-product.liquid): `sections/main-product.liquid`
- [Collection grid](https://github.com/debshopify/cosmetics/blob/main/sections/main-collection-product-grid.liquid): `sections/main-collection-product-grid.liquid`
- [Content sections](https://github.com/debshopify/cosmetics/blob/main/sections/main-article.liquid): `sections/main-article.liquid`

### Shopping and cart

- [Product purchase](https://github.com/debshopify/cosmetics/blob/main/assets/product-form.js): `assets/product-form.js`
- [Cart interactions](https://github.com/debshopify/cosmetics/blob/main/assets/cart.js): `assets/cart.js`
- [Cart drawer](https://github.com/debshopify/cosmetics/blob/main/sections/cart-drawer.liquid): `sections/cart-drawer.liquid`
- [Quick ordering](https://github.com/debshopify/cosmetics/blob/main/assets/quick-order-list.js): `assets/quick-order-list.js`

### Product discovery

- [Search experience](https://github.com/debshopify/cosmetics/blob/main/assets/predictive-search.js): `assets/predictive-search.js`
- [Collection filters](https://github.com/debshopify/cosmetics/blob/main/assets/facets.js): `assets/facets.js`
- [Related products](https://github.com/debshopify/cosmetics/blob/main/sections/related-products.liquid): `sections/related-products.liquid`

### Browser interactions

- [Product media](https://github.com/debshopify/cosmetics/blob/main/assets/media-gallery.js): `assets/media-gallery.js`
- [Variant selection](https://github.com/debshopify/cosmetics/blob/main/assets/product-info.js): `assets/product-info.js`
- [Disclosure controls](https://github.com/debshopify/cosmetics/blob/main/assets/disclosures.js): `assets/disclosures.js`
- [Email signup](https://github.com/debshopify/cosmetics/blob/main/sections/newsletter.liquid): `sections/newsletter.liquid`

### Localization

- [Locale selection](https://github.com/debshopify/cosmetics/blob/main/assets/localization-form.js): `assets/localization-form.js`
- [Theme translations](https://github.com/debshopify/cosmetics/blob/main/locales/en.default.json): `locales/en.default.json`

### Other components

- **Storefront visitor**
- **Shopify platform**

## Connections

- Shopify platform → Theme layout: renders theme
- Theme layout → Page templates: frames pages
- Page templates → Product page: presents product
- Page templates → Collection grid: presents collection
- Page templates → Content sections: presents content
- Storefront visitor → Product purchase: selects products
- Product page → Product purchase: offers purchase
- Product purchase → Shopify platform: adds to cart
- Storefront visitor → Cart interactions: updates cart
- Cart interactions → Cart drawer: updates display
- Storefront visitor → Quick ordering: orders in bulk
- Storefront visitor → Search experience: searches catalog
- Storefront visitor → Collection filters: filters results
- Collection grid → Collection filters: offers filters
- Product page → Related products: shows recommendations
- Storefront visitor → Product media: views media
- Product page → Variant selection: offers variants
- Storefront visitor → Disclosure controls: opens details
- Storefront visitor → Email signup: signs up
- Storefront visitor → Locale selection: chooses locale
- Locale selection → Shopify platform: sets locale
- Theme layout → Theme translations: uses translations
