How iambuzzz/foodiehub works
FoodieHub is a React food-ordering frontend. Users browse and filter restaurants, open a restaurant menu, add items to a Redux cart, and view or manage that cart; authenticated users can sync cart state and maintain a profile through Firebase. The graph includes documented feature branches whose component-level wiring was not sampled, but omits uncertain call edges. Restaurant data is local JSON in the sampled menu hook; README describes a local feed dataset as well.
Main entry points: Header.jsx Navigation header · App.jsx App layout · useFirestoreCartSync.js Cart sync hook · Account.jsx Account profile
Components 25
Application Shell
- React entry
src/main.jsx - App layout
src/App.jsx - Navigation header
src/components/Header.jsx - About page
src/components/About.jsx - Grocery vertical
src/components/Grocery.jsx - Contact page
src/components/Contact.jsx
Restaurant Discovery
- Restaurant feed
src/components/Body.jsx - Restaurant dataset
src/utils/mockdata.json - Restaurant cards
src/components/RestaurantCard.jsx
Menu And Cart
- Restaurant menu
src/components/RestaurantMenu.jsx - Menu data hook
src/utils/useRestaurantMenu.js - Menu dataset
src/utils/resdetails.json - Menu accordions
src/components/RestaurantCategory.jsx - Dish list
src/components/ItemList.jsx - Cart view
src/components/Cart.jsx - Redux store
src/utils/appStore.js - Cart state
src/utils/cartSlice.js
Identity And Persistence
- Login and signup
src/components/Login.jsx - Account profile
src/components/Account.jsx - User context
src/utils/UserContext.js - Cart sync hook
src/utils/useFirestoreCartSync.js - Firebase setup
src/utils/firebase.js
Other components
- FoodieHub user
- Firebase Auth
- Cloud Firestore
Connections 32
- FoodieHub user → React entry: opens app
- React entry → Redux store: provides state
- React entry → App layout: mounts routes
- App layout → Navigation header: renders
- App layout → Cart sync hook: runs hook
- App layout → User context: provides user
- Navigation header → Restaurant feed: navigates
- Restaurant feed → Restaurant dataset: reads feed
- Restaurant feed → Restaurant cards: renders results
- Restaurant cards → Restaurant menu: opens details
- Restaurant menu → Menu data hook: loads menu
- Menu data hook → Menu dataset: selects restaurant
- Restaurant menu → Menu accordions: renders categories
- Menu accordions → Dish list: shows dishes
- Dish list → Cart state: updates cart
- Cart view → Cart state: reads and updates
- Redux store → Cart state: registers reducer
- Navigation header → Login and signup: navigates
- Login and signup → Firebase setup: uses auth config
- Firebase setup → Firebase Auth: configures
- Navigation header → Firebase Auth: observes and signs out
- Login and signup → Firebase Auth: signs in or up
- Navigation header → User context: updates user
- Account profile → User context: reads user
- Account profile → Firebase setup: uses services
- Account profile → Cloud Firestore: reads and saves profile
- Cart sync hook → Redux store: reads and dispatches
- Cart sync hook → Firebase Auth: observes session
- Cart sync hook → Cloud Firestore: loads and saves cart
- Navigation header → About page: navigates
- Navigation header → Grocery vertical: navigates
- Navigation header → Contact page: navigates