# chikkudunithin/content-verification-system architecture

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

- Interactive diagram: https://gitdiagram.com/chikkudunithin/content-verification-system
- Repository: https://github.com/chikkudunithin/content-verification-system

## Overview

VeriTube accepts a YouTube URL, retrieves its transcript, discovers and refines candidate claims, gathers web evidence, verifies claims, scores and summarizes the result, then stores it and presents it with history and export features. The graph preserves the documented agent/tool capability separately; the sampled pipeline excerpt does not show it being invoked. Edges reflect excerpted calls, SOURCE INDEX references, or README statements; unsampled frontend and backend behavior is represented only where documented.

Main entry points: [`backend/pipeline/verificationPipeline.js`](https://github.com/chikkudunithin/content-verification-system/blob/main/backend/pipeline/verificationPipeline.js) (Verification orchestrator), [`frontend/src/App.jsx`](https://github.com/chikkudunithin/content-verification-system/blob/main/frontend/src/App.jsx) (App state and requests), [`backend/controllers/analyzeController.js`](https://github.com/chikkudunithin/content-verification-system/blob/main/backend/controllers/analyzeController.js) (Analysis and history routes), [`backend/langchain/chains.js`](https://github.com/chikkudunithin/content-verification-system/blob/main/backend/langchain/chains.js) (Refinement verification summary)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web interface"]
  node_app["App state and requests<br/>[App.jsx]"]
  node_url_form["URL input<br/>[UrlInput.jsx]"]
  node_loading["Loading view<br/>[LoadingScreen.jsx]"]
  node_results["Results and PDF<br/>[ResultsPanel.jsx]"]
  node_claim_card["Claim card<br/>[ClaimCard.jsx]"]
  node_history_ui["History panel<br/>[HistoryPanel.jsx]"]
end

subgraph group_http["HTTP application"]
  node_server["Express server<br/>[server.js]"]
  node_controller["Analysis and history routes"]
end

subgraph group_workflow["Verification workflow"]
  node_pipeline["Verification orchestrator"]
  node_extractor["Heuristic claim discovery<br/>[claimExtractor.js]"]
  node_transcript["Transcript retrieval"]
  node_scoring["Credibility scoring<br/>[scoring.js]"]
end

subgraph group_ai["LLM and evidence"]
  node_chains["Refinement verification summary<br/>[chains.js]"]
  node_schemas["Structured output schemas<br/>[schemas.js]"]
  node_provider["Model provider<br/>[modelProvider.js]"]
  node_scraper["Evidence search<br/>[scrapingService.js]"]
  node_agent["Tool-using verification agent"]
  node_tools["Agent tools<br/>[tools.js]"]
end

subgraph group_persistence["Stored analyses"]
  node_analysis_store[("MongoDB analyses<br/>[Analysis.js]")]
end

node_viewer(("Video viewer"))
node_youtube["YouTube transcripts"]
node_web_search["DuckDuckGo and grounded search"]
node_llm(("Configured chat model"))

node_viewer -->|"submits URL"| node_url_form
node_app -->|"renders"| node_url_form
node_app -->|"shows while waiting"| node_loading
node_app -->|"renders results"| node_results
node_results -->|"renders claims"| node_claim_card
node_app -->|"opens history"| node_history_ui
node_app -->|"requests analysis and history"| node_controller
node_server -->|"mounts API routes"| node_controller
node_controller -->|"runs analysis"| node_pipeline
node_pipeline -->|"fetches transcript"| node_transcript
node_transcript -->|"retrieves captions"| node_youtube
node_pipeline -->|"finds candidates"| node_extractor
node_pipeline -->|"refines verifies summarizes"| node_chains
node_pipeline -->|"fetches evidence"| node_scraper
node_scraper -->|"searches web"| node_web_search
node_pipeline -->|"computes score"| node_scoring
node_chains -->|"validates outputs"| node_schemas
node_chains -->|"gets chat model"| node_provider
node_provider -->|"calls configured model"| node_llm
node_controller -->|"creates and queries"| node_analysis_store
node_agent -->|"uses tools"| node_tools
node_tools -->|"searches evidence"| node_scraper
node_tools -->|"fetches transcript"| node_transcript

click node_app "https://github.com/chikkudunithin/content-verification-system/blob/main/frontend/src/App.jsx"
click node_url_form "https://github.com/chikkudunithin/content-verification-system/blob/main/frontend/src/components/UrlInput.jsx"
click node_loading "https://github.com/chikkudunithin/content-verification-system/blob/main/frontend/src/components/LoadingScreen.jsx"
click node_results "https://github.com/chikkudunithin/content-verification-system/blob/main/frontend/src/components/ResultsPanel.jsx"
click node_claim_card "https://github.com/chikkudunithin/content-verification-system/blob/main/frontend/src/components/ClaimCard.jsx"
click node_history_ui "https://github.com/chikkudunithin/content-verification-system/blob/main/frontend/src/components/HistoryPanel.jsx"
click node_server "https://github.com/chikkudunithin/content-verification-system/blob/main/backend/server.js"
click node_controller "https://github.com/chikkudunithin/content-verification-system/blob/main/backend/controllers/analyzeController.js"
click node_pipeline "https://github.com/chikkudunithin/content-verification-system/blob/main/backend/pipeline/verificationPipeline.js"
click node_extractor "https://github.com/chikkudunithin/content-verification-system/blob/main/backend/pipeline/claimExtractor.js"
click node_transcript "https://github.com/chikkudunithin/content-verification-system/blob/main/backend/services/transcriptService.js"
click node_scoring "https://github.com/chikkudunithin/content-verification-system/blob/main/backend/scoring/scoring.js"
click node_chains "https://github.com/chikkudunithin/content-verification-system/blob/main/backend/langchain/chains.js"
click node_schemas "https://github.com/chikkudunithin/content-verification-system/blob/main/backend/langchain/schemas.js"
click node_provider "https://github.com/chikkudunithin/content-verification-system/blob/main/backend/langchain/modelProvider.js"
click node_scraper "https://github.com/chikkudunithin/content-verification-system/blob/main/backend/services/scrapingService.js"
click node_agent "https://github.com/chikkudunithin/content-verification-system/blob/main/backend/langchain/verificationAgent.js"
click node_tools "https://github.com/chikkudunithin/content-verification-system/blob/main/backend/langchain/tools.js"
click node_analysis_store "https://github.com/chikkudunithin/content-verification-system/blob/main/backend/models/Analysis.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_app,node_url_form,node_loading,node_results,node_claim_card,node_history_ui,node_viewer toneBlue
class node_server,node_controller toneAmber
class node_pipeline,node_extractor,node_transcript,node_scoring toneMint
class node_chains,node_schemas,node_provider,node_scraper,node_agent,node_tools toneRose
class node_analysis_store,node_youtube,node_web_search,node_llm toneIndigo
```

## Components

### Web interface

- [App state and requests](https://github.com/chikkudunithin/content-verification-system/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [URL input](https://github.com/chikkudunithin/content-verification-system/blob/main/frontend/src/components/UrlInput.jsx): `frontend/src/components/UrlInput.jsx`
- [Loading view](https://github.com/chikkudunithin/content-verification-system/blob/main/frontend/src/components/LoadingScreen.jsx): `frontend/src/components/LoadingScreen.jsx`
- [Results and PDF](https://github.com/chikkudunithin/content-verification-system/blob/main/frontend/src/components/ResultsPanel.jsx): `frontend/src/components/ResultsPanel.jsx`
- [Claim card](https://github.com/chikkudunithin/content-verification-system/blob/main/frontend/src/components/ClaimCard.jsx): `frontend/src/components/ClaimCard.jsx`
- [History panel](https://github.com/chikkudunithin/content-verification-system/blob/main/frontend/src/components/HistoryPanel.jsx): `frontend/src/components/HistoryPanel.jsx`

### HTTP application

- [Express server](https://github.com/chikkudunithin/content-verification-system/blob/main/backend/server.js): `backend/server.js`
- [Analysis and history routes](https://github.com/chikkudunithin/content-verification-system/blob/main/backend/controllers/analyzeController.js): `backend/controllers/analyzeController.js`

### Verification workflow

- [Verification orchestrator](https://github.com/chikkudunithin/content-verification-system/blob/main/backend/pipeline/verificationPipeline.js): `backend/pipeline/verificationPipeline.js`
- [Heuristic claim discovery](https://github.com/chikkudunithin/content-verification-system/blob/main/backend/pipeline/claimExtractor.js): `backend/pipeline/claimExtractor.js`
- [Transcript retrieval](https://github.com/chikkudunithin/content-verification-system/blob/main/backend/services/transcriptService.js): `backend/services/transcriptService.js`
- [Credibility scoring](https://github.com/chikkudunithin/content-verification-system/blob/main/backend/scoring/scoring.js): `backend/scoring/scoring.js`

### LLM and evidence

- [Refinement verification summary](https://github.com/chikkudunithin/content-verification-system/blob/main/backend/langchain/chains.js): `backend/langchain/chains.js`
- [Structured output schemas](https://github.com/chikkudunithin/content-verification-system/blob/main/backend/langchain/schemas.js): `backend/langchain/schemas.js`
- [Model provider](https://github.com/chikkudunithin/content-verification-system/blob/main/backend/langchain/modelProvider.js): `backend/langchain/modelProvider.js`
- [Evidence search](https://github.com/chikkudunithin/content-verification-system/blob/main/backend/services/scrapingService.js): `backend/services/scrapingService.js`
- [Tool-using verification agent](https://github.com/chikkudunithin/content-verification-system/blob/main/backend/langchain/verificationAgent.js): `backend/langchain/verificationAgent.js`
- [Agent tools](https://github.com/chikkudunithin/content-verification-system/blob/main/backend/langchain/tools.js): `backend/langchain/tools.js`

### Stored analyses

- [MongoDB analyses](https://github.com/chikkudunithin/content-verification-system/blob/main/backend/models/Analysis.js): `backend/models/Analysis.js`

### Other components

- **Video viewer**
- **YouTube transcripts**
- **DuckDuckGo and grounded search**
- **Configured chat model**

## Connections

- Video viewer → URL input: submits URL (evidence: `README.md`)
- App state and requests → URL input: renders (evidence: `frontend/src/App.jsx`)
- App state and requests → Loading view: shows while waiting (evidence: `frontend/src/App.jsx`)
- App state and requests → Results and PDF: renders results (evidence: `frontend/src/App.jsx`)
- Results and PDF → Claim card: renders claims (evidence: `frontend/src/components/ResultsPanel.jsx`)
- App state and requests → History panel: opens history (evidence: `frontend/src/App.jsx`)
- App state and requests → Analysis and history routes: requests analysis and history (evidence: `frontend/src/App.jsx`)
- Express server → Analysis and history routes: mounts API routes (evidence: `backend/server.js`)
- Analysis and history routes → Verification orchestrator: runs analysis (evidence: `backend/controllers/analyzeController.js`)
- Verification orchestrator → Transcript retrieval: fetches transcript (evidence: `backend/pipeline/verificationPipeline.js`)
- Transcript retrieval → YouTube transcripts: retrieves captions (evidence: `README.md`)
- Verification orchestrator → Heuristic claim discovery: finds candidates (evidence: `backend/pipeline/verificationPipeline.js`)
- Verification orchestrator → Refinement verification summary: refines verifies summarizes (evidence: `backend/pipeline/verificationPipeline.js`)
- Verification orchestrator → Evidence search: fetches evidence (evidence: `backend/pipeline/verificationPipeline.js`)
- Evidence search → DuckDuckGo and grounded search: searches web (evidence: `README.md`)
- Verification orchestrator → Credibility scoring: computes score (evidence: `backend/pipeline/verificationPipeline.js`)
- Refinement verification summary → Structured output schemas: validates outputs (evidence: `backend/langchain/chains.js`)
- Refinement verification summary → Model provider: gets chat model (evidence: `backend/langchain/chains.js`)
- Model provider → Configured chat model: calls configured model (evidence: `README.md`)
- Analysis and history routes → MongoDB analyses: creates and queries (evidence: `backend/controllers/analyzeController.js`)
- Tool-using verification agent → Agent tools: uses tools (evidence: `backend/langchain/verificationAgent.js`)
- Agent tools → Evidence search: searches evidence (evidence: `backend/langchain/tools.js`)
- Agent tools → Transcript retrieval: fetches transcript (evidence: `backend/langchain/tools.js`)
