How saainikhil/peddammas-kitchen works
Peddamma’s Kitchen is a React storefront for browsing traditional foods and placing orders. The main journey is routed through the app: customers browse the catalog and product details, add items to a cart or buy now, then complete checkout and reach order success. Account pages provide login, profile, saved addresses, and order history. State is primarily browser-local: authentication uses localStorage directly, while cart and page data use a shared persistence hook. The excerpts show no backend or payment-service integration; unsampled page behavior is represented cautiously.
Main entry points: App.jsx Route Shell · Checkout.jsx Checkout · CartContext.jsx Cart State · useLocalStorage.js Local Storage Hook
Components 27
Storefront
- Home
src/pages/Home.jsx - Product Catalog
src/pages/Products.jsx - Product Data
src/data/products.js - Product Details
src/pages/ProductDetails.jsx - Product Card
src/components/ProductCard.jsx - Bulk Orders
src/pages/BulkOrders.jsx - About
src/pages/About.jsx - Contact
src/pages/Contact.jsx
Purchase and Orders
- Cart
src/pages/Cart.jsx - Cart State
src/context/CartContext.jsx - Checkout
src/pages/Checkout.jsx - Order History
src/pages/Orders.jsx - Order Success
src/pages/OrderSuccess.jsx - Order Utilities
src/utils/orderUtils.js
Account
- Authentication
src/context/AuthContext.jsx - Login
src/pages/Login.jsx - Route Guard
src/components/ProtectedRoute.jsx - Profile
src/pages/Profile.jsx - Saved Addresses
src/pages/Addresses.jsx
Shared Runtime
- Route Shell
src/App.jsx - Local Storage Hook
src/hooks/useLocalStorage.js - Form Validation
src/utils/validators.js - Toast Notifications
src/context/ToastContext.jsx - Breadcrumbs
src/components/Breadcrumb.jsx - Navigation Bar
src/components/Navbar.jsx - Footer
src/components/Footer.jsx
Other components
- Customer
Connections 47
- Customer → Route Shell: opens
- Route Shell → Authentication: provides
src/App.jsx - Route Shell → Cart State: provides
src/App.jsx - Route Shell → Toast Notifications: provides
src/App.jsx - Route Shell → Login: routes
src/App.jsx - Route Shell → Home: routes
src/App.jsx - Route Shell → Product Catalog: routes
src/App.jsx - Route Shell → Product Details: routes
src/App.jsx - Route Shell → Bulk Orders: routes
src/App.jsx - Route Shell → Cart: routes
src/App.jsx - Route Shell → Checkout: routes
src/App.jsx - Route Shell → Order Success: routes
src/App.jsx - Route Shell → Order History: routes
src/App.jsx - Route Shell → Profile: routes
src/App.jsx - Route Shell → Saved Addresses: routes
src/App.jsx - Route Shell → About: routes
src/App.jsx - Route Shell → Contact: routes
src/App.jsx - Route Shell → Route Guard: guards routes
src/App.jsx - Route Guard → Authentication: checks session
src/components/ProtectedRoute.jsx - Login → Authentication: authenticates
src/pages/Login.jsx - Route Shell → Navigation Bar: renders
src/App.jsx - Route Shell → Footer: renders
src/App.jsx - Home → Product Data: reads catalog
src/pages/Home.jsx - Product Catalog → Product Data: reads catalog
src/pages/Products.jsx - Product Details → Product Data: reads product
src/pages/ProductDetails.jsx - Product Catalog → Product Card: renders cards
src/pages/Products.jsx - Home → Product Card: renders cards
src/pages/Home.jsx - Product Card → Cart State: adds items
src/components/ProductCard.jsx - Product Details → Cart State: updates cart
src/pages/ProductDetails.jsx - Cart → Cart State: reads and updates
src/pages/Cart.jsx - Checkout → Cart State: reads and clears
src/pages/Checkout.jsx - Cart State → Local Storage Hook: persists cart
src/context/CartContext.jsx - Checkout → Product Data: loads buy-now item
src/pages/Checkout.jsx - Checkout → Form Validation: validates address
src/pages/Checkout.jsx - Checkout → Order Utilities: calculates order
src/pages/Checkout.jsx - Checkout → Local Storage Hook: persists addresses
src/pages/Checkout.jsx - Checkout → Toast Notifications: shows feedback
src/pages/Checkout.jsx - Checkout → Order Success: navigates after order
src/pages/Checkout.jsx - Order History → Local Storage Hook: reads saved orders
src/pages/Orders.jsx - Order History → Order Utilities: formats order data
src/pages/Orders.jsx - Saved Addresses → Local Storage Hook: persists addresses
src/pages/Addresses.jsx - Saved Addresses → Form Validation: validates forms
src/pages/Addresses.jsx - Saved Addresses → Toast Notifications: shows feedback
src/pages/Addresses.jsx - Profile → Authentication: reads account
src/pages/Profile.jsx - Profile → Form Validation: validates profile
src/pages/Profile.jsx - Profile → Local Storage Hook: persists profile data
src/pages/Profile.jsx - Cart → Order Utilities: uses order helpers
src/pages/Cart.jsx