How saurabhsharma2004/blinkit_clone works
This is a full-stack commerce application: shoppers browse and search products, manage a cart, check out, and review orders; administrators manage catalog content. The React client uses routed pages and Redux-backed API operations, while an Express server exposes authentication, catalog, cart, order, and payment endpoints backed by MongoDB and external services. The graph reflects the excerpts and SOURCE INDEX; several client-page and server-controller details were not sampled, so their internal call paths are not asserted.
Main entry points: index.js HTTP server · index.jsx Page routing · useCategoryData.jsx Category cache · Payment.js Payment processing
Components 34
Storefront client
- Storefront shell
client/src/App.jsx - Page routing
client/src/routes/index.jsx - Product search
client/src/pages/SearchPage.jsx - Checkout
client/src/pages/Checkout.jsx - Order history
client/src/pages/MyOrders.jsx - Product upload
client/src/pages/UploadProducts.jsx - Category cache
client/src/hooks/useCategoryData.jsx - Category API operations
client/src/services/operations/categoryApi.js - Subcategory API operations
client/src/services/operations/subCategoryApi.js - Product API operations
client/src/services/operations/productApi.js
Catalog management
- Category routes
server/routes/categoryRoutes.js - Category management
server/controllers/Category.js - Subcategory routes
server/routes/subCategoryRoutes.js - Subcategory management
server/controllers/SubCategory.js - Product routes
server/routes/ProductRoutes.js - Product catalog
server/controllers/Product.js - Product records
server/models/Product.js
Identity and profiles
- Authentication operations
client/src/services/operations/authApi.js - User routes
server/routes/userRoutes.js - Authentication
server/controllers/Auth.js - User records
server/models/User.js
Cart and orders
- Cart operations
client/src/services/operations/cartApi.js - Order operations
client/src/services/operations/orderApi.js - Payment operations
client/src/services/operations/paymentApi.js - Cart routes
server/routes/cartRoutes.js - Cart management
server/controllers/Cart.js - Payment routes
server/routes/paymentRoutes.js - Payment processing
server/controllers/Payment.js - Order routes
server/routes/orderRoutes.js - Order history
server/controllers/OrderController.js - Order records
server/models/Order.js
Server platform
- HTTP server
server/index.js
Other components
- Shopper
- Administrator
Connections 39
- Shopper → Page routing: opens pages
- Administrator → Page routing: opens pages
- Page routing → Storefront shell: renders shell
client/src/routes/index.jsx - Storefront shell → Category cache: loads categories
client/src/App.jsx - Category cache → Category API operations: fetches categories
client/src/hooks/useCategoryData.jsx - Category cache → Subcategory API operations: fetches subcategories
client/src/hooks/useCategoryData.jsx - Page routing → Product search: routes to
client/src/routes/index.jsx - Page routing → Checkout: routes to
client/src/routes/index.jsx - Page routing → Order history: routes to
client/src/routes/index.jsx - Page routing → Product upload: routes to
client/src/routes/index.jsx - Product search → Product API operations: searches products
client/src/pages/SearchPage.jsx - HTTP server → User routes: mounts routes
server/index.js - HTTP server → Category routes: mounts routes
server/index.js - HTTP server → Subcategory routes: mounts routes
server/index.js - HTTP server → Product routes: mounts routes
server/index.js - HTTP server → Cart routes: mounts routes
server/index.js - HTTP server → Payment routes: mounts routes
server/index.js - HTTP server → Order routes: mounts routes
server/index.js - User routes → Authentication: dispatches auth
server/routes/userRoutes.js - Authentication → User records: reads and writes
server/controllers/Auth.js - Category routes → Category management: dispatches catalog
server/routes/categoryRoutes.js - Category management → Product records: reads products
server/controllers/Category.js - Subcategory routes → Subcategory management: dispatches catalog
server/routes/subCategoryRoutes.js - Product routes → Product catalog: dispatches product
server/routes/ProductRoutes.js - Product catalog → Product records: reads and writes
server/controllers/Product.js - Cart routes → Cart management: dispatches cart
server/routes/cartRoutes.js - Payment routes → Payment processing: dispatches payment
server/routes/paymentRoutes.js - Payment processing → Order records: reads and writes
server/controllers/Payment.js - Payment processing → Cart management: uses cart logic
server/controllers/Payment.js - Order routes → Order history: dispatches orders
server/routes/orderRoutes.js - Order history → Order records: reads orders
server/controllers/OrderController.js - Checkout → Payment operations: submits payment
- Product API operations → Product routes: HTTP requests
- Category API operations → Category routes: HTTP requests
- Subcategory API operations → Subcategory routes: HTTP requests
- Cart operations → Cart routes: HTTP requests
- Order operations → Order routes: HTTP requests
- Payment operations → Payment routes: HTTP requests
- Authentication operations → User routes: HTTP requests