# shopify/timber architecture

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

## Overview

Timber is a Shopify theme framework: Shopify renders the theme to provide a storefront, and shoppers use its product, collection, cart, search, content, and account pages. The repository also includes shared layout, styling, and JavaScript assets, plus localized text. The README documents the theme’s purpose and template categories, but the sampled source does not show Liquid includes or runtime wiring, so those connections are omitted or marked unverified. The indexed Ruby files are test helpers, not product runtime components.

Main entry points: [`templates/index.liquid`](https://github.com/shopify/timber/blob/master/templates/index.liquid) (Home page), [`templates/page.liquid`](https://github.com/shopify/timber/blob/master/templates/page.liquid) (Pages and articles), [`templates/blog.liquid`](https://github.com/shopify/timber/blob/master/templates/blog.liquid) (Blog listing), [`templates/article.liquid`](https://github.com/shopify/timber/blob/master/templates/article.liquid) (Blog article)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront pages"]
  node_home["Home page<br/>[index.liquid]"]
  node_content["Pages and articles<br/>[page.liquid]"]
  node_blog["Blog listing<br/>[blog.liquid]"]
  node_article["Blog article<br/>[article.liquid]"]
  node_notfound["Not found<br/>[404.liquid]"]
  node_search["Search page<br/>[search.liquid]"]
end

subgraph group_commerce["Commerce flows"]
  node_collections["Collection pages<br/>[collection.liquid]"]
  node_collection_list["Collection directory"]
  node_products["Product page<br/>[product.liquid]"]
  node_cart["Cart page<br/>[cart.liquid]"]
  node_giftcard["Gift card<br/>[gift_card.liquid]"]
  node_ajax_cart["AJAX cart"]
end

subgraph group_shared["Shared presentation"]
  node_layout["Theme layout<br/>[theme.liquid]"]
  node_theme_assets["Theme styles and scripts<br/>[timber.scss.liquid]"]
  node_snippets["Reusable theme snippets"]
  node_locales["Translations"]
end

subgraph group_accounts["Customer accounts"]
  node_customer_account["Account pages<br/>[account.liquid]"]
  node_customer_auth["Account access<br/>[login.liquid]"]
  node_customer_orders["Addresses and orders<br/>[addresses.liquid]"]
end

node_shopify(("Shopify platform"))
node_shopper(("Store visitor"))

node_shopify -.->|"renders theme"| node_layout
node_shopper -.->|"browses store"| node_shopify
node_shopify -.->|"renders page"| node_home
node_shopify -.->|"renders page"| node_content
node_shopify -.->|"renders page"| node_blog
node_shopify -.->|"renders page"| node_article
node_shopify -.->|"renders page"| node_notfound
node_shopify -.->|"renders page"| node_search
node_shopify -.->|"renders page"| node_collections
node_shopify -.->|"renders page"| node_collection_list
node_shopify -.->|"renders page"| node_products
node_shopify -.->|"renders page"| node_cart
node_shopify -.->|"renders page"| node_giftcard
node_shopify -.->|"renders page"| node_customer_account
node_shopify -.->|"renders page"| node_customer_auth
node_shopify -.->|"renders page"| node_customer_orders

click node_layout "https://github.com/shopify/timber/blob/master/layout/theme.liquid"
click node_home "https://github.com/shopify/timber/blob/master/templates/index.liquid"
click node_content "https://github.com/shopify/timber/blob/master/templates/page.liquid"
click node_blog "https://github.com/shopify/timber/blob/master/templates/blog.liquid"
click node_article "https://github.com/shopify/timber/blob/master/templates/article.liquid"
click node_notfound "https://github.com/shopify/timber/blob/master/templates/404.liquid"
click node_search "https://github.com/shopify/timber/blob/master/templates/search.liquid"
click node_collections "https://github.com/shopify/timber/blob/master/templates/collection.liquid"
click node_collection_list "https://github.com/shopify/timber/blob/master/templates/collection.list.liquid"
click node_products "https://github.com/shopify/timber/blob/master/templates/product.liquid"
click node_cart "https://github.com/shopify/timber/blob/master/templates/cart.liquid"
click node_giftcard "https://github.com/shopify/timber/blob/master/templates/gift_card.liquid"
click node_customer_account "https://github.com/shopify/timber/blob/master/templates/customers/account.liquid"
click node_customer_auth "https://github.com/shopify/timber/blob/master/templates/customers/login.liquid"
click node_customer_orders "https://github.com/shopify/timber/blob/master/templates/customers/addresses.liquid"
click node_theme_assets "https://github.com/shopify/timber/blob/master/assets/timber.scss.liquid"
click node_ajax_cart "https://github.com/shopify/timber/blob/master/assets/ajax-cart.js.liquid"
click node_snippets "https://github.com/shopify/timber/tree/master/snippets"
click node_locales "https://github.com/shopify/timber/tree/master/locales"

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_content,node_blog,node_article,node_notfound,node_search toneBlue
class node_collections,node_collection_list,node_products,node_cart,node_giftcard,node_ajax_cart toneAmber
class node_layout,node_theme_assets,node_snippets,node_locales toneMint
class node_customer_account,node_customer_auth,node_customer_orders toneRose
class node_shopify,node_shopper toneIndigo
```

## Components

### Storefront pages

- [Home page](https://github.com/shopify/timber/blob/master/templates/index.liquid): `templates/index.liquid`
- [Pages and articles](https://github.com/shopify/timber/blob/master/templates/page.liquid): `templates/page.liquid`
- [Blog listing](https://github.com/shopify/timber/blob/master/templates/blog.liquid): `templates/blog.liquid`
- [Blog article](https://github.com/shopify/timber/blob/master/templates/article.liquid): `templates/article.liquid`
- [Not found](https://github.com/shopify/timber/blob/master/templates/404.liquid): `templates/404.liquid`
- [Search page](https://github.com/shopify/timber/blob/master/templates/search.liquid): `templates/search.liquid`

### Commerce flows

- [Collection pages](https://github.com/shopify/timber/blob/master/templates/collection.liquid): `templates/collection.liquid`
- [Collection directory](https://github.com/shopify/timber/blob/master/templates/collection.list.liquid): `templates/collection.list.liquid`
- [Product page](https://github.com/shopify/timber/blob/master/templates/product.liquid): `templates/product.liquid`
- [Cart page](https://github.com/shopify/timber/blob/master/templates/cart.liquid): `templates/cart.liquid`
- [Gift card](https://github.com/shopify/timber/blob/master/templates/gift_card.liquid): `templates/gift_card.liquid`
- [AJAX cart](https://github.com/shopify/timber/blob/master/assets/ajax-cart.js.liquid): `assets/ajax-cart.js.liquid`

### Shared presentation

- [Theme layout](https://github.com/shopify/timber/blob/master/layout/theme.liquid): `layout/theme.liquid`
- [Theme styles and scripts](https://github.com/shopify/timber/blob/master/assets/timber.scss.liquid): `assets/timber.scss.liquid`
- [Reusable theme snippets](https://github.com/shopify/timber/tree/master/snippets): `snippets`
- [Translations](https://github.com/shopify/timber/tree/master/locales): `locales`

### Customer accounts

- [Account pages](https://github.com/shopify/timber/blob/master/templates/customers/account.liquid): `templates/customers/account.liquid`
- [Account access](https://github.com/shopify/timber/blob/master/templates/customers/login.liquid): `templates/customers/login.liquid`
- [Addresses and orders](https://github.com/shopify/timber/blob/master/templates/customers/addresses.liquid): `templates/customers/addresses.liquid`

### Other components

- **Shopify platform**
- **Store visitor**

## Connections

- Shopify platform → Theme layout: renders theme
- Store visitor → Shopify platform: browses store
- Shopify platform → Home page: renders page
- Shopify platform → Pages and articles: renders page
- Shopify platform → Blog listing: renders page
- Shopify platform → Blog article: renders page
- Shopify platform → Not found: renders page
- Shopify platform → Search page: renders page
- Shopify platform → Collection pages: renders page
- Shopify platform → Collection directory: renders page
- Shopify platform → Product page: renders page
- Shopify platform → Cart page: renders page
- Shopify platform → Gift card: renders page
- Shopify platform → Account pages: renders page
- Shopify platform → Account access: renders page
- Shopify platform → Addresses and orders: renders page
