How shalemmarapakula/anu-home-foods works
ANU HOME FOODS is a React storefront and Express API for browsing and ordering homemade Andhra foods. The customer journey runs from product discovery and selection through cart management and checkout, with separate account registration/login and direct-contact options. The backend exposes product, order, and authentication endpoints; sampled controllers use in-memory data from backend/config/db.js, so the README’s MySQL description is not represented by the available tree. Frontend API wiring and several page implementations were not sampled, so those links reflect documented capabilities and are shown only at the API-service boundary.
Main entry points: App.jsx Routed Storefront · api.js API Client · server.js Express API · Checkout.jsx Checkout
Components 22
Storefront
- Routed Storefront
frontend/src/App.jsx - Home Discovery
frontend/src/pages/Home.jsx - Contact Options
frontend/src/components/FloatingWidgets.jsx
Shopping
- Catalog & Filters
frontend/src/pages/Shop.jsx - Product Details
frontend/src/pages/ProductDetails.jsx - Cart Review
frontend/src/pages/Cart.jsx - Checkout
frontend/src/pages/Checkout.jsx
Accounts
- Login
frontend/src/pages/Login.jsx - Registration
frontend/src/pages/Register.jsx
REST API
- API Client
frontend/src/services/api.js - Express API
backend/server.js - Product Routes
backend/routes/productRoutes.js - Product Queries
backend/controllers/productController.js - Order Routes
backend/routes/orderRoutes.js - Order Handling
backend/controllers/orderController.js - Auth Routes
backend/routes/authRoutes.js - Auth Handling
backend/controllers/authController.js - In-Memory Data
backend/config/db.js
Application State
- Cart & Totals
frontend/src/context/CartContext.jsx - Authentication State
frontend/src/context/AuthContext.jsx - Wishlist State
frontend/src/context/WishlistContext.jsx
Other components
- Customer
Connections 30
- Customer → Routed Storefront: uses
- Routed Storefront → Home Discovery: routes
- Routed Storefront → Catalog & Filters: routes
- Routed Storefront → Product Details: routes
- Routed Storefront → Cart Review: routes
- Routed Storefront → Checkout: routes
- Routed Storefront → Login: routes
- Routed Storefront → Registration: routes
- Routed Storefront → Contact Options: renders
- Routed Storefront → Cart & Totals: provides
- Routed Storefront → Authentication State: provides
- Routed Storefront → Wishlist State: provides
- Home Discovery → API Client: requests products
- Catalog & Filters → API Client: requests catalog
- Product Details → API Client: requests details
- Cart Review → Cart & Totals: reads and updates
- Checkout → Cart & Totals: reads totals
- Checkout → API Client: submits order
- Login → API Client: submits login
- Registration → API Client: submits registration
- API Client → Express API: HTTP requests
- Express API → Product Routes: dispatches
- Express API → Order Routes: dispatches
- Express API → Auth Routes: dispatches
- Product Routes → Product Queries: invokes
- Order Routes → Order Handling: invokes
- Auth Routes → Auth Handling: invokes
- Product Queries → In-Memory Data: reads products
- Order Handling → In-Memory Data: reads and writes orders
- Auth Handling → In-Memory Data: reads and writes users