# mohanteja-8319/product-search-automation architecture

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

- Interactive diagram: https://gitdiagram.com/mohanteja-8319/product-search-automation
- Repository: https://github.com/mohanteja-8319/product-search-automation

## Overview

This is a product-discovery and price-comparison application with account management, price alerts, browser push, and an admin console. The main user workflow is to search or compare live marketplace listings, inspect product information, and optionally create an alert that is checked later and can trigger notifications. The graph includes the documented frontend feature areas, but source excerpts do not establish most frontend-to-API calls; those links are omitted. Alert-monitor internals are represented only at the supported subsystem level.

Main entry points: [`frontend/src/App.jsx`](https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/App.jsx) (Route application), [`backend/server.js`](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/server.js) (HTTP server), [`backend/controllers/authController.js`](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/controllers/authController.js) (Auth controller), [`backend/services/alertMonitor.js`](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/services/alertMonitor.js) (Alert monitor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Customer app"]
  node_app["Route application<br/>[App.jsx]"]
  node_browser["Browser push worker<br/>[sw.js]"]
end

subgraph group_commerce["Product discovery"]
  node_search["Product search<br/>[SearchPage.jsx]"]
  node_compare["Comparison"]
  node_product_detail["Product details<br/>[ProductDetail.jsx]"]
  node_history["Price history<br/>[PriceHistory.jsx]"]
  node_recommendations["Recommendations<br/>[Recommendation.jsx]"]
  node_category["Categories<br/>[CategoriesPage.jsx]"]
end

subgraph group_accounts["Accounts and alerts"]
  node_login["Authentication<br/>[Login.jsx]"]
  node_profile["Profile settings<br/>[Settings.jsx]"]
  node_wishlist["Wishlist<br/>[Wishlist.jsx]"]
  node_alert_ui["Alert management"]
end

subgraph group_backend["Backend services"]
  node_server["HTTP server<br/>[server.js]"]
  node_product_routes["Product routes<br/>[productRoutes.js]"]
  node_commerce_service["Live search and matching"]
  node_auth_routes["Auth routes<br/>[authRoutes.js]"]
  node_profile_routes["Profile routes<br/>[profileRoutes.js]"]
  node_auth_controller["Auth controller<br/>[authController.js]"]
  node_alert_routes["Alert routes<br/>[alertRoutes.js]"]
  node_alert_controller["Alert controller<br/>[alertController.js]"]
  node_monitor["Alert monitor<br/>[alertMonitor.js]"]
  node_push_routes["Push routes<br/>[pushRoutes.js]"]
  node_push_controller["Push controller<br/>[pushController.js]"]
  node_admin_routes["Admin routes<br/>[adminRoutes.js]"]
  node_users[("User records<br/>[User.js]")]
  node_alerts[("Alert records<br/>[Alert.js]")]
  node_subscriptions[("Push subscriptions")]
end

subgraph group_admin["Admin console"]
  node_admin_portal["Admin pages<br/>[AdminDashboard.jsx]"]
end

node_shopper(("Shopper"))
node_admin_user(("Admin user"))
node_quickcommerce["QuickCommerce API"]
node_email["Email transport<br/>[sendEmail.js]"]
node_push_sender["Push delivery<br/>[sendPush.js]"]

node_shopper -->|"uses"| node_app
node_app -->|"routes to"| node_search
node_app -->|"routes to"| node_compare
node_app -->|"routes to"| node_product_detail
node_app -->|"routes to"| node_history
node_app -->|"routes to"| node_recommendations
node_app -->|"routes to"| node_category
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_wishlist
node_app -->|"routes to"| node_alert_ui
node_server -->|"mounts"| node_product_routes
node_server -->|"mounts"| node_auth_routes
node_server -->|"mounts"| node_profile_routes
node_server -->|"mounts"| node_alert_routes
node_server -->|"mounts"| node_push_routes
node_server -->|"mounts"| node_admin_routes
node_product_routes -->|"calls"| node_commerce_service
node_commerce_service -->|"fetches listings"| node_quickcommerce
node_auth_routes -->|"dispatches"| node_auth_controller
node_profile_routes -->|"dispatches"| node_auth_controller
node_auth_controller -->|"reads and writes"| node_users
node_auth_controller -->|"deletes owned alerts"| node_alerts
node_auth_controller -->|"sends reset email"| node_email
node_alert_routes -->|"dispatches"| node_alert_controller
node_alert_controller -->|"reads and writes"| node_alerts
node_alert_controller -->|"reads"| node_users
node_alert_controller -->|"runs checks"| node_monitor
node_server -->|"schedules checks"| node_monitor
node_monitor -->|"checks alerts"| node_alerts
node_monitor -->|"sends notifications"| node_push_sender
node_monitor -->|"sends notifications"| node_email
node_push_routes -->|"dispatches"| node_push_controller
node_push_controller -->|"reads and writes"| node_subscriptions
node_browser -->|"subscribes"| node_push_routes
node_admin_user -->|"uses"| node_admin_portal
node_admin_routes -->|"reads"| node_users
node_admin_routes -->|"counts"| node_alerts

click node_app "https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/App.jsx"
click node_search "https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/SearchPage.jsx"
click node_compare "https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/ComparisionPage.jsx"
click node_product_detail "https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/ProductDetail.jsx"
click node_history "https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/PriceHistory.jsx"
click node_recommendations "https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/Recommendation.jsx"
click node_category "https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/CategoriesPage.jsx"
click node_login "https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/Login.jsx"
click node_profile "https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/Settings.jsx"
click node_wishlist "https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/Wishlist.jsx"
click node_alert_ui "https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Components/PriceAlertsMain.jsx"
click node_server "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/server.js"
click node_product_routes "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/routes/productRoutes.js"
click node_commerce_service "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/services/quickCommerceService.js"
click node_auth_routes "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/routes/authRoutes.js"
click node_profile_routes "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/routes/profileRoutes.js"
click node_auth_controller "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/controllers/authController.js"
click node_alert_routes "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/routes/alertRoutes.js"
click node_alert_controller "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/controllers/alertController.js"
click node_monitor "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/services/alertMonitor.js"
click node_push_routes "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/routes/pushRoutes.js"
click node_push_controller "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/controllers/pushController.js"
click node_admin_routes "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/routes/adminRoutes.js"
click node_users "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/models/User.js"
click node_alerts "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/models/Alert.js"
click node_subscriptions "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/models/PushSubscription.js"
click node_email "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/utils/sendEmail.js"
click node_push_sender "https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/utils/sendPush.js"
click node_browser "https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/public/sw.js"
click node_admin_portal "https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/admin/pages/AdminDashboard.jsx"

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_app,node_browser,node_admin_user toneBlue
class node_search,node_compare,node_product_detail,node_history,node_recommendations,node_category toneAmber
class node_login,node_profile,node_wishlist,node_alert_ui,node_quickcommerce toneMint
class node_server,node_product_routes,node_commerce_service,node_auth_routes,node_profile_routes,node_auth_controller,node_alert_routes,node_alert_controller,node_monitor,node_push_routes,node_push_controller,node_admin_routes,node_users,node_alerts,node_subscriptions toneRose
class node_admin_portal,node_shopper toneIndigo
class node_email,node_push_sender toneTeal
```

## Components

### Customer app

- [Route application](https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Browser push worker](https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/public/sw.js): `frontend/public/sw.js`

### Product discovery

- [Product search](https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/SearchPage.jsx): `frontend/src/Pages/SearchPage.jsx`
- [Comparison](https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/ComparisionPage.jsx): `frontend/src/Pages/ComparisionPage.jsx`
- [Product details](https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/ProductDetail.jsx): `frontend/src/Pages/ProductDetail.jsx`
- [Price history](https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/PriceHistory.jsx): `frontend/src/Pages/PriceHistory.jsx`
- [Recommendations](https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/Recommendation.jsx): `frontend/src/Pages/Recommendation.jsx`
- [Categories](https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/CategoriesPage.jsx): `frontend/src/Pages/CategoriesPage.jsx`

### Accounts and alerts

- [Authentication](https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/Login.jsx): `frontend/src/Pages/Login.jsx`
- [Profile settings](https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/Settings.jsx): `frontend/src/Pages/Settings.jsx`
- [Wishlist](https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Pages/Wishlist.jsx): `frontend/src/Pages/Wishlist.jsx`
- [Alert management](https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/Components/PriceAlertsMain.jsx): `frontend/src/Components/PriceAlertsMain.jsx`

### Backend services

- [HTTP server](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/server.js): `backend/server.js`
- [Product routes](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/routes/productRoutes.js): `backend/routes/productRoutes.js`
- [Live search and matching](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/services/quickCommerceService.js): `backend/services/quickCommerceService.js`
- [Auth routes](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [Profile routes](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/routes/profileRoutes.js): `backend/routes/profileRoutes.js`
- [Auth controller](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [Alert routes](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/routes/alertRoutes.js): `backend/routes/alertRoutes.js`
- [Alert controller](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/controllers/alertController.js): `backend/controllers/alertController.js`
- [Alert monitor](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/services/alertMonitor.js): `backend/services/alertMonitor.js`
- [Push routes](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/routes/pushRoutes.js): `backend/routes/pushRoutes.js`
- [Push controller](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/controllers/pushController.js): `backend/controllers/pushController.js`
- [Admin routes](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/routes/adminRoutes.js): `backend/routes/adminRoutes.js`
- [User records](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/models/User.js): `backend/models/User.js`
- [Alert records](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/models/Alert.js): `backend/models/Alert.js`
- [Push subscriptions](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/models/PushSubscription.js): `backend/models/PushSubscription.js`

### Admin console

- [Admin pages](https://github.com/mohanteja-8319/product-search-automation/blob/main/frontend/src/admin/pages/AdminDashboard.jsx): `frontend/src/admin/pages/AdminDashboard.jsx`

### Other components

- **Shopper**
- **Admin user**
- **QuickCommerce API**
- [Email transport](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/utils/sendEmail.js): `backend/utils/sendEmail.js`
- [Push delivery](https://github.com/mohanteja-8319/product-search-automation/blob/main/backend/utils/sendPush.js): `backend/utils/sendPush.js`

## Connections

- Shopper → Route application: uses
- Route application → Product search: routes to
- Route application → Comparison: routes to
- Route application → Product details: routes to
- Route application → Price history: routes to
- Route application → Recommendations: routes to
- Route application → Categories: routes to
- Route application → Authentication: routes to
- Route application → Profile settings: routes to
- Route application → Wishlist: routes to
- Route application → Alert management: routes to
- HTTP server → Product routes: mounts
- HTTP server → Auth routes: mounts
- HTTP server → Profile routes: mounts
- HTTP server → Alert routes: mounts
- HTTP server → Push routes: mounts
- HTTP server → Admin routes: mounts
- Product routes → Live search and matching: calls
- Live search and matching → QuickCommerce API: fetches listings
- Auth routes → Auth controller: dispatches
- Profile routes → Auth controller: dispatches
- Auth controller → User records: reads and writes
- Auth controller → Alert records: deletes owned alerts
- Auth controller → Email transport: sends reset email
- Alert routes → Alert controller: dispatches
- Alert controller → Alert records: reads and writes
- Alert controller → User records: reads
- Alert controller → Alert monitor: runs checks
- HTTP server → Alert monitor: schedules checks
- Alert monitor → Alert records: checks alerts
- Alert monitor → Push delivery: sends notifications
- Alert monitor → Email transport: sends notifications
- Push routes → Push controller: dispatches
- Push controller → Push subscriptions: reads and writes
- Browser push worker → Push routes: subscribes
- Admin user → Admin pages: uses
- Admin routes → User records: reads
- Admin routes → Alert records: counts
