How dipandhali2021/ecommerce works
ByteBazaar is an electronics storefront with customer shopping and a separate administrator interface. Customers browse and filter products, manage a cart or wishlist, authenticate, and can place orders and review their history; administrators manage catalog, transactions, customers, coupons, messages, and dashboard analytics. The frontend routes through React and uses Redux state/API layers; the Express backend mounts domain routes, with MongoDB-backed models and shared cache, stock, and analytics utilities. Unsampled route and order internals limit some relationship details; optional frontend-to-backend links are dashed where the cross-service call is not shown.
Main entry points: store.ts Redux store · app.ts Express API · App.tsx App routing · Search.tsx Product discovery
Components 34
Customer storefront
- App routing
ecommerce_frontend/src/App.tsx - Product discovery
ecommerce_frontend/src/pages/Search.tsx - Cart and checkout
ecommerce_frontend/src/pages/Cart.tsx - Order history
ecommerce_frontend/src/pages/Orders.tsx - Wishlist
ecommerce_frontend/src/pages/WishList.tsx - Account pages
ecommerce_frontend/src/pages/Login.tsx
Admin console
- Admin pages
ecommerce_frontend/src/pages/admin - Analytics dashboard
ecommerce_frontend/src/pages/admin/dashboard.tsx - Product management
ecommerce_frontend/src/pages/admin/management/productmanagement.tsx - Coupon management
ecommerce_frontend/src/pages/admin/apps/coupon.tsx
Frontend state and API
- Redux store
ecommerce_frontend/src/redux/store.ts - Cart state
ecommerce_frontend/src/redux/reducer/cartReducer.ts - User state
ecommerce_frontend/src/redux/reducer/userReducer.ts - Wishlist state
ecommerce_frontend/src/redux/reducer/wishlistReducer.ts - Product API
ecommerce_frontend/src/redux/api/productAPI.ts - User API
ecommerce_frontend/src/redux/api/userAPI.ts - Order API
ecommerce_frontend/src/redux/api/orderAPI.ts - Dashboard API
ecommerce_frontend/src/redux/api/dashboardAPI.ts - Coupon API
ecommerce_frontend/src/redux/api/couponAPI.ts
Backend services
- Express API
ecommerce_backend/src/app.ts - Product routes
ecommerce_backend/src/routes/product.ts - Order routes
ecommerce_backend/src/routes/order.ts - Payment routes
ecommerce_backend/src/routes/payment.ts - User routes
ecommerce_backend/src/routes/user.ts - Dashboard routes
ecommerce_backend/src/routes/stats.ts - Message routes
ecommerce_backend/src/routes/message.ts - Product operations
ecommerce_backend/src/controllers/product.ts - Order operations
ecommerce_backend/src/controllers/order.ts - Analytics operations
ecommerce_backend/src/controllers/stats.ts - Cache and metrics
ecommerce_backend/src/utils/features.ts
Domain data
- Product model
ecommerce_backend/src/models/product.ts - Order model
ecommerce_backend/src/models/order.ts
Other components
- Shopper
- Administrator
Connections 42
- Shopper → App routing: uses
ecommerce_frontend/src/App.tsx - Administrator → App routing: uses
ecommerce_frontend/src/App.tsx - App routing → Product discovery: routes to
ecommerce_frontend/src/App.tsx - App routing → Cart and checkout: routes to
ecommerce_frontend/src/App.tsx - App routing → Order history: routes to
ecommerce_frontend/src/App.tsx - App routing → Wishlist: routes to
ecommerce_frontend/src/App.tsx - App routing → Account pages: routes to
ecommerce_frontend/src/App.tsx - App routing → Admin pages: routes to
ecommerce_frontend/src/App.tsx - Admin pages → Analytics dashboard: includes
ecommerce_frontend/src/App.tsx - Admin pages → Product management: includes
ecommerce_frontend/src/App.tsx - Admin pages → Coupon management: includes
ecommerce_frontend/src/App.tsx - Product discovery → Product API: queries
ecommerce_frontend/src/pages/Search.tsx - Product discovery → Cart state: dispatches
ecommerce_frontend/src/pages/Search.tsx - Product discovery → Wishlist state: dispatches
ecommerce_frontend/src/pages/Search.tsx - Analytics dashboard → Dashboard API: queries
ecommerce_frontend/src/pages/admin/dashboard.tsx - Redux store → Product API: registers
ecommerce_frontend/src/redux/store.ts - Redux store → User API: registers
ecommerce_frontend/src/redux/store.ts - Redux store → Order API: registers
ecommerce_frontend/src/redux/store.ts - Redux store → Dashboard API: registers
ecommerce_frontend/src/redux/store.ts - Redux store → Coupon API: registers
ecommerce_frontend/src/redux/store.ts - Redux store → Cart state: registers
ecommerce_frontend/src/redux/store.ts - Redux store → User state: registers
ecommerce_frontend/src/redux/store.ts - Redux store → Wishlist state: registers
ecommerce_frontend/src/redux/store.ts - Express API → Product routes: mounts
ecommerce_backend/src/app.ts - Express API → Order routes: mounts
ecommerce_backend/src/app.ts - Express API → Payment routes: mounts
ecommerce_backend/src/app.ts - Express API → User routes: mounts
ecommerce_backend/src/app.ts - Express API → Dashboard routes: mounts
ecommerce_backend/src/app.ts - Express API → Message routes: mounts
ecommerce_backend/src/app.ts - Product routes → Product operations: routes to
ecommerce_backend/src/routes/product.ts - Payment routes → Order operations: routes to
- Dashboard routes → Analytics operations: routes to
- Product operations → Product model: queries
ecommerce_backend/src/controllers/product.ts - Analytics operations → Product model: queries
ecommerce_backend/src/controllers/stats.ts - Analytics operations → Order model: queries
ecommerce_backend/src/controllers/stats.ts - Product operations → Cache and metrics: uses
ecommerce_backend/src/controllers/product.ts - Express API → Cache and metrics: connects database
ecommerce_backend/src/app.ts - Product API → Product routes: HTTP requests
- Order API → Order routes: HTTP requests
- Dashboard API → Dashboard routes: HTTP requests
- User API → User routes: HTTP requests
- Coupon API → Express API: HTTP requests