How oloom2006sec/berna-foods works
Berna Foods is a React storefront for browsing packaged foods, applying promotions, managing a cart and wishlist, placing orders, and tracking them; it also includes administrative catalog, order, and settings workflows. The shopper path runs from the routed storefront and product pages through cart and checkout to order persistence and tracking. Admin pages manage catalog, orders, and store configuration. The graph reflects relationships visible in excerpts, the source index, or explicit project text; unsampled implementation details and external service wiring are not inferred.
Main entry points: App.jsx App Router · ProductCard.jsx Product Card · CartContext.jsx Cart State · ProductDetails.jsx Product Details
Components 34
Storefront
- App Router
src/App.jsx - Home Promotions
src/App.jsx - Product Listing
src/pages/Products.jsx - Product Details
src/pages/ProductDetails.jsx - Product Card
src/components/ProductCard.jsx - Promotion Displays
src/components/BundleOffersSection.jsx - Campaign Popup
src/components/CampaignPopup.jsx - Wishlist Page
src/pages/Wishlist.jsx
Shopping and Orders
- Cart State
src/context/CartContext.jsx - Cart Drawer
src/components/CartDrawer.jsx - Checkout
src/pages/Checkout.jsx - Order Service
src/services/orderService.js - Order Tracking
src/pages/OrderTracking.jsx - Shipping Service
src/services/shippingService.js - Payment Instructions
src/components/PaymentInstructions.jsx
Administration
- Admin Login
src/pages/AdminLogin.jsx - Admin Dashboard
src/pages/AdminDashboard.jsx - Admin Orders
src/pages/AdminOrders.jsx - Admin Catalog
src/pages/AdminCatalog.jsx - Admin Route Guard
src/components/AdminRoute.jsx
Product and State
- Wishlist State
src/context/WishlistContext.jsx - Store Settings
src/context/StoreSettingsContext.jsx - Settings Service
src/services/storeSettingsService.js - Product Catalog
src/data/products.js - Product Content
src/data/productContent.js - Product Details Data
src/data/productDetails.js - Product Grouping
src/utils/productGroups.js - Promotion Pricing
src/utils/promotionPricing.js - Promotion Data
src/data/homePromotions.js - Popularity Logic
src/utils/productPopularity.js - Supabase Client
src/lib/supabase.js
Other components
- Shopper
- Administrator
- Supabase
Connections 48
- Shopper → App Router: browses
src/App.jsx - App Router → Home Promotions: routes to
src/App.jsx - App Router → Product Listing: routes to
src/App.jsx - App Router → Product Details: routes to
src/App.jsx - App Router → Checkout: routes to
src/App.jsx - App Router → Wishlist Page: routes to
src/App.jsx - App Router → Order Tracking: routes to
src/App.jsx - App Router → Admin Dashboard: routes to
src/App.jsx - App Router → Admin Orders: routes to
src/App.jsx - App Router → Admin Catalog: routes to
src/App.jsx - Home Promotions → Promotion Displays: renders
src/App.jsx - Home Promotions → Campaign Popup: renders
src/App.jsx - Home Promotions → Product Card: renders
src/App.jsx - Home Promotions → Product Grouping: groups products
src/App.jsx - Product Listing → Product Card: renders
src/pages/Products.jsx - Product Listing → Product Grouping: groups products
src/pages/Products.jsx - Product Details → Product Card: renders
src/pages/ProductDetails.jsx - Product Details → Cart State: adds items
src/pages/ProductDetails.jsx - Product Details → Product Grouping: groups products
src/pages/ProductDetails.jsx - Product Details → Product Details Data: reads details
src/pages/ProductDetails.jsx - Product Card → Cart State: adds items
src/components/ProductCard.jsx - Product Card → Wishlist State: toggles wishlist
src/components/ProductCard.jsx - Product Card → Product Details Data: reads details
src/components/ProductCard.jsx - Product Card → Promotion Pricing: gets pricing
src/components/ProductCard.jsx - Product Card → Store Settings: reads settings
src/components/ProductCard.jsx - Promotion Displays → Cart State: adds bundles
src/components/BundleOffersSection.jsx - Promotion Displays → Product Grouping: groups products
src/components/BundleOffersSection.jsx - Promotion Displays → Wishlist State: uses wishlist
src/components/BundleOffersSection.jsx - Campaign Popup → Promotion Data: reads promotions
src/components/CampaignPopup.jsx - Campaign Popup → Store Settings: reads settings
src/components/CampaignPopup.jsx - Wishlist Page → Wishlist State: reads wishlist
src/pages/Wishlist.jsx - Wishlist Page → Product Card: renders
src/pages/Wishlist.jsx - Wishlist State → Shopper: persists locally
src/context/WishlistContext.jsx - Shopper → Cart Drawer: opens cart
- Cart Drawer → Cart State: reads cart
src/components/Header.jsx - Cart State → Promotion Pricing: gets pricing
src/context/CartContext.jsx - Cart State → Product Catalog: reads products
src/context/CartContext.jsx - Cart State → Product Grouping: groups products
src/context/CartContext.jsx - Cart State → Store Settings: reads settings
src/context/CartContext.jsx - Checkout → Cart State: reads cart
src/pages/Checkout.jsx - Checkout → Order Service: creates order
src/pages/Checkout.jsx - Checkout → Shipping Service: gets shipping
src/pages/Checkout.jsx - Checkout → Payment Instructions: renders
src/pages/Checkout.jsx - Order Tracking → Order Service: loads order
src/pages/OrderTracking.jsx - Order Tracking → Payment Instructions: renders
src/pages/OrderTracking.jsx - Order Service → Supabase Client: queries
src/services/orderService.js - Supabase Client → Supabase: connects
src/lib/supabase.js - Administrator → Admin Login: signs in
src/pages/AdminLogin.jsx