# adrian-utz/price-checker architecture

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

- Interactive diagram: https://gitdiagram.com/adrian-utz/price-checker
- Repository: https://github.com/adrian-utz/price-checker

## Overview

Price Checker is a Flask product-watchlist app: users add or import retailer URLs, run or schedule price checks, and review current prices and history. In hosted modes, account and administrator workflows govern access to shared lists and quotas. Scans select a supported provider, cache and pace requests, and persist results in SQLite for charts and export. The README documents these capabilities; sampled excerpts do not expose all route implementations, so some connections are shown only where documentation or the source index supports them.

Main entry points: [`main.py`](https://github.com/adrian-utz/price-checker/blob/main/main.py) (Flask routes), [`utils/database.py`](https://github.com/adrian-utz/price-checker/blob/main/utils/database.py) (SQLite store), [`utils/scanner.py`](https://github.com/adrian-utz/price-checker/blob/main/utils/scanner.py) (Scan execution), [`utils/providers.py`](https://github.com/adrian-utz/price-checker/blob/main/utils/providers.py) (Provider selection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_flask["Flask routes<br/>[main.py]"]
  node_config["Runtime settings<br/>[config.py]"]
  node_serving["Mode serving<br/>[serving.py]"]
  node_chart["Price charts<br/>[charting.py]"]
  node_devtools["API debug tools<br/>[dev_responses.py]"]
end

subgraph group_scanning["Price scanning"]
  node_scanner["Scan execution<br/>[scanner.py]"]
  node_providers["Provider selection<br/>[providers.py]"]
  node_serpapi["SerpApi client<br/>[serpapi_client.py]"]
  node_unwrangle["Unwrangle client"]
  node_apify["Apify client"]
  node_retailers{{"Retailer APIs"}}
  node_schedules["List schedules<br/>[schedules.py]"]
end

subgraph group_accounts["Accounts and controls"]
  node_limits["Usage limits<br/>[limits.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_users["User accounts<br/>[users.py]"]
end

subgraph group_data["Watchlist data"]
  node_lists["Shared lists<br/>[lists.py]"]
  node_io["Import and export<br/>[watchlist_io.py]"]
  node_product["Product details<br/>[product_utils.py]"]
  node_database[("SQLite store<br/>[database.py]")]
  node_migrations["Schema migrations<br/>[migrations.py]"]
end

node_user(("User"))

node_user -->|"uses"| node_flask
node_flask -->|"loads settings"| node_config
node_flask -->|"starts server"| node_serving
node_flask -->|"authenticates"| node_auth
node_flask -->|"runs scans"| node_scanner
node_flask -->|"manages schedules"| node_schedules
node_flask -->|"manages lists"| node_lists
node_flask -->|"imports and exports"| node_io
node_flask -->|"renders charts"| node_chart
node_flask -->|"shows responses"| node_devtools
node_scanner -->|"fetches products"| node_providers
node_providers -->|"dispatches to"| node_serpapi
node_providers -->|"dispatches to"| node_unwrangle
node_providers -->|"dispatches to"| node_apify
node_serpapi -->|"queries"| node_retailers
node_unwrangle -->|"queries"| node_retailers
node_apify -->|"queries"| node_retailers
node_scanner -->|"checks budgets"| node_limits
node_scanner -.->|"records results"| node_database
node_schedules -->|"runs scheduled scans"| node_scanner
node_auth -->|"checks accounts"| node_users
node_auth -.->|"reads and updates"| node_database
node_users -.->|"stores accounts"| node_database
node_lists -.->|"stores lists"| node_database
node_io -->|"reads and merges"| node_database
node_chart -.->|"reads history"| node_database
node_database -->|"initializes schema"| node_migrations
node_devtools -->|"reads responses"| node_database
node_providers -->|"records responses"| node_devtools
node_scanner -.->|"normalizes products"| node_product

click node_flask "https://github.com/adrian-utz/price-checker/blob/main/main.py"
click node_config "https://github.com/adrian-utz/price-checker/blob/main/utils/config.py"
click node_serving "https://github.com/adrian-utz/price-checker/blob/main/utils/serving.py"
click node_chart "https://github.com/adrian-utz/price-checker/blob/main/utils/charting.py"
click node_devtools "https://github.com/adrian-utz/price-checker/blob/main/utils/dev_responses.py"
click node_scanner "https://github.com/adrian-utz/price-checker/blob/main/utils/scanner.py"
click node_providers "https://github.com/adrian-utz/price-checker/blob/main/utils/providers.py"
click node_serpapi "https://github.com/adrian-utz/price-checker/blob/main/api_clients/serpapi_client.py"
click node_unwrangle "https://github.com/adrian-utz/price-checker/blob/main/api_clients/unwrangle_client.py"
click node_apify "https://github.com/adrian-utz/price-checker/blob/main/api_clients/apify_api_client.py"
click node_schedules "https://github.com/adrian-utz/price-checker/blob/main/utils/schedules.py"
click node_limits "https://github.com/adrian-utz/price-checker/blob/main/utils/limits.py"
click node_auth "https://github.com/adrian-utz/price-checker/blob/main/utils/auth.py"
click node_users "https://github.com/adrian-utz/price-checker/blob/main/utils/users.py"
click node_lists "https://github.com/adrian-utz/price-checker/blob/main/utils/lists.py"
click node_io "https://github.com/adrian-utz/price-checker/blob/main/utils/watchlist_io.py"
click node_product "https://github.com/adrian-utz/price-checker/blob/main/utils/product_utils.py"
click node_database "https://github.com/adrian-utz/price-checker/blob/main/utils/database.py"
click node_migrations "https://github.com/adrian-utz/price-checker/blob/main/utils/migrations.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_flask,node_config,node_serving,node_chart,node_devtools,node_user toneBlue
class node_scanner,node_providers,node_serpapi,node_unwrangle,node_apify,node_retailers,node_schedules toneAmber
class node_limits,node_auth,node_users toneMint
class node_lists,node_io,node_product,node_database,node_migrations toneRose
```

## Components

### Web application

- [Flask routes](https://github.com/adrian-utz/price-checker/blob/main/main.py): `main.py`
- [Runtime settings](https://github.com/adrian-utz/price-checker/blob/main/utils/config.py): `utils/config.py`
- [Mode serving](https://github.com/adrian-utz/price-checker/blob/main/utils/serving.py): `utils/serving.py`
- [Price charts](https://github.com/adrian-utz/price-checker/blob/main/utils/charting.py): `utils/charting.py`
- [API debug tools](https://github.com/adrian-utz/price-checker/blob/main/utils/dev_responses.py): `utils/dev_responses.py`

### Price scanning

- [Scan execution](https://github.com/adrian-utz/price-checker/blob/main/utils/scanner.py): `utils/scanner.py`
- [Provider selection](https://github.com/adrian-utz/price-checker/blob/main/utils/providers.py): `utils/providers.py`
- [SerpApi client](https://github.com/adrian-utz/price-checker/blob/main/api_clients/serpapi_client.py): `api_clients/serpapi_client.py`
- [Unwrangle client](https://github.com/adrian-utz/price-checker/blob/main/api_clients/unwrangle_client.py): `api_clients/unwrangle_client.py`
- [Apify client](https://github.com/adrian-utz/price-checker/blob/main/api_clients/apify_api_client.py): `api_clients/apify_api_client.py`
- **Retailer APIs**
- [List schedules](https://github.com/adrian-utz/price-checker/blob/main/utils/schedules.py): `utils/schedules.py`

### Accounts and controls

- [Usage limits](https://github.com/adrian-utz/price-checker/blob/main/utils/limits.py): `utils/limits.py`
- [Authentication](https://github.com/adrian-utz/price-checker/blob/main/utils/auth.py): `utils/auth.py`
- [User accounts](https://github.com/adrian-utz/price-checker/blob/main/utils/users.py): `utils/users.py`

### Watchlist data

- [Shared lists](https://github.com/adrian-utz/price-checker/blob/main/utils/lists.py): `utils/lists.py`
- [Import and export](https://github.com/adrian-utz/price-checker/blob/main/utils/watchlist_io.py): `utils/watchlist_io.py`
- [Product details](https://github.com/adrian-utz/price-checker/blob/main/utils/product_utils.py): `utils/product_utils.py`
- [SQLite store](https://github.com/adrian-utz/price-checker/blob/main/utils/database.py): `utils/database.py`
- [Schema migrations](https://github.com/adrian-utz/price-checker/blob/main/utils/migrations.py): `utils/migrations.py`

### Other components

- **User**

## Connections

- User → Flask routes: uses (evidence: `README.md`)
- Flask routes → Runtime settings: loads settings (evidence: `main.py`)
- Flask routes → Mode serving: starts server (evidence: `main.py`)
- Flask routes → Authentication: authenticates (evidence: `main.py`)
- Flask routes → Scan execution: runs scans (evidence: `main.py`)
- Flask routes → List schedules: manages schedules (evidence: `main.py`)
- Flask routes → Shared lists: manages lists (evidence: `main.py`)
- Flask routes → Import and export: imports and exports (evidence: `main.py`)
- Flask routes → Price charts: renders charts (evidence: `README.md`)
- Flask routes → API debug tools: shows responses (evidence: `README.md`)
- Scan execution → Provider selection: fetches products (evidence: `utils/scanner.py`)
- Provider selection → SerpApi client: dispatches to (evidence: `utils/providers.py`)
- Provider selection → Unwrangle client: dispatches to (evidence: `utils/providers.py`)
- Provider selection → Apify client: dispatches to (evidence: `utils/providers.py`)
- SerpApi client → Retailer APIs: queries (evidence: `README.md`)
- Unwrangle client → Retailer APIs: queries (evidence: `README.md`)
- Apify client → Retailer APIs: queries (evidence: `README.md`)
- Scan execution → Usage limits: checks budgets (evidence: `utils/scanner.py`)
- Scan execution → SQLite store: records results
- List schedules → Scan execution: runs scheduled scans (evidence: `README.md`)
- Authentication → User accounts: checks accounts (evidence: `utils/auth.py`)
- Authentication → SQLite store: reads and updates
- User accounts → SQLite store: stores accounts
- Shared lists → SQLite store: stores lists
- Import and export → SQLite store: reads and merges (evidence: `utils/watchlist_io.py`)
- Price charts → SQLite store: reads history
- SQLite store → Schema migrations: initializes schema (evidence: `utils/database.py`)
- API debug tools → SQLite store: reads responses (evidence: `main.py`)
- Provider selection → API debug tools: records responses (evidence: `utils/providers.py`)
- Scan execution → Product details: normalizes products
