# techwithtim/price-tracking-web-scraper architecture

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

- Interactive diagram: https://gitdiagram.com/techwithtim/price-tracking-web-scraper
- Repository: https://github.com/techwithtim/price-tracking-web-scraper

## Overview

The product is an Amazon.ca price-tracking application: users submit a search, the scraper collects matching products, and the interface presents tracked products and price history. A scheduler can request tracked-product updates. The Flask API is the integration point between the UI, scraper and scheduled trigger. The README documents Flask, Playwright and Bright Data; backend route and persistence details are not visible in the excerpts, so those connections are limited to documented or directly observed HTTP behavior.

Main entry points: [`frontend/src/App.js`](https://github.com/techwithtim/price-tracking-web-scraper/blob/main/frontend/src/App.js) (Search app), [`Backend/app.py`](https://github.com/techwithtim/price-tracking-web-scraper/blob/main/Backend/app.py) (Flask API), [`Backend/scraper/main.py`](https://github.com/techwithtim/price-tracking-web-scraper/blob/main/Backend/scraper/main.py) (Search and collect), [`frontend/src/components/PriceHistoryTable.jsx`](https://github.com/techwithtim/price-tracking-web-scraper/blob/main/frontend/src/components/PriceHistoryTable.jsx) (Price history)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Web interface"]
  node_app["Search app<br/>[App.js]"]
  node_search_list["Search list<br/>[SearchTextList.jsx]"]
  node_tracked_list["Tracked products"]
  node_history_table["Price history"]
  node_details["Product details"]
  node_modal["Details modal<br/>[Modal.jsx]"]
end

subgraph group_service["Backend API"]
  node_api["Flask API<br/>[app.py]"]
end

subgraph group_collection["Price collection"]
  node_scraper_entry["Scraper entry<br/>[__init__.py]"]
  node_scraper["Search and collect<br/>[main.py]"]
  node_amazon_parser["Amazon extraction<br/>[amazon.py]"]
  node_browser["Scraping browser"]
end

subgraph group_automation["Scheduled updates"]
  node_scheduler["Update scheduler<br/>[main.py]"]
end

node_user(("User"))
node_amazon["Amazon.ca"]

node_user -->|"submits search"| node_app
node_app -->|"starts scraper"| node_api
node_api -.->|"launches scraper"| node_scraper_entry
node_scraper_entry -->|"runs"| node_scraper
node_scraper -->|"connects through CDP"| node_browser
node_scraper -->|"opens and searches"| node_amazon
node_scraper -->|"extracts products"| node_amazon_parser
node_scraper -->|"posts results"| node_api
node_app -->|"renders"| node_search_list
node_app -->|"renders"| node_tracked_list
node_app -->|"renders"| node_history_table
node_search_list -->|"selects search"| node_app
node_tracked_list -->|"manages tracked items"| node_api
node_history_table -->|"opens details"| node_modal
node_history_table -->|"renders details"| node_details
node_app -->|"loads history"| node_api
node_scheduler -->|"requests updates"| node_api

click node_app "https://github.com/techwithtim/price-tracking-web-scraper/blob/main/frontend/src/App.js"
click node_search_list "https://github.com/techwithtim/price-tracking-web-scraper/blob/main/frontend/src/components/SearchTextList.jsx"
click node_tracked_list "https://github.com/techwithtim/price-tracking-web-scraper/blob/main/frontend/src/components/TrackedProductList.jsx"
click node_history_table "https://github.com/techwithtim/price-tracking-web-scraper/blob/main/frontend/src/components/PriceHistoryTable.jsx"
click node_details "https://github.com/techwithtim/price-tracking-web-scraper/blob/main/frontend/src/components/ProductDetailsPage.jsx"
click node_modal "https://github.com/techwithtim/price-tracking-web-scraper/blob/main/frontend/src/components/Modal.jsx"
click node_api "https://github.com/techwithtim/price-tracking-web-scraper/blob/main/Backend/app.py"
click node_scraper_entry "https://github.com/techwithtim/price-tracking-web-scraper/blob/main/Backend/scraper/__init__.py"
click node_scraper "https://github.com/techwithtim/price-tracking-web-scraper/blob/main/Backend/scraper/main.py"
click node_amazon_parser "https://github.com/techwithtim/price-tracking-web-scraper/blob/main/Backend/scraper/amazon.py"
click node_scheduler "https://github.com/techwithtim/price-tracking-web-scraper/blob/main/scheduler/main.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_app,node_search_list,node_tracked_list,node_history_table,node_details,node_modal,node_user toneBlue
class node_api toneAmber
class node_scraper_entry,node_scraper,node_amazon_parser,node_browser toneMint
class node_scheduler toneRose
class node_amazon toneIndigo
```

## Components

### Web interface

- [Search app](https://github.com/techwithtim/price-tracking-web-scraper/blob/main/frontend/src/App.js): `frontend/src/App.js`
- [Search list](https://github.com/techwithtim/price-tracking-web-scraper/blob/main/frontend/src/components/SearchTextList.jsx): `frontend/src/components/SearchTextList.jsx`
- [Tracked products](https://github.com/techwithtim/price-tracking-web-scraper/blob/main/frontend/src/components/TrackedProductList.jsx): `frontend/src/components/TrackedProductList.jsx`
- [Price history](https://github.com/techwithtim/price-tracking-web-scraper/blob/main/frontend/src/components/PriceHistoryTable.jsx): `frontend/src/components/PriceHistoryTable.jsx`
- [Product details](https://github.com/techwithtim/price-tracking-web-scraper/blob/main/frontend/src/components/ProductDetailsPage.jsx): `frontend/src/components/ProductDetailsPage.jsx`
- [Details modal](https://github.com/techwithtim/price-tracking-web-scraper/blob/main/frontend/src/components/Modal.jsx): `frontend/src/components/Modal.jsx`

### Backend API

- [Flask API](https://github.com/techwithtim/price-tracking-web-scraper/blob/main/Backend/app.py): `Backend/app.py`

### Price collection

- [Scraper entry](https://github.com/techwithtim/price-tracking-web-scraper/blob/main/Backend/scraper/__init__.py): `Backend/scraper/__init__.py`
- [Search and collect](https://github.com/techwithtim/price-tracking-web-scraper/blob/main/Backend/scraper/main.py): `Backend/scraper/main.py`
- [Amazon extraction](https://github.com/techwithtim/price-tracking-web-scraper/blob/main/Backend/scraper/amazon.py): `Backend/scraper/amazon.py`
- **Scraping browser**

### Scheduled updates

- [Update scheduler](https://github.com/techwithtim/price-tracking-web-scraper/blob/main/scheduler/main.py): `scheduler/main.py`

### Other components

- **User**
- **Amazon.ca**

## Connections

- User → Search app: submits search (evidence: `frontend/src/App.js`)
- Search app → Flask API: starts scraper (evidence: `frontend/src/App.js`)
- Flask API → Scraper entry: launches scraper
- Scraper entry → Search and collect: runs (evidence: `Backend/scraper/__init__.py`)
- Search and collect → Scraping browser: connects through CDP (evidence: `Backend/scraper/main.py`)
- Search and collect → Amazon.ca: opens and searches (evidence: `Backend/scraper/main.py`)
- Search and collect → Amazon extraction: extracts products (evidence: `Backend/scraper/main.py`)
- Search and collect → Flask API: posts results (evidence: `Backend/scraper/main.py`)
- Search app → Search list: renders (evidence: `frontend/src/App.js`)
- Search app → Tracked products: renders (evidence: `frontend/src/App.js`)
- Search app → Price history: renders (evidence: `frontend/src/App.js`)
- Search list → Search app: selects search (evidence: `frontend/src/components/SearchTextList.jsx`)
- Tracked products → Flask API: manages tracked items (evidence: `frontend/src/components/TrackedProductList.jsx`)
- Price history → Details modal: opens details (evidence: `frontend/src/components/PriceHistoryTable.jsx`)
- Price history → Product details: renders details (evidence: `frontend/src/components/PriceHistoryTable.jsx`)
- Search app → Flask API: loads history (evidence: `frontend/src/App.js`)
- Update scheduler → Flask API: requests updates (evidence: `README.md`)
