# abhaysingh-16/scamshield-ai architecture

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

- Interactive diagram: https://gitdiagram.com/abhaysingh-16/scamshield-ai
- Repository: https://github.com/abhaysingh-16/scamshield-ai

## Overview

ScamShield AI is a browser-based scam-analysis interface. Users submit message text, URLs, combined inputs, or QR-derived text; the client sends these to analysis endpoints and presents risk findings. The controller also checks service health, loads sample cases and scan history, and supports report export and history clearing. The only source excerpt is a partial client controller, so server-side analysis stages and data stores are not represented; uncertain response-to-render wiring is omitted.

Main entry points: [`src/js/app.js`](https://github.com/abhaysingh-16/scamshield-ai/blob/main/src/js/app.js) (Analysis Controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Input and Navigation"]
  node_controls["Analysis Controls<br/>[app.js]"]
  node_qr["QR Extraction<br/>[app.js]"]
end

subgraph group_analysis["Analysis Requests"]
  node_analysis_api{{"Analysis API"}}
  node_health_api{{"Health API"}}
  node_samples_api{{"Sample Cases API"}}
  node_history_api{{"History API"}}
end

subgraph group_results["Results and Records"]
  node_results_view["Results Dashboard<br/>[app.js]"]
  node_report["Report Export<br/>[app.js]"]
  node_history["Scan History<br/>[app.js]"]
end

node_user(("User"))

node_user -->|"submits input"| node_controls
node_controls -->|"uploads image"| node_qr
node_qr -->|"posts extracted text"| node_analysis_api
node_controls -->|"posts analyses"| node_analysis_api
node_controls -->|"checks health"| node_health_api
node_controls -->|"fetches samples"| node_samples_api
node_controls -->|"clears history"| node_history_api
node_history_api -->|"updates records"| node_history
node_user -->|"exports report"| node_report
node_analysis_api -.->|"returns findings"| node_results_view

click node_controls "https://github.com/abhaysingh-16/scamshield-ai/blob/main/src/js/app.js"
click node_qr "https://github.com/abhaysingh-16/scamshield-ai/blob/main/src/js/app.js"
click node_results_view "https://github.com/abhaysingh-16/scamshield-ai/blob/main/src/js/app.js"
click node_report "https://github.com/abhaysingh-16/scamshield-ai/blob/main/src/js/app.js"
click node_history "https://github.com/abhaysingh-16/scamshield-ai/blob/main/src/js/app.js"

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_controls,node_qr,node_user toneBlue
class node_analysis_api,node_health_api,node_samples_api,node_history_api toneAmber
class node_results_view,node_report,node_history toneMint
```

## Components

### Input and Navigation

- [Analysis Controls](https://github.com/abhaysingh-16/scamshield-ai/blob/main/src/js/app.js): `src/js/app.js`
- [QR Extraction](https://github.com/abhaysingh-16/scamshield-ai/blob/main/src/js/app.js): `src/js/app.js`

### Analysis Requests

- **Analysis API**
- **Health API**
- **Sample Cases API**
- **History API**

### Results and Records

- [Results Dashboard](https://github.com/abhaysingh-16/scamshield-ai/blob/main/src/js/app.js): `src/js/app.js`
- [Report Export](https://github.com/abhaysingh-16/scamshield-ai/blob/main/src/js/app.js): `src/js/app.js`
- [Scan History](https://github.com/abhaysingh-16/scamshield-ai/blob/main/src/js/app.js): `src/js/app.js`

### Other components

- **User**

## Connections

- User → Analysis Controls: submits input (evidence: `src/js/app.js`)
- Analysis Controls → QR Extraction: uploads image (evidence: `src/js/app.js`)
- QR Extraction → Analysis API: posts extracted text (evidence: `src/js/app.js`)
- Analysis Controls → Analysis API: posts analyses (evidence: `src/js/app.js`)
- Analysis Controls → Health API: checks health (evidence: `src/js/app.js`)
- Analysis Controls → Sample Cases API: fetches samples (evidence: `src/js/app.js`)
- Analysis Controls → History API: clears history (evidence: `src/js/app.js`)
- History API → Scan History: updates records (evidence: `src/js/app.js`)
- User → Report Export: exports report (evidence: `src/js/app.js`)
- Analysis API → Results Dashboard: returns findings
