How zhelukevich/plum works
PLUM is a localized apparel storefront. The principal customer flow is browsing the catalog, opening a product, adding a selected variant to the cart, and proceeding through checkout and payment. Additional routes cover orders, gift cards, a secret store, and informational pages. The graph reflects sampled source and SOURCE INDEX references; several routes and integrations are listed in the tree but were not sampled, so their internal behavior is not inferred.
Main entry points: [handle].tsx Product detail · index.tsx Product catalog · checkout.tsx Checkout · cart-provider.tsx Cart state and API
Components 24
Shopping and checkout
- Product catalog
src/pages/[locale]/index.tsx - Product detail
src/pages/[locale]/products/[handle].tsx - Checkout
src/pages/[locale]/checkout.tsx - Order history
src/pages/[locale]/orders/index.tsx - Gift cards
src/pages/[locale]/gift-card.tsx - Secret store
src/pages/[locale]/secret-store.tsx - About and policies
src/pages/[locale]/about.tsx - Commerce API
- Payment service
Cart and locale state
- Cart state and API
src/context/cart-provider.tsx - Locale state
src/context/locale-provider.tsx
Storefront experience
- Navigation and cart
src/components/Navbar.tsx - Photo gallery
src/components/PhotoGallery.tsx - Recommendations
src/components/ProductRecommendations.tsx - Subscribe form
src/components/SubscribeForm.tsx - Footer
src/components/Footer.tsx - Icon set
src/components/Icons.tsx
Localization
- Localized links
src/components/Link.tsx - Language switch
src/components/LanguageSwitchButton.tsx - Language detection
src/lib/languageDetector.js - Locale redirect
src/lib/redirect.js - Static translations
src/lib/getStatic.js - i18n configuration
next-i18next.config.js
Other components
- Shopper
Connections 27
- Shopper → Product catalog: browses
src/pages/[locale]/index.tsx - Product catalog → Commerce API: fetches products
src/pages/[locale]/index.tsx - Shopper → Product detail: opens product
src/pages/[locale]/products/[handle].tsx - Product detail → Commerce API: fetches product
src/pages/[locale]/products/[handle].tsx - Product detail → Cart state and API: adds variant
src/pages/[locale]/products/[handle].tsx - Product detail → Photo gallery: renders gallery
src/pages/[locale]/products/[handle].tsx - Product detail → Recommendations: renders recommendations
src/pages/[locale]/products/[handle].tsx - Shopper → Checkout: checks out
src/pages/[locale]/checkout.tsx - Checkout → Cart state and API: reads and updates
src/pages/[locale]/checkout.tsx - Cart state and API → Commerce API: requests cart data
src/context/cart-provider.tsx - Checkout → Payment service: starts payment
src/pages/[locale]/checkout.tsx - Checkout → Locale state: reads language
src/pages/[locale]/checkout.tsx - Product catalog → Subscribe form: renders form
src/pages/[locale]/index.tsx - Product catalog → Navigation and cart: renders navigation
src/pages/[locale]/index.tsx - Product catalog → Footer: renders footer
src/pages/[locale]/index.tsx - Navigation and cart → Cart state and API: reads cart count
src/components/Navbar.tsx - Navigation and cart → Language switch: renders switch
src/components/Navbar.tsx - Language switch → Language detection: detects language
src/components/LanguageSwitchButton.tsx - Language switch → Locale state: reads locale
src/components/LanguageSwitchButton.tsx - Locale state → Language detection: detects language
src/context/locale-provider.tsx - Locale redirect → Language detection: detects and caches
src/lib/redirect.js - Static translations → i18n configuration: uses locales
src/lib/getStatic.js - Product detail → Static translations: loads translations
src/pages/[locale]/products/[handle].tsx - Checkout → Static translations: loads translations
src/pages/[locale]/checkout.tsx - Order history → Cart state and API: uses cart state
src/pages/[locale]/orders/index.tsx - About and policies → Navigation and cart: renders navigation
src/pages/[locale]/about.tsx - About and policies → Footer: renders footer
src/pages/[locale]/about.tsx