name: commercetools-frontend
description: Production-tested patterns for commercetools storefronts — Next.js, React, PDP/PLP, cart, checkout, SEO, and performance from a Platinum partner with 50+ live implementations.
commercetools Frontend & Storefront Development
Two Development Paths
This skill covers two distinct approaches to building storefronts on commercetools:
Both approaches share patterns for product pages, cart/checkout UI, and performance/SEO. B2B patterns layer on top of either approach.
How to Use This Skill
- Identify which approach you are using (commercetools Frontend or headless Next.js)
- Load the relevant architecture file first
- Then load the page-type-specific reference for your current task
- Reference files contain correct/incorrect code pairs, checklists, and pitfall warnings
Progressive loading -- only load what you need:
- Using commercetools Frontend extensions, data sources, actions? Load
references/ct-frontend-extensions.md
- Using commercetools Frontend components, Studio, renderer? Load
references/ct-frontend-components.md
- Building a headless Next.js storefront? Load
references/storefront-architecture.md
- Building product listing pages (PLP, filtering, pagination)? Load
references/product-listing-pages.md
- Building product detail pages (PDP, variants, product cards)? Load
references/product-detail-pages.md
- Building cart UI? Load
references/cart-ui.md
- Building checkout flows? Load
references/checkout-ui.md
- Optimizing frontend performance (images, LCP, code splitting)? Load
references/frontend-performance.md
- Optimizing SEO (structured data, meta tags, sitemap)? Load
references/frontend-seo.md
- Building a B2B storefront (business units, quotes, approvals)? Load
references/b2b-frontend.md
CRITICAL Priority
HIGH Priority
MEDIUM Priority
Common Frontend Anti-Patterns (Quick Reference)
| Anti-Pattern |
File |
Consequence |
| Fetching product data client-side |
references/storefront-architecture.md |
Exposes API credentials, no SSR benefits, poor SEO |
Using getServerSideProps for static catalog pages |
references/storefront-architecture.md |
Every page visit hits the API, wastes quota, slow TTFB |
| Not implementing optimistic cart updates |
references/cart-ui.md |
UI freezes on every add-to-cart, feels broken |
| Loading all product images at full resolution |
references/frontend-performance.md |
5-10MB page weight, failed Core Web Vitals |
| Fetching all product attributes when you need 3 |
references/product-detail-pages.md |
5-10x response payload, slower rendering |
| Building search from scratch instead of using Product Search API |
references/product-listing-pages.md |
Poor relevance, no faceting, slow queries |
| Missing error boundaries around commerce data |
references/storefront-architecture.md |
One failed API call crashes the entire page |
| Hardcoding locale/currency instead of using routing |
references/storefront-architecture.md |
Broken multi-market support, wrong prices |
MCP Complement
Use this skill for storefront patterns, then use the Developer MCP to look up field names and schemas, and the Commerce MCP for CRUD operations.