DeceptiScan is a premium, AI-powered browser extension and machine learning platform designed to detect fake, AI-generated, and manipulative product reviews on e-commerce sites in real-time. By bridging a React + Plasmo extension frontend with a FastAPI + PyTorch (DeBERTa-v3) inference backend, DeceptiScan calculates an actionable Trust Score, details review patterns, and provides explainable AI insights for safer shopping.
- Intuitive UI: A sleek dark/light theme-adaptive pop-up window built with glassmorphism design principles.
- Trust Score Gauge: Visualizes seller/product reliability using an animated circular gauge.
- Tabbed Analytics:
- Overview: Summary of scraped reviews, product metadata, and final sentiment rating.
- Reviews: Labeled feed of reviews (marked as Genuine, Suspicious, or Highly Fake) with prediction confidence percentages.
- Signals: Breakdowns of warning triggers (such as review count discrepancies or abnormal distributions).
- Settings: Adjustable connection settings (e.g., configuring local/remote server endpoints).
- Deep Scrape: Asynchronously crawls up to 5 paginated pages of reviews directly from Amazon product listings.
- Anti-Detection Jitter: Employs randomized delay intervals (700ms - 1500ms) and cookie-integrated fetch requests to query pages without triggering CAPTCHAs or IP blocks.
- DOM Parsing: Parses raw HTML dynamically without relying on brittle selector dependencies, collecting reviewer details, ratings, titles, and body texts.
- Primary Classifier: Houses a fine-tuned DeBERTa-v3 sequence classification transformer model optimized on over 72,000 labeled review datasets.
- Multi-Core & GPU Acceleration: Automatically routes inference tasks to PyTorch CUDA cores for lightning-fast inference (< 200ms per batch).
- Explainable Trust Score: Weighs classification confidence alongside rating distributions and suspicious reviewer behaviors to output a single, comprehensive percentage.
graph TD
subgraph Browser Extension [Frontend & Scraper]
A[Amazon Product Page] -->|Injects| B(amazon.ts Content Script)
B -->|Background Scrape| C{DOM Parser & Fetcher}
C -->|Reviews JSON| D[popup.tsx Dashboard]
D -->|CORS HTTP POST /analyze| E[FastAPI Gateway]
end
subgraph Backend Server [Inference API]
E -->|Processes Request| F[Analyzer Service]
F -->|Batch Inputs| G[DeBERTa-v3 Transformer Model]
G -->|Predictions & Confidences| H[Trust Score Engine]
H -->|Generates Report| F
F -->|JSON Response| D
end
Deceptiscan/
├── .github/ # GitHub actions pipelines
│ └── workflow/ # CI/CD test automation for backend and extension
├── LICENCE # MIT License
├── README.MD # Project Documentation
├── github_upload_guide.md # Upload & Repository Management Guide
└── extension/ # Chrome Extension Workspace
├── assets/ # Static image resources and extension icon
├── contents/ # Content scripts (Amazon scraper injection)
├── lib/ # Utility scripts & API request handlers
├── popup.tsx # Main dashboard React popup UI code
├── tsconfig.json # TypeScript compilation setup
└── backend/ # FastAPI NLP Inference API
├── app/
│ ├── main.py # FastAPI Entry Point (Uvicorn Gateway)
│ ├── api/routes/ # Endpoint routes (Analyze, Health, Reviews)
│ ├── core/ # Global configurations & constants
│ ├── schemas/ # Pydantic Request & Response models
│ └── services/ # Inference orchestration & Trust Score calculations
├── training/ # Training scripts and evaluation Jupyter Notebooks
├── requirements.txt # Python Dependencies list
└── s.DockerFile # Backend container build instructions
Follow these instructions to install, build, and run the complete DeceptiScan suite locally.
- Node.js (v18 or higher recommended)
- Python 3.10+
- Google Chrome (or any Chromium-based browser)
- Navigate into the extension directory:
cd extension - Install dependencies:
npm install
- Start the Plasmo developer development server:
npm run dev
- Open Google Chrome and go to
chrome://extensions/. - Enable Developer mode using the toggle switch in the top-right corner.
- Click Load unpacked in the top-left and select the directory:
Deceptiscan/extension/build/chrome-mv3-dev - The DeceptiScan icon will now appear in your extension toolbar!
- Navigate to the backend directory:
cd extension/backend - Create and activate a virtual environment:
python -m venv .venv # On Windows (PowerShell/CMD) .venv\Scripts\activate # On macOS/Linux source .venv/bin/activate
- Install the backend Python dependencies:
pip install -r requirements.txt
- Download and Place Model Weights:
Since model weights are not uploaded to GitHub due to size limitations, ensure your fine-tuned model folder
deberta-v3-detectoris placed in:extension/backend/models/deberta-v3-detector/(Ensure it containsmodel.safetensors,config.json,tokenizer.json, etc.) - Start the FastAPI Server:
The server will startup at
python app/main.py
http://localhost:8000. You can test it by visiting the Swagger Docs athttp://localhost:8000/docs.
The model was fine-tuned on a merged, deduplicated, and cleaned corpus of e-commerce reviews:
- Total Labeled Samples: 72,877
- Training Split: 57,325 reviews
- Testing Split: 14,332 reviews
- Primary Architecture:
DeBERTa-v3base sequence classifier
- Baseline XGBoost Accuracy: ~84.2%
- Fine-Tuned DeBERTa-v3 Accuracy: ~96.8%
- Average Batch Inference Latency: ~12ms per review (on CUDA GPU)
Distributed under the MIT License. See LICENCE for details.