How muhammad-umer34/web_project works
This is a multi-vendor ecommerce application: customers browse products, manage carts and wishlists, place orders, and review purchases; store owners manage listings, orders, dispatch, and sales dashboards. The frontend routes users to these experiences, while Express routes apply authentication and delegate requests to controllers that read and write MongoDB models. The source excerpts establish server-side calls and frontend routing, but do not show the API client request implementations, so those links are omitted.
Main entry points: main.jsx App routing · customerController.js Customer controller · storeController.js Store controller · index.js API server
Components 31
Web application
- App routing
src/main.jsx - Authentication UI
src/features/auth/authLayout.jsx - Auth state
src/features/auth/authSlices.js - Auth API client
src/features/auth/authAPI.js - Customer navigation
src/components/ui/customer/header.jsx
Customer commerce
- Shopping pages
src/pages/customers/home.jsx - Product details
src/pages/customers/productDetailPage.jsx - Customer API client
src/features/customer/customerApi.js - Checkout
src/pages/customers/CheckOut.jsx - Order confirmation
src/pages/customers/order-confirmation.jsx - Product reviews
src/pages/customers/review.jsx
Store operations
- Store dashboard
src/pages/storeOwner/newDashboard.jsx - Product management
src/pages/storeOwner/newAddProduct.jsx - Store order details
src/pages/storeOwner/orderDetails.jsx - Store API client
src/features/admin/adminApi.js
API and persistence
- API server
server/index.js - Auth routes
server/routes/authRoutes.js - Auth controller
server/controllers/authController.js - Customer routes
server/routes/userRoutes.js - Customer controller
server/controllers/customerController.js - Store routes
server/routes/storeRoutes.js - Store controller
server/controllers/storeController.js - User records
server/models/user.js - Product records
server/models/store.js - Cart records
server/models/cart.js - Wishlist records
server/models/wishlist.js - Review records
server/models/review.js - Customer orders
server/models/order.js - Store order lines
server/models/storeOrders.js
Other components
- Shopper
- Store owner
Connections 32
- Shopper → App routing: uses
src/main.jsx - Store owner → App routing: uses
src/main.jsx - App routing → Authentication UI: routes to
src/main.jsx - App routing → Shopping pages: routes to
src/main.jsx - App routing → Product details: routes to
src/main.jsx - App routing → Checkout: routes to
src/main.jsx - App routing → Order confirmation: routes to
src/main.jsx - App routing → Store dashboard: routes to
src/main.jsx - App routing → Product management: routes to
src/main.jsx - App routing → Store order details: routes to
src/main.jsx - Authentication UI → Auth API client: calls
src/features/auth/authLayout.jsx - Authentication UI → Auth state: updates
src/features/auth/authLayout.jsx - Customer navigation → Auth state: reads
src/components/ui/customer/header.jsx - Store order details → Store API client: calls
src/pages/storeOwner/orderDetails.jsx - API server → Auth routes: mounts
server/index.js - API server → Customer routes: mounts
server/index.js - API server → Store routes: mounts
server/index.js - Auth routes → Auth controller: dispatches
server/routes/authRoutes.js - Auth controller → User records: reads and writes
server/controllers/authController.js - Customer routes → Customer controller: dispatches
server/routes/userRoutes.js - Customer controller → Product records: reads and writes
server/controllers/customerController.js - Customer controller → Cart records: reads and writes
server/controllers/customerController.js - Customer controller → Wishlist records: uses
server/controllers/customerController.js - Customer controller → Review records: reads and writes
server/controllers/customerController.js - Customer controller → User records: updates
server/controllers/customerController.js - Customer controller → Customer orders: creates
server/controllers/customerController.js - Customer controller → Store order lines: creates
server/controllers/customerController.js - Store routes → Store controller: dispatches
server/routes/storeRoutes.js - Store controller → Product records: reads and writes
server/controllers/storeController.js - Store controller → Store order lines: reads and writes
server/controllers/storeController.js - Store controller → Customer orders: reads and updates
server/controllers/storeController.js - Store controller → User records: reads
server/controllers/storeController.js