# husainmade/pricebook architecture

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

- Interactive diagram: https://gitdiagram.com/husainmade/pricebook
- Repository: https://github.com/husainmade/pricebook

## Overview

Price Book is an offline-first Android product and price catalogue. Its main workflow is to enter or import product pricing, organize it by category and unit, store it locally, then search, sort, and review current or historical prices. The README also documents photo-based OCR and optional AI extraction, plus insights, recovery, and export. No implementation files or source excerpts were provided, so paths are null and the graph shows only relationships the README explicitly describes.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalogue["Product Catalogue"]
  node_categories["Categories and Units"]
  node_products["Product Management"]
  node_prices[("Product Prices")]
  node_history["Price History"]
  node_search["Search and Sort"]
end

subgraph group_capture["Pricing Capture"]
  node_manual["Manual Entry"]
  node_photo["Camera and Gallery"]
  node_ocr["On-device OCR"]
  node_ai["AI Bill Extraction"]
end

subgraph group_review["Review and Insights"]
  node_reviewproducts["Review Products"]
  node_similar["Similar Items"]
  node_insights["Price Insights"]
  node_recycle["Recycle Bin"]
end

subgraph group_access["Access and Backup"]
  node_importexport["Excel Import and Export"]
  node_widgets["Widgets and Shortcuts"]
  node_viewmode["View Only Mode"]
end

node_user(("User"))
node_app["Price Book"]
node_providers["AI Providers"]

node_user -->|"enters prices"| node_manual
node_manual -->|"adds products"| node_products
node_user -->|"organizes products"| node_categories
node_products -->|"stores pricing"| node_prices
node_user -->|"searches and sorts"| node_search
node_search -->|"finds prices"| node_prices
node_user -->|"selects image"| node_photo
node_photo -->|"processes locally"| node_ocr
node_ocr -->|"shows detections"| node_reviewproducts
node_photo -->|"submits confirmed crop"| node_ai
node_ai -->|"requests extraction"| node_providers
node_ai -->|"provides extracted data"| node_reviewproducts
node_reviewproducts -->|"adds reviewed products"| node_products
node_products -->|"tracks price changes"| node_history
node_user -->|"checks duplicates"| node_similar
node_user -->|"views insights"| node_insights
node_user -->|"restores or removes"| node_recycle
node_user -->|"imports or exports"| node_importexport
node_user -->|"opens quick actions"| node_widgets
node_user -->|"browses read-only"| node_viewmode

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_categories,node_products,node_prices,node_history,node_search,node_user toneBlue
class node_manual,node_photo,node_ocr,node_ai toneAmber
class node_reviewproducts,node_similar,node_insights,node_recycle toneMint
class node_importexport,node_widgets,node_viewmode toneRose
class node_app,node_providers toneIndigo
```

## Components

### Product Catalogue

- **Categories and Units**
- **Product Management**
- **Product Prices**
- **Price History**
- **Search and Sort**

### Pricing Capture

- **Manual Entry**
- **Camera and Gallery**
- **On-device OCR**
- **AI Bill Extraction**

### Review and Insights

- **Review Products**
- **Similar Items**
- **Price Insights**
- **Recycle Bin**

### Access and Backup

- **Excel Import and Export**
- **Widgets and Shortcuts**
- **View Only Mode**

### Other components

- **User**
- **Price Book**
- **AI Providers**

## Connections

- User → Manual Entry: enters prices (evidence: `README.md`)
- Manual Entry → Product Management: adds products (evidence: `README.md`)
- User → Categories and Units: organizes products (evidence: `README.md`)
- Product Management → Product Prices: stores pricing (evidence: `README.md`)
- User → Search and Sort: searches and sorts (evidence: `README.md`)
- Search and Sort → Product Prices: finds prices (evidence: `README.md`)
- User → Camera and Gallery: selects image (evidence: `README.md`)
- Camera and Gallery → On-device OCR: processes locally (evidence: `README.md`)
- On-device OCR → Review Products: shows detections (evidence: `README.md`)
- Camera and Gallery → AI Bill Extraction: submits confirmed crop (evidence: `README.md`)
- AI Bill Extraction → AI Providers: requests extraction (evidence: `README.md`)
- AI Bill Extraction → Review Products: provides extracted data (evidence: `README.md`)
- Review Products → Product Management: adds reviewed products (evidence: `README.md`)
- Product Management → Price History: tracks price changes (evidence: `README.md`)
- User → Similar Items: checks duplicates (evidence: `README.md`)
- User → Price Insights: views insights (evidence: `README.md`)
- User → Recycle Bin: restores or removes (evidence: `README.md`)
- User → Excel Import and Export: imports or exports (evidence: `README.md`)
- User → Widgets and Shortcuts: opens quick actions (evidence: `README.md`)
- User → View Only Mode: browses read-only (evidence: `README.md`)
