How sudouniversenabil/e-comarce-app-using-mern-stck works
This repository combines a customer storefront, an admin catalog console, and an Express API for product and user operations. Customers browse collections and product details, manage a cart, and reach order-related pages; administrators sign in and can submit product data to the API. The storefront’s cart and search state is held in ShopContext. Several pages and backend routes are documented by the source index but were not excerpted, so their internal behavior and connections are not expanded here.
Main entry points: server.js HTTP server · src/App.jsx Store routes · Shopcontext.jsx Shop state · src/App.jsx Admin routes
Components 27
Customer storefront
- Store routes
E-comers_frontend/src/App.jsx - Shop state
E-comers_frontend/src/context/Shopcontext.jsx - Home page
E-comers_frontend/src/pages/Home.jsx - Collection
E-comers_frontend/src/pages/Collection.jsx - Product detail
E-comers_frontend/src/pages/Product.jsx - Cart
E-comers_frontend/src/pages/Cart.jsx - Place order
E-comers_frontend/src/pages/PlaceOrder.jsx - Order history
E-comers_frontend/src/pages/Oder.jsx - Store bootstrap
E-comers_frontend/src/main.jsx
Admin console
- Admin routes
admin/src/App.jsx - Admin login
admin/src/components/Login.jsx - Add product
admin/src/page/Add.jsx - Product list
admin/src/page/List.jsx - Order management
admin/src/page/Oders.jsx
Backend API
- HTTP server
backend/server.js - User routes
backend/route/userRoute.js - User operations
backend/controloer/userControloer.js - Product routes
backend/route/productroute.js - Product operations
backend/controloer/productcontorler.js - Admin authorization
backend/middleware/adminauth.js - File upload
backend/middleware/malter.js
Data and integrations
- User records
backend/model/user_model.js - Product records
backend/model/product_model.js - MongoDB connection
backend/config/mongodb.js - Cloudinary connection
backend/config/cladnary.js
Other components
- Customer
- Administrator
Connections 34
- Customer → Store bootstrap: opens
E-comers_frontend/src/main.jsx - Store bootstrap → Store routes: renders
E-comers_frontend/src/main.jsx - Store routes → Home page: routes
E-comers_frontend/src/App.jsx - Store routes → Collection: routes
E-comers_frontend/src/App.jsx - Store routes → Product detail: routes
E-comers_frontend/src/App.jsx - Store routes → Cart: routes
E-comers_frontend/src/App.jsx - Store routes → Place order: routes
E-comers_frontend/src/App.jsx - Store routes → Order history: routes
E-comers_frontend/src/App.jsx - Store bootstrap → Shop state: provides context
E-comers_frontend/src/main.jsx - Home page → Shop state: uses
- Collection → Shop state: uses
E-comers_frontend/src/pages/Collection.jsx - Product detail → Shop state: uses
E-comers_frontend/src/pages/Product.jsx - Cart → Shop state: uses
E-comers_frontend/src/pages/Cart.jsx - Place order → Shop state: uses
E-comers_frontend/src/pages/PlaceOrder.jsx - Order history → Shop state: uses
E-comers_frontend/src/pages/Oder.jsx - Administrator → Admin routes: opens
admin/src/App.jsx - Admin routes → Admin login: shows when unauthenticated
admin/src/App.jsx - Admin routes → Add product: routes
admin/src/App.jsx - Admin routes → Product list: routes
admin/src/App.jsx - Admin routes → Order management: routes
admin/src/App.jsx - Add product → HTTP server: posts product data
admin/src/page/Add.jsx - Admin login → HTTP server: authenticates
- Product list → HTTP server: requests catalog
- Order management → HTTP server: requests orders
- HTTP server → MongoDB connection: connects
backend/server.js - HTTP server → Cloudinary connection: connects
backend/server.js - HTTP server → User routes: mounts
backend/server.js - HTTP server → Product routes: mounts
backend/server.js - User routes → User operations: routes to
backend/route/userRoute.js - User operations → User records: queries
backend/controloer/userControloer.js - Product routes → Product operations: routes to
backend/route/productroute.js - Product routes → Admin authorization: guards writes
backend/route/productroute.js - Product routes → File upload: uploads files
backend/route/productroute.js - Product operations → Product records: uses model
backend/controloer/productcontorler.js