[Brand Name] · Hydrogen storefront
A headless Shopify storefront. Hydrogen handles Storefront API + cart; you handle design. Checkout stays on Shopify (PCI + Shop Pay).
Source of truth
Shopify Admin is the source for products, collections, inventory, customers. Hydrogen reads via Storefront API. Cart state lives in a cookie. Orders flow through Shopify Checkout.
Tech stack
Hydrogen 2025 + Remix v3 + React 19 + TypeScript. Tailwind v4 for styling. @shopify/hydrogen for the cart, search, customer account, and Storefront API client. Oxygen for hosting (Shopify's edge platform) OR Vercel.
Deploy
- Local:
npm run dev(Hydrogen dev server) - Oxygen:
npx shopify hydrogen deploy --env=production - Vercel:
vercel deploy --prod(requires the Vercel-compatible adapter)
File map
app/root.tsxroot layout, Customer Account sessionapp/routes/_index.tsxhomeapp/routes/products.$handle.tsxPDPapp/routes/collections.$handle.tsxPLPapp/routes/cart.tsxcart drawer + pageapp/routes/account.*.tsxcustomer account routes (Hydrogen-provided)app/components/ProductCard, AddToCart, CartLineItemapp/lib/queries.tsStorefront API GraphQL queriesapp/lib/fragments.tsshared GraphQL fragmentshydrogen.config.tsstorefront ID, API version
.env keys
PUBLIC_STORE_DOMAINyour-store.myshopify.comPUBLIC_STOREFRONT_API_TOKENpublic Storefront API tokenPRIVATE_STOREFRONT_API_TOKENprivate token (server-side queries with higher limits)PUBLIC_CHECKOUT_DOMAINyourshop.yourbrand.comif domain-mapped, else myshopifyPUBLIC_CUSTOMER_ACCOUNT_API_URLSESSION_SECRETrandom 32-byte hex
Hard rules
- All product data via Storefront API. Never hard-code prices, inventory, or availability.
- Cart state via Hydrogen's CartProvider. Don't reinvent cart logic.
- Image URLs through Shopify CDN with the
transformquery params (width, format=webp). Don't proxy through your own server. - Checkout is Shopify's. Customers who try to "checkout in our app" want Shop Pay; let them.
- PDP must hit Lighthouse Performance 95+ on mobile. Hydrogen makes this achievable; default Shopify themes usually don't.
- Customer Account is OAuth-flowed via Shopify; do NOT roll your own auth.
Recent significant changes
- 2026-04-30: Scaffolded. Locked: Hydrogen + Remix v3 (the Shopify-supported path), Oxygen for hosting (zero-config edge), Tailwind v4 over Polaris (Polaris is for the admin, not storefronts).
Next session: start here
- Create or pick a Shopify store. Issue Storefront API tokens (admin -> apps -> develop apps).
- Map your domain or use the myshopify subdomain in dev.
- Build the home + collection + PDP routes. Confirm the cart drawer works.
- Test a real $1 order through Shopify Checkout end-to-end (Shop Pay too).
- Run Lighthouse against PDPs. Hit 95+ mobile before launching.