How spandan2106/ecom-platform-2026 works
WE_SELL is a MERN e-commerce application. Shoppers browse and filter a catalog, manage a cart, check out, and track orders; authenticated users also manage profiles, analytics, and a wallet with simulated card operations and user-to-user transfers. The React application provides these experiences over an Express API, whose controllers coordinate MongoDB-backed users, products, and orders. Edges reflect shown imports, route registration, and API calls; some frontend pages and backend controllers were not sampled, so uncertain implementation-level links are omitted.
Main entry points: App.jsx React app routes · order.controller.js Order logic · auth.controller.js Authentication logic · user.routes.js User and wallet routes
Components 24
Shopping experience
- React app routes
client/src/App.jsx - Product catalog
client/src/pages/Shop.jsx - Product details
client/src/pages/ProductDetails.jsx - Cart state
client/src/context/CartContext.jsx - Checkout
client/src/pages/Checkout.jsx - Order history
client/src/pages/History.jsx
Account and wallet
- Auth state
client/src/context/AuthContext.jsx - Profile and analytics
client/src/pages/Profile.jsx - Wallet operations
client/src/pages/Wallet.jsx - Wallet history
client/src/pages/WalletHistory.jsx
Express API
- API application
server/src/app.js - Auth routes
server/src/routes/auth.routes.js - User and wallet routes
server/src/routes/user.routes.js - Product routes
server/src/routes/product.routes.js - Order routes
server/src/routes/order.routes.js - Authentication logic
server/src/controllers/auth.controller.js - User and wallet logic
server/src/controllers/user.controller.js - Catalog logic
server/src/controllers/product.controller.js - Order logic
server/src/controllers/order.controller.js
Commerce data
- User records
server/src/models/User.model.js - Product records
server/src/models/Product.model.js - Order records
server/src/models/Order.model.js
Other components
- Shopper
- Email service
server/src/utils/sendEmail.js
Connections 32
- Shopper → React app routes: uses
client/src/App.jsx - React app routes → Product catalog: routes to
client/src/App.jsx - React app routes → Product details: routes to
client/src/App.jsx - React app routes → Checkout: routes to
client/src/App.jsx - React app routes → Order history: routes to
client/src/App.jsx - React app routes → Auth state: provides
client/src/App.jsx - React app routes → Cart state: provides
client/src/App.jsx - React app routes → Profile and analytics: routes to
client/src/App.jsx - React app routes → Wallet operations: routes to
client/src/App.jsx - React app routes → Wallet history: routes to
client/src/App.jsx - Product catalog → Product routes: fetches catalog
- Wallet operations → User and wallet routes: calls wallet API
client/src/pages/Wallet.jsx - Auth state → User and wallet routes: fetches profile
client/src/context/AuthContext.jsx - API application → Auth routes: mounts
server/src/app.js - API application → Product routes: mounts
server/src/app.js - API application → Order routes: mounts
server/src/app.js - API application → User and wallet routes: mounts
server/src/app.js - Auth routes → Authentication logic: routes to
server/src/routes/auth.routes.js - User and wallet routes → User and wallet logic: routes to
server/src/routes/user.routes.js - User and wallet routes → Authentication logic: routes deletion to
server/src/routes/user.routes.js - Product routes → Catalog logic: routes to
server/src/routes/product.routes.js - Order routes → Order logic: routes to
server/src/routes/order.routes.js - Authentication logic → User records: reads and writes
server/src/controllers/auth.controller.js - Authentication logic → Order records: deletes user orders
server/src/controllers/auth.controller.js - Authentication logic → Email service: sends reset mail
server/src/controllers/auth.controller.js - User and wallet logic → User records: reads and writes
server/src/controllers/user.controller.js - User and wallet logic → Order records: queries orders
server/src/controllers/user.controller.js - Catalog logic → Product records: accesses products
- Order logic → Order records: creates and queries
server/src/controllers/order.controller.js - Order logic → Product records: checks and updates stock
server/src/controllers/order.controller.js - Order logic → User records: updates cart
server/src/controllers/order.controller.js - Order logic → Email service: sends cancellation mail
server/src/controllers/order.controller.js