# tanvisam/meesho-clone architecture

> Architecture diagram of the GitHub repository tanvisam/meesho-clone, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tanvisam/meesho-clone
- Repository: https://github.com/tanvisam/meesho-clone

## Overview

Meesho-Clone is a storefront with a browser-based shopping journey and an Express/MongoDB backend. The documented journey is browsing and filtering products, selecting items for a cart, then paying by card; users can also register or log in. The backend exposes separate product endpoints for men’s, women’s, and jewellery items, plus registration and login. The README describes localStorage for client data. Frontend source was not sampled, so UI wiring is shown only where supported by the README or filenames; payment processing details are not evidenced.

Main entry points: [`src/index.js`](https://github.com/tanvisam/meesho-clone/blob/main/src/index.js) (Express API), [`viewall.html`](https://github.com/tanvisam/meesho-clone/blob/main/viewall.html) (Product Catalogs), [`src/configs/db.js`](https://github.com/tanvisam/meesho-clone/blob/main/src/configs/db.js) (MongoDB), [`product_description.html`](https://github.com/tanvisam/meesho-clone/blob/main/product_description.html) (Product Detail)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Landing Page<br/>[index.html]"]
  node_catalog["Product Catalogs<br/>[viewall.html]"]
  node_men["Men’s Catalog<br/>[Men.html]"]
  node_women["Women’s Catalog<br/>[WomenWestern.html]"]
  node_jewelry["Jewellery Catalog<br/>[jewellery.html]"]
  node_search["Search and Filter<br/>[search.js]"]
end

subgraph group_shopping["Shopping Flow"]
  node_product["Product Detail"]
  node_cart["Cart<br/>[CartPage.html]"]
  node_checkout["Checkout<br/>[checkout.html]"]
  node_payment["Card Payment<br/>[PaymentPage.html]"]
end

subgraph group_identity["Identity"]
  node_signup["Sign Up<br/>[SignUpPage.html]"]
  node_login["Log In<br/>[LogInPage.html]"]
  node_auth["Auth Endpoints"]
end

subgraph group_api["Product API"]
  node_server["Express API<br/>[index.js]"]
  node_menapi["Men’s Products"]
  node_womenapi["Women’s Products"]
  node_jewelryapi["Jewellery Products"]
end

subgraph group_persistence["Persistence"]
  node_clientstate[("Browser Storage")]
  node_users["User Model<br/>[user.model.js]"]
  node_menmodel["Men’s Product Model<br/>[mens.models.js]"]
  node_womenmodel["Women’s Product Model<br/>[womens.models.js]"]
  node_jewelrymodel["Jewellery Model"]
  node_mongo[("MongoDB<br/>[db.js]")]
end

node_shopper(("Shopper"))

node_shopper -->|"opens"| node_home
node_home -->|"browses"| node_catalog
node_catalog -->|"selects category"| node_men
node_catalog -->|"selects category"| node_women
node_catalog -->|"selects category"| node_jewelry
node_catalog -->|"filters and sorts"| node_search
node_men -->|"selects item"| node_product
node_women -->|"selects item"| node_product
node_jewelry -->|"selects item"| node_product
node_product -->|"adds item"| node_cart
node_cart -->|"continues"| node_checkout
node_checkout -->|"pays by card"| node_payment
node_shopper -->|"registers"| node_signup
node_shopper -->|"logs in"| node_login
node_cart -->|"stores cart"| node_clientstate
node_signup -->|"posts registration"| node_server
node_login -->|"posts credentials"| node_server
node_server -->|"dispatches"| node_auth
node_auth -->|"reads and writes"| node_users
node_men -->|"requests products"| node_server
node_women -->|"requests products"| node_server
node_jewelry -->|"requests products"| node_server
node_server -->|"routes /products"| node_menapi
node_server -->|"routes /womens"| node_womenapi
node_server -->|"routes /jwelleries"| node_jewelryapi
node_menapi -->|"queries and writes"| node_menmodel
node_womenapi -->|"queries and writes"| node_womenmodel
node_jewelryapi -->|"queries and writes"| node_jewelrymodel
node_server -->|"connects"| node_mongo
node_users -->|"persists users"| node_mongo
node_menmodel -->|"persists products"| node_mongo
node_womenmodel -->|"persists products"| node_mongo
node_jewelrymodel -->|"persists products"| node_mongo

click node_home "https://github.com/tanvisam/meesho-clone/blob/main/index.html"
click node_catalog "https://github.com/tanvisam/meesho-clone/blob/main/viewall.html"
click node_men "https://github.com/tanvisam/meesho-clone/blob/main/Men.html"
click node_women "https://github.com/tanvisam/meesho-clone/blob/main/WomenWestern.html"
click node_jewelry "https://github.com/tanvisam/meesho-clone/blob/main/jewellery.html"
click node_search "https://github.com/tanvisam/meesho-clone/blob/main/script/search.js"
click node_product "https://github.com/tanvisam/meesho-clone/blob/main/product_description.html"
click node_cart "https://github.com/tanvisam/meesho-clone/blob/main/CartPage.html"
click node_checkout "https://github.com/tanvisam/meesho-clone/blob/main/checkout.html"
click node_payment "https://github.com/tanvisam/meesho-clone/blob/main/PaymentPage.html"
click node_signup "https://github.com/tanvisam/meesho-clone/blob/main/SignUpPage.html"
click node_login "https://github.com/tanvisam/meesho-clone/blob/main/LogInPage.html"
click node_server "https://github.com/tanvisam/meesho-clone/blob/main/src/index.js"
click node_auth "https://github.com/tanvisam/meesho-clone/blob/main/src/controllers/signup.constrollers.js"
click node_menapi "https://github.com/tanvisam/meesho-clone/blob/main/src/controllers/mens.controllers.js"
click node_womenapi "https://github.com/tanvisam/meesho-clone/blob/main/src/controllers/womens.controllers.js"
click node_jewelryapi "https://github.com/tanvisam/meesho-clone/blob/main/src/controllers/jwelleries.controllers.js"
click node_users "https://github.com/tanvisam/meesho-clone/blob/main/src/models/user.model.js"
click node_menmodel "https://github.com/tanvisam/meesho-clone/blob/main/src/models/mens.models.js"
click node_womenmodel "https://github.com/tanvisam/meesho-clone/blob/main/src/models/womens.models.js"
click node_jewelrymodel "https://github.com/tanvisam/meesho-clone/blob/main/src/models/jwelleries.models.js"
click node_mongo "https://github.com/tanvisam/meesho-clone/blob/main/src/configs/db.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_home,node_catalog,node_men,node_women,node_jewelry,node_search toneBlue
class node_product,node_cart,node_checkout,node_payment toneAmber
class node_signup,node_login,node_auth toneMint
class node_server,node_menapi,node_womenapi,node_jewelryapi toneRose
class node_clientstate,node_users,node_menmodel,node_womenmodel,node_jewelrymodel,node_mongo,node_shopper toneIndigo
```

## Components

### Storefront

- [Landing Page](https://github.com/tanvisam/meesho-clone/blob/main/index.html): `index.html`
- [Product Catalogs](https://github.com/tanvisam/meesho-clone/blob/main/viewall.html): `viewall.html`
- [Men’s Catalog](https://github.com/tanvisam/meesho-clone/blob/main/Men.html): `Men.html`
- [Women’s Catalog](https://github.com/tanvisam/meesho-clone/blob/main/WomenWestern.html): `WomenWestern.html`
- [Jewellery Catalog](https://github.com/tanvisam/meesho-clone/blob/main/jewellery.html): `jewellery.html`
- [Search and Filter](https://github.com/tanvisam/meesho-clone/blob/main/script/search.js): `script/search.js`

### Shopping Flow

- [Product Detail](https://github.com/tanvisam/meesho-clone/blob/main/product_description.html): `product_description.html`
- [Cart](https://github.com/tanvisam/meesho-clone/blob/main/CartPage.html): `CartPage.html`
- [Checkout](https://github.com/tanvisam/meesho-clone/blob/main/checkout.html): `checkout.html`
- [Card Payment](https://github.com/tanvisam/meesho-clone/blob/main/PaymentPage.html): `PaymentPage.html`

### Identity

- [Sign Up](https://github.com/tanvisam/meesho-clone/blob/main/SignUpPage.html): `SignUpPage.html`
- [Log In](https://github.com/tanvisam/meesho-clone/blob/main/LogInPage.html): `LogInPage.html`
- [Auth Endpoints](https://github.com/tanvisam/meesho-clone/blob/main/src/controllers/signup.constrollers.js): `src/controllers/signup.constrollers.js`

### Product API

- [Express API](https://github.com/tanvisam/meesho-clone/blob/main/src/index.js): `src/index.js`
- [Men’s Products](https://github.com/tanvisam/meesho-clone/blob/main/src/controllers/mens.controllers.js): `src/controllers/mens.controllers.js`
- [Women’s Products](https://github.com/tanvisam/meesho-clone/blob/main/src/controllers/womens.controllers.js): `src/controllers/womens.controllers.js`
- [Jewellery Products](https://github.com/tanvisam/meesho-clone/blob/main/src/controllers/jwelleries.controllers.js): `src/controllers/jwelleries.controllers.js`

### Persistence

- **Browser Storage**
- [User Model](https://github.com/tanvisam/meesho-clone/blob/main/src/models/user.model.js): `src/models/user.model.js`
- [Men’s Product Model](https://github.com/tanvisam/meesho-clone/blob/main/src/models/mens.models.js): `src/models/mens.models.js`
- [Women’s Product Model](https://github.com/tanvisam/meesho-clone/blob/main/src/models/womens.models.js): `src/models/womens.models.js`
- [Jewellery Model](https://github.com/tanvisam/meesho-clone/blob/main/src/models/jwelleries.models.js): `src/models/jwelleries.models.js`
- [MongoDB](https://github.com/tanvisam/meesho-clone/blob/main/src/configs/db.js): `src/configs/db.js`

### Other components

- **Shopper**

## Connections

- Shopper → Landing Page: opens
- Landing Page → Product Catalogs: browses
- Product Catalogs → Men’s Catalog: selects category
- Product Catalogs → Women’s Catalog: selects category
- Product Catalogs → Jewellery Catalog: selects category
- Product Catalogs → Search and Filter: filters and sorts
- Men’s Catalog → Product Detail: selects item
- Women’s Catalog → Product Detail: selects item
- Jewellery Catalog → Product Detail: selects item
- Product Detail → Cart: adds item
- Cart → Checkout: continues
- Checkout → Card Payment: pays by card
- Shopper → Sign Up: registers
- Shopper → Log In: logs in
- Cart → Browser Storage: stores cart
- Sign Up → Express API: posts registration
- Log In → Express API: posts credentials
- Express API → Auth Endpoints: dispatches
- Auth Endpoints → User Model: reads and writes
- Men’s Catalog → Express API: requests products
- Women’s Catalog → Express API: requests products
- Jewellery Catalog → Express API: requests products
- Express API → Men’s Products: routes /products
- Express API → Women’s Products: routes /womens
- Express API → Jewellery Products: routes /jwelleries
- Men’s Products → Men’s Product Model: queries and writes
- Women’s Products → Women’s Product Model: queries and writes
- Jewellery Products → Jewellery Model: queries and writes
- Express API → MongoDB: connects
- User Model → MongoDB: persists users
- Men’s Product Model → MongoDB: persists products
- Women’s Product Model → MongoDB: persists products
- Jewellery Model → MongoDB: persists products
