How gshashen/verif-ai works
VerifAI accepts a URL or pasted text and returns sourced, confidence-rated claim verdicts. The main path runs from the React submission through FastAPI extraction, claim generation, evidence search and stance evaluation; Python applies the verdict rule. Results include source evidence and partial-stage errors. The README documents extraction fallbacks and search/evaluation behavior beyond the sampled excerpts; those capabilities are represented, with edges grounded in the README or shown caller references. No database is described.
Main entry points: App.jsx App workflow · main.py FastAPI endpoints · search.py Evidence search · models.py Validated models
Components 23
User interface
- App workflow
frontend/src/App.jsx - Input validation
frontend/src/lib/validate.js - API client
frontend/src/api.js - Submission form
frontend/src/components/LandingForm.jsx - Loading display
frontend/src/components/LoadingStage.jsx - Results summary
frontend/src/components/ResultsView.jsx - Claim details
frontend/src/components/ClaimAccordion.jsx - Disputed sources
frontend/src/components/DisputedTabs.jsx - Evidence sources
frontend/src/components/SourceList.jsx - Verdict badges
frontend/src/components/badges.jsx - Verdict labels
frontend/src/lib/verdicts.js - Error notices
frontend/src/components/Toast.jsx
API orchestration
- FastAPI endpoints
backend/main.py
Verification pipeline
- Text extraction
backend/extractor.py - Claim generation
backend/claims.py - Evidence search
backend/search.py - Trust ranking
backend/tiers.py - Stance and verdict
backend/evaluator.py
Data contracts
- Validated models
backend/models.py
Other components
- User
- Anthropic API
- Serper search
- Source websites
Connections 27
- User → Submission form: submits input
README.md - Submission form → App workflow: submits
frontend/src/App.jsx - App workflow → Input validation: validates input
frontend/src/App.jsx - App workflow → API client: requests verification
frontend/src/App.jsx - App workflow → Loading display: shows progress
frontend/src/App.jsx - App workflow → Results summary: displays result
frontend/src/App.jsx - App workflow → Error notices: shows errors
frontend/src/App.jsx - API client → FastAPI endpoints: POST /verify
frontend/src/api.js - FastAPI endpoints → Text extraction: extracts text
backend/main.py - FastAPI endpoints → Claim generation: extracts claims
backend/main.py - FastAPI endpoints → Evidence search: searches claims
backend/main.py - FastAPI endpoints → Stance and verdict: evaluates sources
backend/main.py - Claim generation → Anthropic API: generates claims
README.md - Evidence search → Serper search: queries web
backend/search.py - Evidence search → Source websites: fetches pages
backend/search.py - Evidence search → Trust ranking: assigns tiers
backend/search.py - Stance and verdict → Anthropic API: labels stances
README.md - FastAPI endpoints → Validated models: validates requests
backend/main.py - Claim generation → Validated models: validates claims
backend/claims.py - Evidence search → Validated models: builds sources
backend/search.py - Stance and verdict → Validated models: returns claim data
backend/evaluator.py - Results summary → Claim details: renders claims
frontend/src/components/ResultsView.jsx - Claim details → Disputed sources: renders disputed views
frontend/src/components/ClaimAccordion.jsx - Claim details → Evidence sources: renders sources
frontend/src/components/ClaimAccordion.jsx - Evidence sources → Verdict badges: renders tier and stance
frontend/src/components/SourceList.jsx - Results summary → Verdict labels: maps verdict labels
frontend/src/components/ResultsView.jsx - Verdict badges → Verdict labels: maps badge labels
frontend/src/components/badges.jsx