# tanishkraj2005/flipkart-fake-review-detection architecture

> Architecture diagram of the GitHub repository tanishkraj2005/flipkart-fake-review-detection, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tanishkraj2005/flipkart-fake-review-detection
- Repository: https://github.com/tanishkraj2005/flipkart-fake-review-detection

## Overview

This is a Flipkart review-fraud analytics product: a batch pipeline cleans reviews, engineers sentiment and fraud signals, assigns rule-based labels, trains an ML comparison model, and exports analyzed data. Users then explore the results in a Streamlit dashboard or Power BI, and can analyze an individual summary in the app. Product-level fraud profiles and exact-duplicate reporting are additional analytical capabilities. The app excerpt is partial, and the Power BI implementation is not in the tree, so those links reflect only documented behavior and visible file paths.

Main entry points: [`main.py`](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/main.py) (Batch Pipeline), [`app/app.py`](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/app/app.py) (Streamlit App), [`src/feature_engineering.py`](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/feature_engineering.py) (Feature Engineering), [`Data/.gitkeep`](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/Data/.gitkeep) (Processed Reviews)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["Batch Analysis"]
  node_pipeline["Batch Pipeline<br/>[main.py]"]
end

subgraph group_analytics["Detection Analytics"]
  node_cleaning["Text Cleaning<br/>[clean_text.py]"]
  node_features["Feature Engineering"]
  node_flags["Fraud Signals<br/>[flags.py]"]
  node_sentiment["Sentiment Analysis<br/>[sentiment.py]"]
  node_detector["Rule Classifier<br/>[fake_detector.py]"]
  node_ml["ML Classifier<br/>[ml_model.py]"]
  node_duplicates["Exact Duplicates"]
  node_profiles["Product Profiles"]
end

subgraph group_outputs["Review Interfaces"]
  node_processed[("Processed Reviews<br/>[.gitkeep]")]
  node_powerbi_data["Power BI Export<br/>[main.py]"]
  node_app["Streamlit App<br/>[app.py]"]
end

node_analyst(("Dataset Provider"))
node_raw_csv["Raw Reviews<br/>[.gitkeep]"]
node_buyer(("App User"))
node_powerbi["Power BI"]

node_analyst -->|"provides reviews"| node_raw_csv
node_raw_csv -->|"loads data"| node_pipeline
node_pipeline -->|"cleans text"| node_cleaning
node_pipeline -->|"builds features"| node_features
node_features -->|"computes signals"| node_flags
node_features -->|"scores sentiment"| node_sentiment
node_pipeline -->|"labels reviews"| node_detector
node_pipeline -->|"trains and predicts"| node_ml
node_pipeline -->|"tags duplicates"| node_duplicates
node_pipeline -->|"writes results"| node_processed
node_pipeline -->|"exports data"| node_powerbi_data
node_processed -->|"loads results"| node_app
node_buyer -->|"explores and analyzes"| node_app
node_app -->|"cleans input"| node_cleaning
node_app -->|"checks signals"| node_flags
node_app -->|"scores input"| node_sentiment
node_app -->|"calculates probability"| node_detector
node_app -->|"builds product profile"| node_profiles
node_powerbi_data -.->|"feeds reporting"| node_powerbi

click node_raw_csv "https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/Data/.gitkeep"
click node_pipeline "https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/main.py"
click node_cleaning "https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/clean_text.py"
click node_features "https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/feature_engineering.py"
click node_flags "https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/flags.py"
click node_sentiment "https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/sentiment.py"
click node_detector "https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/fake_detector.py"
click node_ml "https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/ml_model.py"
click node_duplicates "https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/duplicate_detection.py"
click node_profiles "https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/reviewer_detection.py"
click node_processed "https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/Data/.gitkeep"
click node_powerbi_data "https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/main.py"
click node_app "https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/app/app.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_pipeline,node_raw_csv,node_buyer toneBlue
class node_cleaning,node_features,node_flags,node_sentiment,node_detector,node_ml,node_duplicates,node_profiles toneAmber
class node_processed,node_powerbi_data,node_app toneMint
class node_analyst,node_powerbi toneIndigo
```

## Components

### Batch Analysis

- [Batch Pipeline](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/main.py): `main.py`

### Detection Analytics

- [Text Cleaning](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/clean_text.py): `src/clean_text.py`
- [Feature Engineering](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/feature_engineering.py): `src/feature_engineering.py`
- [Fraud Signals](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/flags.py): `src/flags.py`
- [Sentiment Analysis](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/sentiment.py): `src/sentiment.py`
- [Rule Classifier](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/fake_detector.py): `src/fake_detector.py`
- [ML Classifier](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/ml_model.py): `src/ml_model.py`
- [Exact Duplicates](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/duplicate_detection.py): `src/duplicate_detection.py`
- [Product Profiles](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/src/reviewer_detection.py): `src/reviewer_detection.py`

### Review Interfaces

- [Processed Reviews](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/Data/.gitkeep): `Data/.gitkeep`
- [Power BI Export](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/main.py): `main.py`
- [Streamlit App](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/app/app.py): `app/app.py`

### Other components

- **Dataset Provider**
- [Raw Reviews](https://github.com/tanishkraj2005/flipkart-fake-review-detection/blob/main/Data/.gitkeep): `Data/.gitkeep`
- **App User**
- **Power BI**

## Connections

- Dataset Provider → Raw Reviews: provides reviews
- Raw Reviews → Batch Pipeline: loads data
- Batch Pipeline → Text Cleaning: cleans text
- Batch Pipeline → Feature Engineering: builds features
- Feature Engineering → Fraud Signals: computes signals
- Feature Engineering → Sentiment Analysis: scores sentiment
- Batch Pipeline → Rule Classifier: labels reviews
- Batch Pipeline → ML Classifier: trains and predicts
- Batch Pipeline → Exact Duplicates: tags duplicates
- Batch Pipeline → Processed Reviews: writes results
- Batch Pipeline → Power BI Export: exports data
- Processed Reviews → Streamlit App: loads results
- App User → Streamlit App: explores and analyzes
- Streamlit App → Text Cleaning: cleans input
- Streamlit App → Fraud Signals: checks signals
- Streamlit App → Sentiment Analysis: scores input
- Streamlit App → Rule Classifier: calculates probability
- Streamlit App → Product Profiles: builds product profile
- Power BI Export → Power BI: feeds reporting
