This file is for any AI coding assistant (Claude, Codex, Cursor, etc.) working in this repository.
- Keep the starter aligned with Shopify docs-first patterns.
- Keep TypeScript for behavior and Liquid for markup.
- Keep customization safe via stable
data-jscontracts.
- Do not generate cart/minicart/search HTML strings in TS.
- Do not add
{% render 'vite-tag' %}in sections/snippets. - Keep entrypoint routing centralized in
layout/theme.liquid. - Keep API calls user-driven where required by this starter architecture.
- Global bootstrap:
frontend/entrypoints/ts/theme.ts - Cart drawer logic:
frontend/entrypoints/ts/cart/drawer.ts - Cart page logic:
frontend/entrypoints/ts/cart/page.ts - Product logic:
frontend/entrypoints/ts/product.ts+frontend/entrypoints/ts/product/* - Collection logic:
frontend/entrypoints/ts/collection.ts - Search drawer logic:
frontend/entrypoints/ts/search/drawer.ts - Liquid markup:
sections/**,snippets/**
- Cart mutations use bundled section rendering (
sections,sections_url). - Single section rendering (
?section_id=) is used only where explicitly intended (e.g. drawer hydration). - Locale-aware routes use
window.Shopify.routes.root.
- Cart drawer:
cart-drawer,cart-open,cart-close,cart-items,cart-empty,cart-subtotal - Cart page:
cart-page,cart-page-items,cart-page-empty,cart-page-footer,cart-page-subtotal - Product:
product-form,option-value,thumbnail,add-to-cart,cart-status - Collection:
collection-root,collection-controls,collection-products,collection-load-more,collection-quick-buy - Search drawer:
search-drawer,search-open,search-close,search-drawer-input,search-drawer-groups
Run these before considering work complete:
bun run typecheck
bun run buildIf available in the environment:
theme-checkFor branches connected directly to a Shopify theme, generated assets must be committed:
assets/*assets/.vite/manifest.jsonsnippets/vite-tag.liquid
- Read
CLAUDE.md,README.md, and this file. - Edit TS behavior and Liquid markup in their correct layers.
- Preserve
data-jshooks unless intentionally migrating both TS + Liquid. - Run typecheck/build.
- Update docs/todo when architecture contracts change.