How saiteja74/shopkart works
Shopkart is a MERN shopping-cart application. Shoppers browse and search products, add items to a cart, provide shipping and payment details, place orders, and view order status; accounts support registration and profile management. Admin screens cover product, user, and order management, while product reviews and image uploads provide supporting capabilities. The frontend uses Redux action/reducer modules and calls an Express API backed by MongoDB. Source excerpts confirm the server routing and controller-to-model relationships; several frontend screen-to-action connections and payment-provider details are inferred only from the file tree and are not drawn.
Main entry points: App.js App routes · server.js Express server · productRoutes.js Product routes · userRoutes.js User routes
Components 28
Shopping frontend
- App routes
frontend/src/App.js - Catalog screens
frontend/src/screens/HomeScreen.js - Product detail
frontend/src/screens/ProductScreen.js - Cart and checkout
frontend/src/screens/CartScreen.js - Account screens
frontend/src/screens/ProfileScreen.js - Admin screens
frontend/src/screens/ProductListScreen.js - Redux state
frontend/src/store.js - Product actions
frontend/src/actions/productActions.js - Cart actions
frontend/src/actions/cartActions.js - Order actions
frontend/src/actions/orderActions.js - User actions
frontend/src/actions/userActions.js
API and access
- Express server
backend/server.js - Product routes
backend/routes/productRoutes.js - User routes
backend/routes/userRoutes.js - Order routes
backend/routes/orderRoutes.js - Access control
backend/middleware/authMiddleware.js
Catalog and media
- Product service
backend/controllers/productController.js - Image upload
backend/routes/uploadRoutes.js
Orders and users
- User service
backend/controllers/userController.js - Order service
backend/controllers/orderController.js - PayPal config
backend/server.js
Persistence
- Product model
backend/models/productModel.js - User model
backend/models/userModel.js - Order model
backend/models/orderModel.js - MongoDB
Other components
- Shopper
- Administrator
- PayPal
Connections 26
- Shopper → App routes: uses
- Administrator → App routes: uses
- App routes → Catalog screens: routes to
- App routes → Product detail: routes to
- App routes → Cart and checkout: routes to
- App routes → Account screens: routes to
- App routes → Admin screens: routes to
- Express server → Product routes: mounts
- Express server → User routes: mounts
- Express server → Order routes: mounts
- Product routes → Product service: dispatches
- User routes → User service: dispatches
- Order routes → Order service: dispatches
- Product routes → Access control: guards
- User routes → Access control: guards
- Order routes → Access control: guards
- Product service → Product model: queries
- User service → User model: queries
- Order service → Order model: queries
- Express server → MongoDB: connects via
- Product model → MongoDB: persists
- User model → MongoDB: persists
- Order model → MongoDB: persists
- Express server → Image upload: mounts
- Express server → PayPal config: serves
- PayPal → PayPal config: provides ID