Learning center

Understand the system before changing the files.

A practical model of layouts, templates, sections, snippets, assets, config, locales and app extensions.

Direct answer

Give merchants and developers a shared mental model before changing a production storefront.

For merchants, product teams and developers

A practical map of Shopify theme architecture

Shopify themes are easier to change when everyone shares the same map. A storefront page is assembled from templates, sections, snippets, assets, settings, store data and app extensions. Understanding which layer owns a behavior helps teams make smaller and safer changes.

Theme map

What each major theme directory is responsible for

Directory or surfacePrimary responsibilityCommon risk
layoutThe outer document structure and global theme shellA global edit can affect every page and injected application
templatesSelect the sections used for products, collections, pages, blogs and other resourcesReplacing a JSON template can discard configured section state
sectionsMerchant-configurable storefront components and blocksSchema changes can reset settings or break app blocks
snippetsReusable Liquid fragmentsA shared snippet edit may affect many templates unexpectedly
assetsCSS, JavaScript, images, fonts and supporting filesGlobal assets can create performance or interaction regressions everywhere
configTheme settings definitions and saved global settingsRenaming IDs can disconnect merchant configuration
localesTranslated storefront and theme-editor stringsHard-coded copy can bypass localization
theme app extensionsApp blocks and app-provided theme behaviorTheme code may depend on an application that owns the integration lifecycle
Trace a request

Follow the behavior before choosing a file to edit

A file name that looks relevant is not always the owner of the behavior. A product-price snippet may render in the main product section, quick view, featured product and recommendations. A global CSS rule may style all of them even when the merchant requested a change in one location.

Trace the render path and the interaction path separately. Liquid may create the markup while JavaScript, app blocks or section reload events control the behavior after the page loads.

Workflow
  1. Start with the visible customer outcome
  2. Identify the page template and resource type
  3. Find the section responsible for the component
  4. Trace rendered snippets and dynamic data
  5. Identify CSS, JavaScript and app dependencies
  6. Review merchant-configured settings
  7. Choose the smallest stable implementation surface
Worked example

How a product page is assembled

Example request

Move product trust badges below the purchase form

Request: Move the trust-badge block below the add-to-cart area on product pages without affecting featured products.

  1. Identify the product JSON template used by the affected products.
  2. Find the main product section and confirm whether the badge is a native block, snippet or app block.
  3. Check whether the same section type is used in featured-product components.
  4. Inspect the section schema and saved block order before changing code.
  5. Prefer a merchant-configurable block position when the architecture supports it.
  6. Test normal products, subscriptions, sold-out states and mobile layout.
  7. Confirm featured-product and quick-view surfaces remain unchanged unless included in scope.

Review point: The correct solution may be a theme-editor configuration change rather than code. Architecture review should find the smallest intervention, not assume every request requires editing Liquid.

Decision support

Choose the layer that owns the requirement

RequirementLikely ownerAvoid
Merchant should control content or enablementSection or theme settingHard-coded copy or product-handle conditions
Same markup appears in several componentsShared snippet or reusable section patternIndependent copies that drift
One template needs a different arrangementJSON template or template-specific settingGlobal CSS hacks that hide elements elsewhere
Behavior depends on product dataMetafield, metaobject or Shopify objectParsing titles or tags without governance
Interactive behaviorScoped asset or component JavaScriptInline scripts rendered repeatedly inside Liquid loops
App-owned functionalityTheme app extension or documented app integrationEditing generated app code without confirming ownership
Configuration safety

Theme architecture includes merchant data, not only files

Before restructuring

  • Inventory JSON templates using the section type.
  • Record section IDs, block types and setting IDs.
  • Identify dynamic sources, metafields and app blocks.
  • Review global theme settings referenced by the component.
  • Confirm whether merchants duplicate and configure the section in several places.

After restructuring

  • Existing configured content still renders.
  • Theme-editor labels and controls remain understandable.
  • New defaults do not overwrite saved values.
  • Section reordering and block limits still work.
  • JavaScript reinitializes correctly after theme-editor section events.
Common mistakes

Patterns that make future changes harder

  • Adding every new rule to one global JavaScript or CSS file without component boundaries.
  • Copying entire sections to create small variants instead of extracting a reusable pattern.
  • Using product titles, handles or undocumented tags as permanent business logic.
  • Renaming schema setting IDs without migrating or preserving saved configuration.
  • Treating app-generated markup as theme-owned code.
  • Editing the layout for a requirement that belongs to one template.
  • Building a new component before checking whether the theme already contains an unused configurable version.
Team workflow

Architecture becomes more important when several people edit the theme

A theme edited directly by merchants, agencies, apps and internal developers can accumulate conflicting ownership. Define which changes belong in source control, which settings belong in the theme editor and who can modify the live theme.

For larger teams, use branches or isolated development themes, review diffs and establish a release owner. A duplicate theme alone does not prevent two teams from changing the same file in different directions.

Code ownership

Record which team owns global assets, components and app integrations.

Configuration ownership

Let merchants control approved settings and content without editing source files.

Release ownership

Use one attributable path for merging, publishing and verifying changes.

Conflict handling

Stop and reconcile when the current live source differs from the reviewed baseline.

Definition

Shopify theme architecture needs a clear engineering definition.

The guide explains layouts, templates, sections, blocks, snippets, assets, configuration and locales so the reader can distinguish a reliable workflow from a generic code suggestion.

Inspection

Map the current state before changing files.

Review layouts, templates, sections, blocks, snippets, assets, configuration and locales, identify the affected templates and document dependencies or assumptions.

Scope

Use a change map that identifies dependencies and merchant-editor consequences.

The implementation should be small enough to review, explicit enough to test and isolated from unrelated storefront work.

Validation

Combine structural tooling with a working storefront preview.

Automated checks catch defined failure classes; mobile, desktop, content extremes and interactions still require inspection.

Approval

Record the diff, evidence, approver and release decision.

Production should change only after the staged result and remaining risks are understandable.

Boundary

Avoid editing files before understanding how the page is assembled.

The guide preserves uncertainty and routes complex work to experienced engineers instead of offering a false guarantee.

Written and technically reviewed by

Samuel leads Shopify performance, CRO and technical optimization work for DTC brands across the U.S. and LATAM. He has worked in the Shopify ecosystem since 2015 and specializes in Liquid, technical SEO, performance and execution systems.

  • Shopify Partner since 2015
  • 750+ Shopify engagements completed
  • 150+ full Shopify builds
  • 30+ complex migrations across 35 markets
  • Specialist in Liquid, technical SEO, performance and CRO
Published 2026-07-26Updated 2026-07-268 min
Primary references

Sources used for this comparison

Capabilities change over time. These links point to the alternative provider’s own current documentation and should be reviewed during future updates.

Next step

Connect the store. Start with evidence.

Connect your store to compare the guidance with findings from your own theme.