Routes
Every URL in the storefront mapped to its source file and purpose.
Pages
| Route | File | Description |
|---|---|---|
/ | app/page.tsx | Home page with hero, featured products, info section |
/products/[handle] | app/products/[handle]/page.tsx | Product detail page; ?variant= selects a specific variant |
/collections/[handle] | app/collections/[handle]/page.tsx | Collection listing with filters, sort, pagination |
/collections/all | app/collections/[handle]/page.tsx | Virtual "All Products" listing; synthesized since Shopify's Storefront API has no all collection |
/search | app/search/page.tsx | Search results (same grid as collections) |
/cart | app/cart/page.tsx | Full cart page with upsells |
/pages/[slug] | app/pages/[slug]/page.tsx | CMS-driven marketing pages |
/about | app/about/page.tsx | About page |
API routes
| Route | File | Description |
|---|---|---|
POST /api/webhooks/shopify | app/api/webhooks/shopify/route.ts | Shopify webhook handler for cache invalidation |
POST /api/chat | app/api/chat/route.ts | AI shopping assistant endpoint |
GET /api/draft | app/api/draft/route.ts | Draft mode toggle for content preview |
Variant URLs
Product variant selection uses Shopify's standard variant query parameter directly on the product route:
| URL | Purpose |
|---|---|
/products/:handle?variant=:variantId | Opens the product page with the matching variant selected |