# tusharpawar1241/factchecker architecture

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

- Interactive diagram: https://gitdiagram.com/tusharpawar1241/factchecker
- Repository: https://github.com/tusharpawar1241/factchecker

## Overview

Verifai is a claim-verification app whose main workflow submits a claim (optionally with media), researches it through a server-side endpoint, streams progress and a verdict to the interface, and presents evidence with an exportable PDF report. The README documents the backend’s search, content-retrieval, and LLM stages and its provider integrations; the endpoint source was not excerpted, so those internal relationships are documented rather than independently verified. The graph also includes the app’s localization and setup/theme capabilities.

Main entry points: [`components/Dashboard.tsx`](https://github.com/tusharpawar1241/factchecker/blob/main/components/Dashboard.tsx) (Claim Dashboard), [`api/verify.js`](https://github.com/tusharpawar1241/factchecker/blob/main/api/verify.js) (Verify Endpoint), [`services/researcher.ts`](https://github.com/tusharpawar1241/factchecker/blob/main/services/researcher.ts) (Research Client), [`components/ApiSetupGuide.tsx`](https://github.com/tusharpawar1241/factchecker/blob/main/components/ApiSetupGuide.tsx) (API Setup Guide)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Verification Interface"]
  node_entry["React Entry<br/>[index.tsx]"]
  node_app["App Shell<br/>[App.tsx]"]
  node_dashboard["Claim Dashboard<br/>[Dashboard.tsx]"]
  node_research["Research Client<br/>[researcher.ts]"]
end

subgraph group_backend["Research Backend"]
  node_verify["Verify Endpoint<br/>[verify.js]"]
  node_search["Web Search<br/>[verify.js]"]
  node_retrieval["Page Retrieval<br/>[verify.js]"]
  node_analysis["Verdict Analysis<br/>[verify.js]"]
end

subgraph group_results["Evidence &amp; Reports"]
  node_logs["Research Logs<br/>[ResearchLogs.tsx]"]
  node_verdict["Verdict View<br/>[VerdictCard.tsx]"]
  node_pdf["PDF Export<br/>[VerdictCard.tsx]"]
end

subgraph group_experience["App Experience"]
  node_translations["Localization<br/>[i18n.ts]"]
  node_language["Language Toggle<br/>[LanguageToggle.tsx]"]
  node_setup["API Setup Guide<br/>[ApiSetupGuide.tsx]"]
  node_theme["Theme Toggle<br/>[ThemeToggle.tsx]"]
end

node_user(("User"))
node_tavily{{"Tavily"}}
node_jina{{"Jina"}}
node_groq{{"Groq LLM"}}

node_user -->|"submits claim"| node_dashboard
node_entry -->|"mounts"| node_app
node_app -->|"renders"| node_dashboard
node_dashboard -->|"starts research"| node_research
node_research -->|"POSTs claim"| node_verify
node_verify -.->|"orchestrates"| node_search
node_verify -.->|"orchestrates"| node_retrieval
node_verify -.->|"orchestrates"| node_analysis
node_search -.->|"searches sources"| node_tavily
node_retrieval -.->|"retrieves content"| node_jina
node_analysis -.->|"evaluates evidence"| node_groq
node_verify -.->|"streams results"| node_research
node_research -->|"returns verdict"| node_dashboard
node_dashboard -->|"passes progress"| node_logs
node_dashboard -->|"renders result"| node_verdict
node_verdict -->|"exports report"| node_pdf
node_dashboard -->|"renders toggle"| node_language
node_language -->|"changes language"| node_translations
node_setup -.->|"configures access"| node_research
node_setup -->|"renders toggle"| node_theme

click node_entry "https://github.com/tusharpawar1241/factchecker/blob/main/index.tsx"
click node_app "https://github.com/tusharpawar1241/factchecker/blob/main/App.tsx"
click node_dashboard "https://github.com/tusharpawar1241/factchecker/blob/main/components/Dashboard.tsx"
click node_research "https://github.com/tusharpawar1241/factchecker/blob/main/services/researcher.ts"
click node_verify "https://github.com/tusharpawar1241/factchecker/blob/main/api/verify.js"
click node_search "https://github.com/tusharpawar1241/factchecker/blob/main/api/verify.js"
click node_retrieval "https://github.com/tusharpawar1241/factchecker/blob/main/api/verify.js"
click node_analysis "https://github.com/tusharpawar1241/factchecker/blob/main/api/verify.js"
click node_logs "https://github.com/tusharpawar1241/factchecker/blob/main/components/ResearchLogs.tsx"
click node_verdict "https://github.com/tusharpawar1241/factchecker/blob/main/components/VerdictCard.tsx"
click node_pdf "https://github.com/tusharpawar1241/factchecker/blob/main/components/VerdictCard.tsx"
click node_translations "https://github.com/tusharpawar1241/factchecker/blob/main/i18n.ts"
click node_language "https://github.com/tusharpawar1241/factchecker/blob/main/components/LanguageToggle.tsx"
click node_setup "https://github.com/tusharpawar1241/factchecker/blob/main/components/ApiSetupGuide.tsx"
click node_theme "https://github.com/tusharpawar1241/factchecker/blob/main/components/ThemeToggle.tsx"

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_entry,node_app,node_dashboard,node_research,node_user toneBlue
class node_verify,node_search,node_retrieval,node_analysis toneAmber
class node_logs,node_verdict,node_pdf toneMint
class node_translations,node_language,node_setup,node_theme toneRose
class node_tavily,node_jina,node_groq toneIndigo
```

## Components

### Verification Interface

- [React Entry](https://github.com/tusharpawar1241/factchecker/blob/main/index.tsx): `index.tsx`
- [App Shell](https://github.com/tusharpawar1241/factchecker/blob/main/App.tsx): `App.tsx`
- [Claim Dashboard](https://github.com/tusharpawar1241/factchecker/blob/main/components/Dashboard.tsx): `components/Dashboard.tsx`
- [Research Client](https://github.com/tusharpawar1241/factchecker/blob/main/services/researcher.ts): `services/researcher.ts`

### Research Backend

- [Verify Endpoint](https://github.com/tusharpawar1241/factchecker/blob/main/api/verify.js): `api/verify.js`
- [Web Search](https://github.com/tusharpawar1241/factchecker/blob/main/api/verify.js): `api/verify.js`
- [Page Retrieval](https://github.com/tusharpawar1241/factchecker/blob/main/api/verify.js): `api/verify.js`
- [Verdict Analysis](https://github.com/tusharpawar1241/factchecker/blob/main/api/verify.js): `api/verify.js`

### Evidence & Reports

- [Research Logs](https://github.com/tusharpawar1241/factchecker/blob/main/components/ResearchLogs.tsx): `components/ResearchLogs.tsx`
- [Verdict View](https://github.com/tusharpawar1241/factchecker/blob/main/components/VerdictCard.tsx): `components/VerdictCard.tsx`
- [PDF Export](https://github.com/tusharpawar1241/factchecker/blob/main/components/VerdictCard.tsx): `components/VerdictCard.tsx`

### App Experience

- [Localization](https://github.com/tusharpawar1241/factchecker/blob/main/i18n.ts): `i18n.ts`
- [Language Toggle](https://github.com/tusharpawar1241/factchecker/blob/main/components/LanguageToggle.tsx): `components/LanguageToggle.tsx`
- [API Setup Guide](https://github.com/tusharpawar1241/factchecker/blob/main/components/ApiSetupGuide.tsx): `components/ApiSetupGuide.tsx`
- [Theme Toggle](https://github.com/tusharpawar1241/factchecker/blob/main/components/ThemeToggle.tsx): `components/ThemeToggle.tsx`

### Other components

- **User**
- **Tavily**
- **Jina**
- **Groq LLM**

## Connections

- User → Claim Dashboard: submits claim (evidence: `README.md`)
- React Entry → App Shell: mounts (evidence: `index.tsx`)
- App Shell → Claim Dashboard: renders (evidence: `App.tsx`)
- Claim Dashboard → Research Client: starts research (evidence: `components/Dashboard.tsx`)
- Research Client → Verify Endpoint: POSTs claim (evidence: `services/researcher.ts`)
- Verify Endpoint → Web Search: orchestrates (evidence: `README.md`)
- Verify Endpoint → Page Retrieval: orchestrates (evidence: `README.md`)
- Verify Endpoint → Verdict Analysis: orchestrates (evidence: `README.md`)
- Web Search → Tavily: searches sources (evidence: `README.md`)
- Page Retrieval → Jina: retrieves content (evidence: `README.md`)
- Verdict Analysis → Groq LLM: evaluates evidence (evidence: `README.md`)
- Verify Endpoint → Research Client: streams results (evidence: `README.md`)
- Research Client → Claim Dashboard: returns verdict (evidence: `services/researcher.ts`)
- Claim Dashboard → Research Logs: passes progress (evidence: `components/Dashboard.tsx`)
- Claim Dashboard → Verdict View: renders result (evidence: `components/Dashboard.tsx`)
- Verdict View → PDF Export: exports report (evidence: `components/VerdictCard.tsx`)
- Claim Dashboard → Language Toggle: renders toggle (evidence: `components/Dashboard.tsx`)
- Language Toggle → Localization: changes language (evidence: `components/LanguageToggle.tsx`)
- API Setup Guide → Research Client: configures access (evidence: `components/ApiSetupGuide.tsx`)
- API Setup Guide → Theme Toggle: renders toggle (evidence: `components/ApiSetupGuide.tsx`)
