Routes

Every URL in the storefront mapped to its source file and purpose.

Pages

RouteFileDescription
/app/page.tsxHome page with hero, featured products, info section
/products/[handle]app/products/[handle]/page.tsxProduct detail page (default variant)
/products/[handle]/[variantId]app/products/[handle]/[variantId]/page.tsxProduct detail page (specific variant)
/collections/[handle]app/collections/[handle]/page.tsxCollection listing with filters, sort, pagination
/searchapp/search/page.tsxSearch results (same grid as collections)
/cartapp/cart/page.tsxFull cart page with upsells
/pages/[slug]app/pages/[slug]/page.tsxCMS-driven marketing pages
/aboutapp/about/page.tsxAbout page

API routes

RouteFileDescription
POST /api/webhooks/shopifyapp/api/webhooks/shopify/route.tsShopify webhook handler for cache invalidation
POST /api/chatapp/api/chat/route.tsAI shopping assistant endpoint
GET /api/draftapp/api/draft/route.tsDraft mode toggle for content preview

URL rewrites

The following rewrite in next.config.ts enables variant selection via query parameters:

SourceDestinationPurpose
/products/:handle?variantId=:variantId/products/:handle/:variantIdMaps variant query param to route segment

Chat

Tip: You can open and close chat with I

0 / 1000