How rajbhokare/indiakart-ecommerce works
IndiaKart is an e-commerce web application with server-rendered storefront, account, and cart pages, plus browser-side shopping interactions. Its main workflow is browsing and filtering products, adding items to a cart, and viewing the cart; account and contact flows are additional capabilities. The excerpts show both database-backed server handlers and separate route modules, but do not show how those modules are mounted, so no mounting relationship is asserted. README-described UI features are included where their implementation is not shown.
Main entry points: server.js Express application · db.js MySQL database · public Static assets · contact.js Contact handler
Components 18
Storefront
- Express application
server.js - Product catalog
server.js - Product API
server.js - Contact handler
routes/contact.js - Contact API
server.js - Newsletter endpoint
server.js - Product interactions
public/script.js - Form interactions
public/script.js
Commerce
- Cart handlers
routes/cart.js - MySQL database
db.js - Cart interactions
public/script.js
Accounts
- Auth handlers
routes/auth.js - Account and orders
server.js
Presentation
- Page templates
views - Static assets
public
Other components
- Shopper
- Browser localStorage
- Browser
Connections 15
- Express application → Product catalog: handles routes
server.js - Express application → Product API: serves API
server.js - Express application → Account and orders: handles account
server.js - Express application → Contact API: serves API
server.js - Express application → Newsletter endpoint: serves endpoint
server.js - Express application → MySQL database: queries
server.js - Express application → Page templates: renders pages
server.js - Auth handlers → MySQL database: queries users
routes/auth.js - Cart handlers → MySQL database: queries cart
routes/cart.js - Contact handler → MySQL database: stores messages
routes/contact.js - Browser → Static assets: loads
- Product interactions → Browser localStorage: persists cart
public/script.js - Cart interactions → Browser localStorage: reads cart
public/script.js - Form interactions → Browser: shows feedback
public/script.js - Express application → Static assets: serves static files
server.js