How 3mrjarrar/thedonutstop works
The Donut Stop is a bilingual donut storefront with branch-specific menus, promotions, cart checkout and guest order tracking, alongside staff administration for orders, inventory and offers. Routes feed the home, menu, cart and admin experiences; storefront data and ordering depend on Supabase. The graph combines sampled call relationships with capabilities explicitly described in the README. Some admin, tracking and menu implementation details were not excerpted, so their links are limited to documented or indexed evidence.
Main entry points: supabase.js Supabase services · routes.jsx Route selection · Admin.jsx Admin console · CartPage.jsx Cart page
Components 23
Storefront
- Home sections
src/pages/Home/Home.jsx - Featured products
src/components/FeaturedProducts/FeaturedProducts.jsx - Menu page
src/pages/Menu/Menu.jsx - Branch menu
src/components/menu/BranchMenu.jsx - Product catalog
src/components/menu/menuData.js - Offer display
src/components/Offers/Offers.jsx
Ordering
- Cart page
src/pages/Cart/CartPage.jsx - Cart state and quote
src/components/cart/CartContext.jsx - Checkout
src/components/cart/Cart.jsx - Guest tracking
src/components/orders/OrderTrackingContext.jsx - Tracking card
src/components/orders/OrderTracker.jsx
Staff operations
- Admin console
src/pages/Admin/Admin.jsx - Order management
src/pages/Admin/Orders.jsx - Offer management
src/pages/Admin/AdminOffers.jsx - Inventory management
src/pages/Admin/InventoryEditor.jsx
Shared services
- Route selection
src/app/routes.jsx - Shared layout
src/app/MainLayout.jsx - Language context
src/i18n/LanguageContext.jsx - Supabase services
src/lib/supabase.js - Offer data and rules
src/lib/offerCatalog.js - Browser storage
Other components
- Shopper
- Staff user
Connections 33
- Shopper → Route selection: opens pages
src/app/routes.jsx - Staff user → Route selection: opens admin
src/app/routes.jsx - Route selection → Shared layout: wraps storefront
src/app/routes.jsx - Route selection → Home sections: routes home
src/app/routes.jsx - Route selection → Menu page: routes menu
src/app/routes.jsx - Route selection → Cart page: routes cart
src/app/routes.jsx - Route selection → Admin console: routes admin
src/app/routes.jsx - Home sections → Featured products: renders section
src/pages/Home/Home.jsx - Home sections → Offer display: renders section
src/pages/Home/Home.jsx - Featured products → Product catalog: reads products
src/components/FeaturedProducts/FeaturedProducts.jsx - Menu page → Branch menu: renders menu
src/pages/Menu/Menu.jsx - Branch menu → Product catalog: uses catalog
src/components/menu/BranchMenu.jsx - Branch menu → Supabase services: reads availability
src/components/menu/BranchMenu.jsx - Offer display → Offer data and rules: formats offers
src/components/Offers/Offers.jsx - Cart page → Cart state and quote: uses cart
src/pages/Cart/CartPage.jsx - Cart page → Checkout: renders checkout
src/pages/Cart/CartPage.jsx - Cart page → Supabase services: refreshes menu
src/pages/Cart/CartPage.jsx - Cart state and quote → Supabase services: requests quote
src/components/cart/CartContext.jsx - Cart state and quote → Offer data and rules: prices offers
src/components/cart/CartContext.jsx - Checkout → Supabase services: submits order
src/components/cart/Cart.jsx - Checkout → Guest tracking: records order
src/components/cart/Cart.jsx - Tracking card → Guest tracking: reads tracking state
- Guest tracking → Browser storage: persists tokens
src/components/orders/OrderTrackingContext.jsx - Guest tracking → Supabase services: fetches status
README.md - Admin console → Order management: renders orders
src/pages/Admin/Admin.jsx - Admin console → Offer management: renders offers
src/pages/Admin/Admin.jsx - Admin console → Inventory management: renders inventory
src/pages/Admin/Admin.jsx - Admin console → Supabase services: manages records
src/pages/Admin/Admin.jsx - Order management → Supabase services: reads orders
src/pages/Admin/Orders.jsx - Offer management → Supabase services: updates campaigns
src/pages/Admin/AdminOffers.jsx - Offer management → Offer data and rules: uses definitions
src/pages/Admin/AdminOffers.jsx - Inventory management → Supabase services: updates stock
README.md - Shared layout → Language context: uses language
src/app/MainLayout.jsx