How deepak4511/e-commerce_with_mern works
This is a full-stack online shop with customer and administrator experiences. Customers browse and search products, manage carts and addresses, place and pay for orders, then review order status; administrators manage catalog items and orders. The React app routes requests through Redux-backed pages to an Express API, whose controllers persist domain records in MongoDB and delegate image uploads and PayPal payments to external services. The sampled files establish these main route/controller/model relationships; several controllers and the client API wiring were not included, so their internal calls are not inferred.
Main entry points: server.js API server · App.jsx Route application · products-controller.js Product management · cart-controller.js Cart service
Components 26
Customer storefront
- Route application
client/src/App.jsx - Shop pages
client/src/pages/shopping-view - Shop state
client/src/store/shop - Login and registration
client/src/pages/auth
Shop administration
- Admin pages
client/src/pages/admin-view - Admin state
client/src/store/admin
API and domain services
- API server
server/server.js - Auth routes
server/routes/auth/auth-routes.js - Auth service
server/controllers/auth/auth-controller.js - Admin product routes
server/routes/admin/products-routes.js - Product management
server/controllers/admin/products-controller.js - Cart service
server/controllers/shop/cart-controller.js - Admin order service
server/controllers/admin/order-controller.js - Order routes
server/routes/shop/order-routes.js - Admin order routes
server/routes/admin/order-routes.js - Address routes
server/routes/shop/address-routes.js
Persistent records
Other components
- Shopper
- Administrator
- Cloudinary
- PayPal
- MongoDB
Connections 24
- Shopper → Route application: uses storefront
- Administrator → Route application: uses admin
- Route application → Shop pages: routes to
- Route application → Login and registration: routes to
- Route application → Admin pages: routes to
- Shop pages → Shop state: uses state
- Admin pages → Admin state: uses state
- Route application → API server: checks authentication
- API server → Auth routes: mounts routes
- API server → Admin product routes: mounts routes
- API server → Order routes: mounts routes
- API server → Admin order routes: mounts routes
- API server → Address routes: mounts routes
- Auth routes → Auth service: dispatches
- Admin product routes → Product management: dispatches
- Order routes → Orders: dispatches orders
- Admin order routes → Admin order service: dispatches
- Admin order service → Orders: reads and updates
- Product management → Products: reads and writes
- Product management → Cloudinary: uploads images
- Auth service → Users: reads and writes
- Cart service → Carts: reads and writes
- Cart service → Products: reads products
- API server → MongoDB: connects