How atulranjan97/techmart works
TechMart is a MERN storefront with customer shopping, checkout and order tracking, plus administration of catalog, users and orders. The customer flow runs from browsing products through cart, shipping/payment and order placement, then payment and order status; the admin flow manages catalog, users and fulfillment. Groups represent the React experience/state, Express API, and persistent domain data. Relationships are limited to those in excerpts, the SOURCE INDEX, or README; unsampled product features are retained where documented, without guessing their internal wiring.
Main entry points: App.jsx App shell and routes · server.js HTTP application · orderController.js Order lifecycle · authMiddleware.js JWT authorization
Components 23
Storefront experience
- App shell and routes
frontend/src/App.jsx - Browse and review
frontend/src/pages - Cart and checkout
frontend/src/pages - Order tracking
frontend/src/pages/OrderPage.jsx - Admin workspace
frontend/src/pages/admin - Redux state and API
frontend/src/slices
Commerce API
- HTTP application
backend/server.js - Product routes
backend/routes/productRoutes.js - User routes
backend/routes/userRoutes.js - Order routes
backend/routes/orderRoutes.js - Image upload
backend/routes/uploadRoutes.js - Catalog and reviews
backend/controller/productController.js - Accounts and access
backend/controller/userController.js - Order lifecycle
backend/controller/orderController.js - JWT authorization
backend/middleware/authMiddleware.js
Domain and persistence
- Product records
backend/models/productModel.js - User records
backend/models/userModel.js - Order records
backend/models/orderModel.js - Price calculation
backend/utils/calcPrices.js
External services
- MongoDB
- PayPal
Other components
- Shopper
- Administrator
Connections 34
- Shopper → App shell and routes: uses
- Administrator → App shell and routes: uses
- App shell and routes → Browse and review: routes to
frontend/src/main.jsx - App shell and routes → Cart and checkout: routes to
frontend/src/main.jsx - App shell and routes → Order tracking: routes to
frontend/src/main.jsx - App shell and routes → Admin workspace: routes to
frontend/src/main.jsx - Browse and review → Redux state and API: requests catalog
frontend/src/pages/HomePage.jsx - Cart and checkout → Redux state and API: updates cart
frontend/src/pages/CartPage.jsx - Cart and checkout → Redux state and API: submits order
frontend/src/pages/PlaceOrderPage.jsx - Order tracking → Redux state and API: loads order
frontend/src/pages/OrderPage.jsx - Admin workspace → Redux state and API: requests management data
frontend/src/pages/admin/DashboardPage.jsx - HTTP application → Product routes: mounts
backend/server.js - HTTP application → User routes: mounts
backend/server.js - HTTP application → Order routes: mounts
backend/server.js - HTTP application → Image upload: mounts
backend/server.js - Product routes → Catalog and reviews: dispatches
backend/routes/productRoutes.js - User routes → Accounts and access: dispatches
backend/routes/userRoutes.js - Order routes → Order lifecycle: dispatches
backend/routes/orderRoutes.js - User routes → JWT authorization: protects routes
backend/routes/userRoutes.js - Product routes → JWT authorization: protects routes
backend/routes/productRoutes.js - Order routes → JWT authorization: protects routes
backend/routes/orderRoutes.js - Catalog and reviews → Product records: reads and writes
backend/controller/productController.js - Catalog and reviews → Order records: checks purchases
backend/controller/productController.js - Accounts and access → User records: reads and writes
backend/controller/userController.js - Accounts and access → JWT authorization: generates token
backend/controller/userController.js - Order lifecycle → Order records: reads and writes
backend/controller/orderController.js - Order lifecycle → Product records: checks and updates stock
backend/controller/orderController.js - Order lifecycle → Price calculation: calculates totals
backend/controller/orderController.js - Order lifecycle → PayPal: verifies payment
backend/controller/orderController.js - JWT authorization → User records: loads identity
backend/middleware/authMiddleware.js - HTTP application → MongoDB: connects
backend/server.js - Product records → MongoDB: persists
- User records → MongoDB: persists
- Order records → MongoDB: persists