How anilpreetham/foodhub works
FoodHub is a food-menu and ordering web application with a public browsing/cart interface and an admin menu-management area. The visible customer flow reaches the cart, but the sampled Cart component’s checkout button has no order submission behavior. Backend menu and order endpoints are present; frontend-to-backend wiring beyond the sampled admin calls is not fully verified.
Main entry points: App.jsx Route App · server.js Express API · main.jsx React Entry · Cart.jsx Cart
Components 21
Customer Web
- React Entry
webpage/src/main.jsx - Route App
webpage/src/App.jsx - Home
webpage/src/Home.jsx - Veg Menu
webpage/src/VegItems.jsx - Non-Veg Menu
webpage/src/NonVegItems.jsx - Cart
webpage/src/Cart.jsx - About
webpage/src/About.jsx - Contact
webpage/src/Contact.jsx - Navigation
webpage/src/Navbar.jsx - Footer
webpage/src/Footer.jsx - Cart State
webpage/src/store.js
Admin Console
- Admin Login
webpage/src/AdminLogin.jsx - Route Guard
webpage/src/ProtectedRoute.jsx - Menu Dashboard
webpage/src/AdminDashboard.jsx
API Service
- API Client
webpage/src/api.js - Express API
backend/server.js
Menu and Orders
- Menu Model
backend/models/MenuItem.js - Order Model
backend/models/Order.js
Other components
- Customer
- Administrator
- MongoDB
Connections 20
- Customer → React Entry: opens app
- Administrator → React Entry: opens app
- React Entry → Route App: renders
- Route App → Home: routes
- Route App → Veg Menu: routes
- Route App → Non-Veg Menu: routes
- Route App → Cart: routes
- Route App → About: routes
- Route App → Contact: routes
- Route App → Navigation: renders
- Route App → Footer: renders
- Route App → Admin Login: routes
- Route App → Route Guard: protects dashboard
- Route Guard → Menu Dashboard: allows route
- Menu Dashboard → API Client: requests menu
- API Client → Express API: sends API requests
- Express API → Menu Model: CRUD operations
- Express API → Order Model: creates and lists
- Express API → MongoDB: connects
- Cart → Cart State: reads and dispatches