# atulgaikwad20/multi_agents_product_tracking_system-resquora_ai architecture

> Architecture diagram of the GitHub repository atulgaikwad20/multi_agents_product_tracking_system-resquora_ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai
- Repository: https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai

## Overview

RESQUORA is a shopping-research web app. A signed-in user submits a typed or spoken request; the Supervisor interprets it, selects relevant retailer agents, gathers search results and permitted page evidence, verifies and scores offers, then presents a labeled report with history, logs, and downloads. The README documents this flow and optional location, voice, and PDF capabilities. The source excerpts show core orchestration and persistence boundaries; some UI-to-API and unsampled report wiring is therefore shown only where documented, or omitted.

Main entry points: [`app/playground/supervisor.py`](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/supervisor.py) (Research Supervisor), [`app/playground/verification.py`](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/verification.py) (Offer verification), [`app/static/js/pg/app.js`](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/static/js/pg/app.js) (Browser controller), [`app/playground/routes.py`](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/routes.py) (Playground API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_browser["Command Center<br/>[playground.html]"]
  node_webapp["Browser controller<br/>[app.js]"]
  node_api["API client<br/>[api.js]"]
  node_voice["Voice input<br/>[voice.js]"]
  node_render["Report and views<br/>[render.js]"]
end

subgraph group_orchestration["Research orchestration"]
  node_routes["Playground API<br/>[routes.py]"]
  node_supervisor["Research Supervisor<br/>[supervisor.py]"]
  node_understanding["Request understanding<br/>[understanding.py]"]
  node_llm["Language model<br/>[llm.py]"]
  node_capabilities["Retailer capabilities<br/>[capabilities.py]"]
  node_agents["Retailer agents<br/>[agents.py]"]
  node_search["Shopping search<br/>[search.py]"]
end

subgraph group_evidence["Evidence and reports"]
  node_fetcher["Safe page fetcher<br/>[net.py]"]
  node_extract["Page extraction<br/>[extract.py]"]
  node_verification["Offer verification<br/>[verification.py]"]
  node_matching["Product matching<br/>[matching.py]"]
  node_scoring["Offer scoring<br/>[scoring.py]"]
  node_reports["Report generation<br/>[reports.py]"]
  node_models["Evidence models<br/>[models.py]"]
end

subgraph group_platform["Platform services"]
  node_events["Run events<br/>[events.py]"]
  node_location["Location handling<br/>[location.py]"]
  node_store[("Research history<br/>[store.py]")]
  node_mysql[("MySQL database")]
end

subgraph group_identity["Account access"]
  node_auth["Login and registration<br/>[auth_routes.py]"]
  node_db_access["Database access<br/>[database.py]"]
end

node_user(("Shopper"))

node_user -->|"submits request"| node_browser
node_browser -.->|"uses"| node_webapp
node_webapp -->|"calls"| node_api
node_webapp -->|"uses"| node_voice
node_webapp -->|"renders with"| node_render
node_api -.->|"requests"| node_routes
node_routes -->|"starts and manages"| node_supervisor
node_supervisor -->|"interprets request"| node_understanding
node_understanding -.->|"uses when available"| node_llm
node_supervisor -->|"selects agents"| node_capabilities
node_supervisor -->|"dispatches research"| node_agents
node_agents -->|"queries shops"| node_search
node_agents -->|"fetches product pages"| node_fetcher
node_agents -.->|"extracts page data"| node_extract
node_supervisor -->|"verifies results"| node_verification
node_verification -->|"rechecks offers"| node_fetcher
node_verification -->|"extracts page data"| node_extract
node_verification -->|"matches listings"| node_matching
node_verification -->|"scores offers"| node_scoring
node_supervisor -->|"prepares final report"| node_reports
node_reports -->|"formats offer evidence"| node_models
node_verification -->|"updates evidence"| node_models
node_supervisor -->|"emits run events"| node_events
node_routes -->|"reads location"| node_location
node_routes -->|"reads run history"| node_store
node_supervisor -->|"persists runs"| node_store
node_store -.->|"stores history"| node_mysql
node_render -->|"presents report"| node_user
node_auth -->|"queries accounts"| node_db_access
node_db_access -->|"connects to"| node_mysql
node_auth -->|"redirects after sign-in"| node_browser

click node_browser "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/templates/playground.html"
click node_webapp "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/static/js/pg/app.js"
click node_api "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/static/js/pg/api.js"
click node_voice "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/static/js/pg/voice.js"
click node_render "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/static/js/pg/render.js"
click node_routes "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/routes.py"
click node_supervisor "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/supervisor.py"
click node_understanding "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/understanding.py"
click node_llm "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/llm.py"
click node_capabilities "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/capabilities.py"
click node_agents "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/agents.py"
click node_search "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/search.py"
click node_fetcher "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/net.py"
click node_extract "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/extract.py"
click node_verification "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/verification.py"
click node_matching "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/services/matching.py"
click node_scoring "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/services/scoring.py"
click node_reports "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/reports.py"
click node_models "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/models.py"
click node_events "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/events.py"
click node_location "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/location.py"
click node_store "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/store.py"
click node_auth "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/routes/auth_routes.py"
click node_db_access "https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/database.py"

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_browser,node_webapp,node_api,node_voice,node_render toneBlue
class node_routes,node_supervisor,node_understanding,node_llm,node_capabilities,node_agents,node_search toneAmber
class node_fetcher,node_extract,node_verification,node_matching,node_scoring,node_reports,node_models toneMint
class node_events,node_location,node_store,node_mysql toneRose
class node_auth,node_db_access,node_user toneIndigo
```

## Components

### User experience

- [Command Center](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/templates/playground.html): `app/templates/playground.html`
- [Browser controller](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/static/js/pg/app.js): `app/static/js/pg/app.js`
- [API client](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/static/js/pg/api.js): `app/static/js/pg/api.js`
- [Voice input](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/static/js/pg/voice.js): `app/static/js/pg/voice.js`
- [Report and views](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/static/js/pg/render.js): `app/static/js/pg/render.js`

### Research orchestration

- [Playground API](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/routes.py): `app/playground/routes.py`
- [Research Supervisor](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/supervisor.py): `app/playground/supervisor.py`
- [Request understanding](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/understanding.py): `app/playground/understanding.py`
- [Language model](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/llm.py): `app/playground/llm.py`
- [Retailer capabilities](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/capabilities.py): `app/playground/capabilities.py`
- [Retailer agents](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/agents.py): `app/playground/agents.py`
- [Shopping search](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/search.py): `app/playground/search.py`

### Evidence and reports

- [Safe page fetcher](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/net.py): `app/playground/net.py`
- [Page extraction](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/extract.py): `app/playground/extract.py`
- [Offer verification](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/verification.py): `app/playground/verification.py`
- [Product matching](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/services/matching.py): `app/services/matching.py`
- [Offer scoring](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/services/scoring.py): `app/services/scoring.py`
- [Report generation](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/reports.py): `app/playground/reports.py`
- [Evidence models](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/models.py): `app/playground/models.py`

### Platform services

- [Run events](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/events.py): `app/playground/events.py`
- [Location handling](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/location.py): `app/playground/location.py`
- [Research history](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/playground/store.py): `app/playground/store.py`
- **MySQL database**

### Account access

- [Login and registration](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/routes/auth_routes.py): `app/routes/auth_routes.py`
- [Database access](https://github.com/atulgaikwad20/multi_agents_product_tracking_system-resquora_ai/blob/main/app/database.py): `app/database.py`

### Other components

- **Shopper**

## Connections

- Shopper → Command Center: submits request (evidence: `README.md`)
- Command Center → Browser controller: uses
- Browser controller → API client: calls (evidence: `app/static/js/pg/app.js`)
- Browser controller → Voice input: uses (evidence: `app/static/js/pg/app.js`)
- Browser controller → Report and views: renders with (evidence: `app/static/js/pg/app.js`)
- API client → Playground API: requests
- Playground API → Research Supervisor: starts and manages (evidence: `app/playground/routes.py`)
- Research Supervisor → Request understanding: interprets request (evidence: `app/playground/supervisor.py`)
- Request understanding → Language model: uses when available
- Research Supervisor → Retailer capabilities: selects agents (evidence: `app/playground/supervisor.py`)
- Research Supervisor → Retailer agents: dispatches research (evidence: `README.md`)
- Retailer agents → Shopping search: queries shops (evidence: `app/playground/agents.py`)
- Retailer agents → Safe page fetcher: fetches product pages (evidence: `app/playground/agents.py`)
- Retailer agents → Page extraction: extracts page data (evidence: `app/playground/agents.py`)
- Research Supervisor → Offer verification: verifies results (evidence: `README.md`)
- Offer verification → Safe page fetcher: rechecks offers (evidence: `app/playground/verification.py`)
- Offer verification → Page extraction: extracts page data (evidence: `app/playground/verification.py`)
- Offer verification → Product matching: matches listings (evidence: `app/playground/verification.py`)
- Offer verification → Offer scoring: scores offers (evidence: `app/playground/verification.py`)
- Research Supervisor → Report generation: prepares final report (evidence: `app/playground/supervisor.py`)
- Report generation → Evidence models: formats offer evidence (evidence: `app/playground/reports.py`)
- Offer verification → Evidence models: updates evidence (evidence: `app/playground/verification.py`)
- Research Supervisor → Run events: emits run events (evidence: `app/playground/supervisor.py`)
- Playground API → Location handling: reads location (evidence: `app/playground/routes.py`)
- Playground API → Research history: reads run history (evidence: `app/playground/routes.py`)
- Research Supervisor → Research history: persists runs (evidence: `app/playground/supervisor.py`)
- Research history → MySQL database: stores history
- Report and views → Shopper: presents report (evidence: `README.md`)
- Login and registration → Database access: queries accounts (evidence: `app/routes/auth_routes.py`)
- Database access → MySQL database: connects to (evidence: `app/database.py`)
- Login and registration → Command Center: redirects after sign-in (evidence: `app/routes/auth_routes.py`)
