How thex96/mern works
FoodEase is a food-discovery and ordering web app with customer accounts and a restaurant-partner application flow. Customers browse restaurants and menus, add dishes to a shared cart, and reach checkout; account actions use the API for signup and login. Restaurant owners can submit an application for review. The README provides no product detail, and the sampled backend does not show order processing or a review workflow. In particular, the sampled server mounts authentication routes but does not show mounting the restaurant routes, so that connection is omitted.
Main entry points: App.jsx Route dispatcher · AuthContext.jsx Session state · CartContext.jsx Cart state · Navbar.jsx Navigation
Components 23
Web entry
- Route dispatcher
client/src/App.jsx
Customer experience
- Home and discovery
client/src/pages/Home.jsx - Restaurant listing
client/src/pages/Restaurants.jsx - Restaurant menu
client/src/pages/Restaurant.jsx - Offers
client/src/pages/Offers.jsx - About
client/src/pages/About.jsx - Cart
client/src/pages/Cart.jsx - Checkout
client/src/pages/Checkout.jsx - Login
client/src/pages/Login.jsx - Signup
client/src/pages/Signup.jsx - Customer dashboard
client/src/pages/CustomerDashboard.jsx - Partner dashboard
client/src/pages/RestaurantDashboard.jsx - Partner application
client/src/pages/RestaurantRegistration.jsx - Navigation
client/src/components/Navbar.jsx
Client state
- Session state
client/src/context/AuthContext.jsx - Cart state
client/src/context/CartContext.jsx - HTTP client
client/src/api/axios.js
API and persistence
- API server
server/server.js - Authentication routes
server/routes/authRoutes.js - Restaurant routes
server/routes/restaurantRoutes.js - User records
server/models/User.js - Restaurant records
server/models/Restaurant.js
Other components
- Visitor
Connections 28
- Visitor → Route dispatcher: opens
- Route dispatcher → Home and discovery: routes to
client/src/App.jsx - Route dispatcher → Restaurant listing: routes to
client/src/App.jsx - Route dispatcher → Restaurant menu: routes to
client/src/App.jsx - Route dispatcher → Offers: routes to
client/src/App.jsx - Route dispatcher → About: routes to
client/src/App.jsx - Route dispatcher → Cart: routes to
client/src/App.jsx - Route dispatcher → Checkout: routes to
client/src/App.jsx - Route dispatcher → Login: routes to
client/src/App.jsx - Route dispatcher → Signup: routes to
client/src/App.jsx - Route dispatcher → Customer dashboard: routes to
client/src/App.jsx - Route dispatcher → Partner dashboard: routes to
client/src/App.jsx - Route dispatcher → Partner application: routes to
client/src/App.jsx - Restaurant menu → Cart state: adds dishes
client/src/pages/Restaurant.jsx - Cart → Cart state: reads and updates
client/src/pages/Cart.jsx - Checkout → Cart state: reads cart
client/src/pages/Checkout.jsx - Login → Session state: authenticates
client/src/pages/Login.jsx - Signup → Session state: creates session
client/src/pages/Signup.jsx - Customer dashboard → Session state: reads session
client/src/pages/CustomerDashboard.jsx - Partner dashboard → Session state: reads session
client/src/pages/RestaurantDashboard.jsx - Partner application → Session state: reads token
client/src/pages/RestaurantRegistration.jsx - Navigation → Session state: reads and clears
client/src/components/Navbar.jsx - Navigation → Cart state: reads count
client/src/components/Navbar.jsx - Session state → HTTP client: sends auth requests
client/src/context/AuthContext.jsx - API server → Authentication routes: mounts
server/server.js - Authentication routes → User records: reads and writes
server/routes/authRoutes.js - Restaurant routes → User records: verifies owner
server/routes/restaurantRoutes.js - Restaurant routes → Restaurant records: creates and reads
server/routes/restaurantRoutes.js