# bhavanesh05/parivar-mart architecture

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

- Interactive diagram: https://gitdiagram.com/bhavanesh05/parivar-mart
- Repository: https://github.com/bhavanesh05/parivar-mart

## Overview

Parivar Mart is a browser-based grocery storefront. Shoppers browse or search a mock catalog, add products to a persistent cart, then enter delivery details and choose a payment option to see a simulated order confirmation. The main coordinator initializes the feature modules and connects global navigation and search. Authentication, location selection, catalog browsing, cart management, and checkout are the visible product capabilities. The README is empty; relationships below are limited to the supplied source excerpts, and the HTML pages were not sampled.

Main entry points: [`js/app.js`](https://github.com/bhavanesh05/parivar-mart/blob/main/js/app.js) (App Coordinator), [`js/cart.js`](https://github.com/bhavanesh05/parivar-mart/blob/main/js/cart.js) (Cart Management), [`js/checkout.js`](https://github.com/bhavanesh05/parivar-mart/blob/main/js/checkout.js) (Order Checkout), [`js/products.js`](https://github.com/bhavanesh05/parivar-mart/blob/main/js/products.js) (Catalog Browsing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Storefront Shell"]
  node_coordinator["App Coordinator<br/>[app.js]"]
  node_authentication["Authentication<br/>[auth.js]"]
  node_location["Location Selection<br/>[app.js]"]
  node_accounts[("Local Accounts<br/>[auth.js]")]
end

subgraph group_catalog["Product Catalog"]
  node_catalog_ui["Catalog Browsing<br/>[products.js]"]
  node_product_data["Mock Product Data<br/>[data.js]"]
end

subgraph group_cart["Cart"]
  node_cart_manager["Cart Management<br/>[cart.js]"]
  node_cart_store[("Saved Cart<br/>[cart.js]")]
end

subgraph group_checkout["Checkout"]
  node_checkout_flow["Order Checkout<br/>[checkout.js]"]
  node_order_result["Order Confirmation<br/>[checkout.js]"]
end

node_shopper(("Shopper"))

node_shopper -->|"uses storefront"| node_coordinator
node_coordinator -->|"initializes"| node_authentication
node_coordinator -->|"initializes"| node_cart_manager
node_coordinator -->|"initializes"| node_catalog_ui
node_coordinator -->|"initializes"| node_checkout_flow
node_coordinator -->|"manages"| node_location
node_coordinator -->|"routes search"| node_catalog_ui
node_coordinator -->|"routes profile"| node_authentication
node_coordinator -->|"opens drawer"| node_cart_manager
node_authentication -->|"reads and writes"| node_accounts
node_shopper -->|"browses products"| node_catalog_ui
node_catalog_ui -->|"renders from"| node_product_data
node_catalog_ui -->|"adds products"| node_cart_manager
node_cart_manager -->|"loads and saves"| node_cart_store
node_shopper -->|"manages cart"| node_cart_manager
node_cart_manager -->|"signals updates"| node_catalog_ui
node_shopper -->|"submits order"| node_checkout_flow
node_checkout_flow -->|"reads cart"| node_cart_store
node_checkout_flow -->|"gets totals"| node_cart_manager
node_checkout_flow -->|"checks login"| node_authentication
node_checkout_flow -->|"clears cart"| node_cart_manager
node_checkout_flow -->|"displays confirmation"| node_order_result

click node_coordinator "https://github.com/bhavanesh05/parivar-mart/blob/main/js/app.js"
click node_authentication "https://github.com/bhavanesh05/parivar-mart/blob/main/js/auth.js"
click node_location "https://github.com/bhavanesh05/parivar-mart/blob/main/js/app.js"
click node_accounts "https://github.com/bhavanesh05/parivar-mart/blob/main/js/auth.js"
click node_catalog_ui "https://github.com/bhavanesh05/parivar-mart/blob/main/js/products.js"
click node_product_data "https://github.com/bhavanesh05/parivar-mart/blob/main/js/data.js"
click node_cart_manager "https://github.com/bhavanesh05/parivar-mart/blob/main/js/cart.js"
click node_cart_store "https://github.com/bhavanesh05/parivar-mart/blob/main/js/cart.js"
click node_checkout_flow "https://github.com/bhavanesh05/parivar-mart/blob/main/js/checkout.js"
click node_order_result "https://github.com/bhavanesh05/parivar-mart/blob/main/js/checkout.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_coordinator,node_authentication,node_location,node_accounts toneBlue
class node_catalog_ui,node_product_data toneAmber
class node_cart_manager,node_cart_store toneMint
class node_checkout_flow,node_order_result toneRose
class node_shopper toneIndigo
```

## Components

### Storefront Shell

- [App Coordinator](https://github.com/bhavanesh05/parivar-mart/blob/main/js/app.js): `js/app.js`
- [Authentication](https://github.com/bhavanesh05/parivar-mart/blob/main/js/auth.js): `js/auth.js`
- [Location Selection](https://github.com/bhavanesh05/parivar-mart/blob/main/js/app.js): `js/app.js`
- [Local Accounts](https://github.com/bhavanesh05/parivar-mart/blob/main/js/auth.js): `js/auth.js`

### Product Catalog

- [Catalog Browsing](https://github.com/bhavanesh05/parivar-mart/blob/main/js/products.js): `js/products.js`
- [Mock Product Data](https://github.com/bhavanesh05/parivar-mart/blob/main/js/data.js): `js/data.js`

### Cart

- [Cart Management](https://github.com/bhavanesh05/parivar-mart/blob/main/js/cart.js): `js/cart.js`
- [Saved Cart](https://github.com/bhavanesh05/parivar-mart/blob/main/js/cart.js): `js/cart.js`

### Checkout

- [Order Checkout](https://github.com/bhavanesh05/parivar-mart/blob/main/js/checkout.js): `js/checkout.js`
- [Order Confirmation](https://github.com/bhavanesh05/parivar-mart/blob/main/js/checkout.js): `js/checkout.js`

### Other components

- **Shopper**

## Connections

- Shopper → App Coordinator: uses storefront (evidence: `js/app.js`)
- App Coordinator → Authentication: initializes (evidence: `js/app.js`)
- App Coordinator → Cart Management: initializes (evidence: `js/app.js`)
- App Coordinator → Catalog Browsing: initializes (evidence: `js/app.js`)
- App Coordinator → Order Checkout: initializes (evidence: `js/app.js`)
- App Coordinator → Location Selection: manages (evidence: `js/app.js`)
- App Coordinator → Catalog Browsing: routes search (evidence: `js/app.js`)
- App Coordinator → Authentication: routes profile (evidence: `js/app.js`)
- App Coordinator → Cart Management: opens drawer (evidence: `js/app.js`)
- Authentication → Local Accounts: reads and writes (evidence: `js/auth.js`)
- Shopper → Catalog Browsing: browses products (evidence: `js/products.js`)
- Catalog Browsing → Mock Product Data: renders from (evidence: `js/products.js`)
- Catalog Browsing → Cart Management: adds products (evidence: `js/products.js`)
- Cart Management → Saved Cart: loads and saves (evidence: `js/cart.js`)
- Shopper → Cart Management: manages cart (evidence: `js/cart.js`)
- Cart Management → Catalog Browsing: signals updates (evidence: `js/cart.js`)
- Shopper → Order Checkout: submits order (evidence: `js/checkout.js`)
- Order Checkout → Saved Cart: reads cart (evidence: `js/checkout.js`)
- Order Checkout → Cart Management: gets totals (evidence: `js/checkout.js`)
- Order Checkout → Authentication: checks login (evidence: `js/checkout.js`)
- Order Checkout → Cart Management: clears cart (evidence: `js/checkout.js`)
- Order Checkout → Order Confirmation: displays confirmation (evidence: `js/checkout.js`)
