How mohitsojitra/e-commerce-store works
This is a React/Redux storefront backed by an Express API and MongoDB. Shoppers browse products, view product details, manage a cart, and sign up or sign in; cart and user requests use bearer-token authentication. The graph follows the documented frontend routes into Redux/API calls and the backend's mounted routes into controllers and models. Some screens and backend modules were not excerpted, so their documented or indexed relationships are shown, while uncertain storage and runtime links are omitted.
Main entry points: App.jsx App routing · Api.js HTTP client · server.js Express server · middleware.js Token verification
Components 27
Storefront
- App routing
e-comerce-frontend/src/App.jsx - Home screen
e-comerce-frontend/src/screens/HomeScreen.jsx - Product screen
e-comerce-frontend/src/screens/ProductScreen.jsx - Cart screen
e-comerce-frontend/src/screens/CartScreen.jsx - Sign-in and sign-up
e-comerce-frontend/src/screens/SignIn/index.jsx - Navigation drawer
e-comerce-frontend/src/components/SideDrawer.jsx
Client state and API
- Redux store
e-comerce-frontend/src/redux/store.js - Product actions
e-comerce-frontend/src/redux/actions/productActions.js - Cart actions
e-comerce-frontend/src/redux/actions/cartActions.js - User actions
e-comerce-frontend/src/redux/actions/userAction.js - HTTP client
e-comerce-frontend/src/utils/Api.js - Token storage
e-comerce-frontend/src/utils/localstorage.js
Backend API
- Express server
e-comerce-backend/backend/server.js - Database connection
e-comerce-backend/backend/config/db.js
Identity and access
- User routes
e-comerce-backend/backend/routes/userRoutes.js - User controller
e-comerce-backend/backend/controller/user.controller.js - User records
e-comerce-backend/backend/models/User.js - Token verification
e-comerce-backend/backend/middleware/middleware.js - Token utilities
e-comerce-backend/backend/utils/utility.function.js
Catalog and cart
- Product routes
e-comerce-backend/backend/routes/productRoutes.js - Product controller
e-comerce-backend/backend/controller/productControllers.js - Product records
e-comerce-backend/backend/models/Product.js - Cart routes
e-comerce-backend/backend/routes/cartRoutes.js - Cart controller
e-comerce-backend/backend/controller/cart.controller.js - Cart records
e-comerce-backend/backend/models/Cart.js
Other components
- Shopper
- MongoDB
Connections 35
- Shopper → App routing: uses
e-comerce-frontend/src/App.jsx - App routing → Home screen: routes to
e-comerce-frontend/src/App.jsx - App routing → Product screen: routes to
e-comerce-frontend/src/App.jsx - App routing → Cart screen: routes to
e-comerce-frontend/src/App.jsx - App routing → Sign-in and sign-up: routes to
e-comerce-frontend/src/App.jsx - App routing → Navigation drawer: renders
e-comerce-frontend/src/App.jsx - Home screen → Product actions: dispatches
e-comerce-frontend/src/screens/HomeScreen.jsx - Product screen → Product actions: dispatches
e-comerce-frontend/src/screens/ProductScreen.jsx - Product screen → Cart actions: dispatches
e-comerce-frontend/src/screens/ProductScreen.jsx - Cart screen → Cart actions: dispatches
e-comerce-frontend/src/screens/CartScreen.jsx - App routing → Cart actions: loads cart
e-comerce-frontend/src/App.jsx - App routing → User actions: loads user
e-comerce-frontend/src/App.jsx - Product actions → HTTP client: requests data
e-comerce-frontend/src/redux/actions/productActions.js - Cart actions → HTTP client: requests data
e-comerce-frontend/src/redux/actions/cartActions.js - User actions → HTTP client: requests data
e-comerce-frontend/src/redux/actions/userAction.js - Sign-in and sign-up → HTTP client: submits credentials
e-comerce-frontend/src/screens/SignIn/index.jsx - HTTP client → Token storage: reads token
e-comerce-frontend/src/utils/Api.js - Redux store → App routing: provides state
e-comerce-frontend/src/main.jsx - HTTP client → Express server: sends HTTP requests
- Express server → Database connection: connects
e-comerce-backend/backend/server.js - Express server → Product routes: mounts
e-comerce-backend/backend/server.js - Express server → Cart routes: mounts
e-comerce-backend/backend/server.js - Express server → User routes: mounts
e-comerce-backend/backend/server.js - Product routes → Product controller: routes to
e-comerce-backend/backend/routes/productRoutes.js - Product controller → Product records: queries
e-comerce-backend/backend/controller/productControllers.js - Cart routes → Cart controller: routes to
e-comerce-backend/backend/routes/cartRoutes.js - Cart controller → Cart records: queries
e-comerce-backend/backend/controller/cart.controller.js - Cart routes → Token verification: guards requests
e-comerce-backend/backend/routes/cartRoutes.js - User routes → User controller: routes to
e-comerce-backend/backend/routes/userRoutes.js - User routes → Token verification: guards profile
e-comerce-backend/backend/routes/userRoutes.js - User controller → User records: queries
e-comerce-backend/backend/controller/user.controller.js - Token verification → User records: loads user
e-comerce-backend/backend/middleware/middleware.js - Token verification → Token utilities: verifies token
e-comerce-backend/backend/middleware/middleware.js - User controller → Token utilities: creates token
e-comerce-backend/backend/controller/user.controller.js - Database connection → MongoDB: connects