How brandat-egy/frontend works
Brandat is an Arabic beauty-products storefront. Shoppers browse the home page, search and filter the catalog or browse categories, view product details, add items to a locally persisted cart or wishlist, then review the cart and confirm delivery details. Checkout confirmation is local only: the shown page explicitly says it does not send or save an order on a server. The graph follows documented imports and calls; unsampled routes and features are included where the source index identifies them, but their internal behavior is not inferred.
Main entry points: product.ts Product catalog data · CartContext.tsx Cart state · page.tsx Home page · ProductGrid.tsx Product grid
Components 26
Storefront
- Home page
src/app/page.tsx - Announcement bar
src/components/layout/AnnouncementBar.tsx - Hero section
src/components/layout/HeroSection.tsx - Category section
src/components/layout/CategorySection.tsx - Featured products
src/components/layout/FeaturedProducts.tsx - Category card
src/components/ui/CategoryCard.tsx
Catalog and products
- Shop route
src/app/shop/page.tsx - Search and filters
src/components/layout/ShopCatalog.tsx - Category route
src/app/categories/[slug]/page.tsx - Product detail
src/app/products/[id]/page.tsx - Product grid
src/components/ui/ProductGrid.tsx - Product card
src/components/ui/ProductCard.tsx - Add-to-cart button
src/components/ui/AddToCartButton.tsx
Cart and checkout
- Wishlist route
src/app/wishlist/page.tsx - Cart route
src/app/cart/page.tsx - Checkout confirmation
src/app/checkout/page.tsx - Cart state
src/context/CartContext.tsx
Shared data and shell
- Product queries
src/services/productService.ts - Product catalog data
src/data/product.ts - Category data
src/data/categories.ts - Product type
src/types/product.ts - Root layout
src/app/layout.tsx - Header
src/components/layout/Header.tsx - Main navigation
src/components/layout/MainNavigation.tsx
Other components
- Shopper
- Browser local storage
Connections 34
- Shopper → Home page: opens
- Home page → Announcement bar: renders
src/app/page.tsx - Home page → Hero section: renders
src/app/page.tsx - Home page → Category section: renders
src/app/page.tsx - Home page → Featured products: renders
src/app/page.tsx - Category section → Category data: reads
src/components/layout/CategorySection.tsx - Category section → Category card: renders
src/components/layout/CategorySection.tsx - Featured products → Product catalog data: reads
src/components/layout/FeaturedProducts.tsx - Featured products → Product card: renders
src/components/layout/FeaturedProducts.tsx - Shop route → Search and filters: renders
src/app/shop/page.tsx - Search and filters → Product catalog data: filters
src/components/layout/ShopCatalog.tsx - Search and filters → Category data: lists filters
src/components/layout/ShopCatalog.tsx - Search and filters → Product grid: renders results
src/components/layout/ShopCatalog.tsx - Category route → Product queries: queries products
src/app/categories/[slug]/page.tsx - Category route → Category data: reads
src/app/categories/[slug]/page.tsx - Category route → Product grid: renders results
src/app/categories/[slug]/page.tsx - Product detail → Product catalog data: reads details
src/app/products/[id]/page.tsx - Product detail → Add-to-cart button: renders
src/app/products/[id]/page.tsx - Product detail → Product grid: renders related
src/app/products/[id]/page.tsx - Wishlist route → Product catalog data: reads
src/app/wishlist/page.tsx - Wishlist route → Product grid: renders items
src/app/wishlist/page.tsx - Cart route → Cart state: reads and updates
src/app/cart/page.tsx - Checkout confirmation → Cart state: reads and clears
src/app/checkout/page.tsx - Product grid → Product card: renders
src/components/ui/ProductGrid.tsx - Product card → Cart state: adds product
src/components/ui/ProductCard.tsx - Product card → Browser local storage: reads and writes wishlist
src/components/ui/ProductCard.tsx - Add-to-cart button → Cart state: adds product
src/components/ui/AddToCartButton.tsx - Product queries → Product catalog data: queries
src/services/productService.ts - Product queries → Product type: uses type
src/services/productService.ts - Product catalog data → Product type: uses type
src/data/product.ts - Root layout → Header: renders
src/app/layout.tsx - Root layout → Cart state: provides cart
src/app/layout.tsx - Header → Cart state: reads cart
src/components/layout/Header.tsx - Main navigation → Shopper: provides links
src/components/layout/MainNavigation.tsx