How nkugavarathan/vara-fashion-ecommerce-mern works
Vara Fashion is a MERN storefront with a separate admin dashboard and Express/MongoDB API. Shoppers browse and search products, manage a cart, check out, and view orders; administrators manage products, users, and orders and review analytics or export receipts. The graph includes these documented capabilities and the sampled server routing, controller, authentication, and persistence layers. Some client-to-API wiring and unsampled features are documented in the README but not verified in source excerpts; those links are identified accordingly.
Main entry points: src/App.jsx Storefront routes · server.js Express application · src/App.jsx Admin routes · userRoutes.js User routes
Components 34
Shopper storefront
- Storefront routes
client/src/App.jsx - Catalog browsing
client/src/components/Products.jsx - Product search
client/src/components/SearchModal.jsx - Cart management
client/src/pages/Cart.jsx - Checkout
client/src/pages/cartCheckout.jsx - Order confirmation
client/src/pages/Success.jsx - Account and orders
client/src/pages/Profile.jsx - Shopper authentication
client/src/pages/Login.jsx - Storefront API calls
client/src/redux/apiCalls.js
Admin dashboard
- Admin routes
admin/src/App.jsx - Product management
admin/src/pages/product/Product.jsx - Product creation
admin/src/pages/newproduct/NewProduct.jsx - Order management
admin/src/pages/OrderList.jsx - PDF exports
admin/src/jspdf.js - Sales analytics
admin/src/pages/Home/Home.jsx - User management
admin/src/pages/userList/UserList.jsx - Admin API calls
admin/src/redux/apiCalls.js
API and domain logic
- Express application
server/server.js - Auth routes
server/routes/authRoute.js - User routes
server/routes/userRoutes.js - Product routes
server/routes/productRoutes.js - Cart routes
server/routes/cartRoutes.js - Order routes
server/routes/orderRoutes.js - User domain logic
server/controllers/userController.js - Product domain logic
server/controllers/productControlloer.js - Cart domain logic
server/controllers/cartController.js - Order domain logic
server/controllers/orderController.js - JWT authorization
server/middleware/authMiddleware.js - Image uploads
server/middleware/uploadMiddleware.js
MongoDB models
- MongoDB connection
server/config/db.js - User records
server/models/userModel.js - Product records
server/models/productModel.js
Other components
- Shopper
- Administrator
Connections 38
- Shopper → Storefront routes: uses
README.md - Storefront routes → Catalog browsing: routes to
client/src/App.jsx - Storefront routes → Product search: renders
client/src/App.jsx - Storefront routes → Cart management: routes to
client/src/App.jsx - Storefront routes → Checkout: routes to
client/src/App.jsx - Storefront routes → Order confirmation: routes to
client/src/App.jsx - Storefront routes → Account and orders: routes to
client/src/App.jsx - Storefront routes → Shopper authentication: routes to
client/src/App.jsx - Shopper → Storefront API calls: requests products and orders
README.md - Storefront API calls → Express application: calls API
README.md - Administrator → Admin routes: uses
README.md - Admin routes → Product management: routes to
admin/src/App.jsx - Admin routes → Product creation: routes to
admin/src/App.jsx - Admin routes → Order management: routes to
admin/src/App.jsx - Admin routes → User management: routes to
admin/src/App.jsx - Admin routes → Sales analytics: routes to
admin/src/App.jsx - Order management → PDF exports: exports receipts
admin/src/pages/OrderList.jsx - Admin API calls → Express application: calls API
README.md - Express application → MongoDB connection: connects
server/server.js - Express application → Auth routes: mounts
server/server.js - Express application → User routes: mounts
server/server.js - Express application → Product routes: mounts
server/server.js - Express application → Cart routes: mounts
server/server.js - Express application → Order routes: mounts
server/server.js - Auth routes → User domain logic: dispatches
server/routes/authRoute.js - User routes → User domain logic: dispatches
server/routes/userRoutes.js - Product routes → Product domain logic: dispatches
server/routes/productRoutes.js - Cart routes → Cart domain logic: dispatches
server/routes/cartRoutes.js - Order routes → Order domain logic: dispatches
server/routes/orderRoutes.js - User routes → JWT authorization: protects routes
server/routes/userRoutes.js - Product routes → JWT authorization: protects deletion
server/routes/productRoutes.js - Order routes → JWT authorization: protects routes
server/routes/orderRoutes.js - Product routes → Image uploads: accepts images
server/routes/productRoutes.js - User routes → Image uploads: accepts images
server/routes/userRoutes.js - JWT authorization → User records: loads user
server/middleware/authMiddleware.js - User domain logic → User records: reads and writes
server/controllers/userController.js - Product domain logic → Product records: manages products
server/controllers/productControlloer.js - Order domain logic → Product records: enriches order items
server/controllers/orderController.js