# anushreeankola/ai-powered-product-review-analyzer architecture

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

- Interactive diagram: https://gitdiagram.com/anushreeankola/ai-powered-product-review-analyzer
- Repository: https://github.com/anushreeankola/ai-powered-product-review-analyzer

## Overview

Product Review Analyzer is a Streamlit application for analyzing sample or pasted product reviews. Users select analysis features or transformations, view results, compare sample reviews, and can export a report. The app coordinates focused prompt modules, which send requests through a shared Anthropic client. The README documents the comparison and report capabilities; the shown app excerpts do not expose their full implementation, so they remain part of the app node. Links reflect imports and calls visible in the excerpts or SOURCE INDEX.

Main entry points: [`app.py`](https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/app.py) (Review UI, workflow & reports), [`utils/llm_client.py`](https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/utils/llm_client.py) (LLM client), [`prompts/summarize.py`](https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/prompts/summarize.py) (Review summaries), [`prompts/infer.py`](https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/prompts/infer.py) (Review insights)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Review experience"]
  node_app["Review UI, workflow &amp; reports<br/>[app.py]"]
end

subgraph group_prompts["Prompt capabilities"]
  node_summarize["Review summaries<br/>[summarize.py]"]
  node_infer["Review insights<br/>[infer.py]"]
  node_transform["Review transformations<br/>[transform.py]"]
  node_expand["Customer replies<br/>[expand.py]"]
end

subgraph group_runtime["Model runtime"]
  node_client["LLM client<br/>[llm_client.py]"]
end

subgraph group_samples["Sample content"]
  node_samples["Sample reviews<br/>[sample_reviews.py]"]
end

node_user(("Review analyst"))
node_claude["Anthropic Claude API"]

node_user -->|"uses"| node_app
node_app -->|"loads samples"| node_samples
node_app -->|"requests summaries"| node_summarize
node_app -->|"requests insights"| node_infer
node_app -->|"requests transformations"| node_transform
node_app -->|"requests replies"| node_expand
node_summarize -->|"requests completion"| node_client
node_infer -->|"requests completion"| node_client
node_transform -->|"requests completion"| node_client
node_expand -->|"requests completion"| node_client
node_client -->|"calls API"| node_claude

click node_app "https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/app.py"
click node_samples "https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/utils/sample_reviews.py"
click node_summarize "https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/prompts/summarize.py"
click node_infer "https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/prompts/infer.py"
click node_transform "https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/prompts/transform.py"
click node_expand "https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/prompts/expand.py"
click node_client "https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/utils/llm_client.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_user toneBlue
class node_summarize,node_infer,node_transform,node_expand toneAmber
class node_client,node_claude toneMint
class node_samples toneRose
```

## Components

### Review experience

- [Review UI, workflow & reports](https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/app.py): `app.py`

### Prompt capabilities

- [Review summaries](https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/prompts/summarize.py): `prompts/summarize.py`
- [Review insights](https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/prompts/infer.py): `prompts/infer.py`
- [Review transformations](https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/prompts/transform.py): `prompts/transform.py`
- [Customer replies](https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/prompts/expand.py): `prompts/expand.py`

### Model runtime

- [LLM client](https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/utils/llm_client.py): `utils/llm_client.py`

### Sample content

- [Sample reviews](https://github.com/anushreeankola/ai-powered-product-review-analyzer/blob/main/utils/sample_reviews.py): `utils/sample_reviews.py`

### Other components

- **Review analyst**
- **Anthropic Claude API**

## Connections

- Review analyst → Review UI, workflow & reports: uses (evidence: `README.md`)
- Review UI, workflow & reports → Sample reviews: loads samples (evidence: `app.py`)
- Review UI, workflow & reports → Review summaries: requests summaries (evidence: `app.py`)
- Review UI, workflow & reports → Review insights: requests insights (evidence: `app.py`)
- Review UI, workflow & reports → Review transformations: requests transformations (evidence: `app.py`)
- Review UI, workflow & reports → Customer replies: requests replies (evidence: `app.py`)
- Review summaries → LLM client: requests completion (evidence: `prompts/summarize.py`)
- Review insights → LLM client: requests completion (evidence: `prompts/infer.py`)
- Review transformations → LLM client: requests completion (evidence: `prompts/transform.py`)
- Customer replies → LLM client: requests completion (evidence: `prompts/expand.py`)
- LLM client → Anthropic Claude API: calls API (evidence: `utils/llm_client.py`)
