How kais-aljammal/truthnet works
TruthNet accepts a claim and returns a sourced, confidence-scored verdict. The main workflow passes through source gathering, parallel prosecution and defense, and final judgment; the API can stream progress and results to the React app. Separate branches provide account access, quotas, billing, and saved-check history. The README documents the agent and provider capabilities; sampled excerpts do not show all agent internals or every route implementation, so those links are limited to documented behavior.
Main entry points: main.py HTTP API · app.jsx Fact-check UI · database.py Application database · router.jsx Page router
Components 19
Web experience
- Fact-check UI
frontend/app.jsx - Page router
frontend/router.jsx - Billing page
frontend/billing.jsx - History page
frontend/history.jsx
Fact-check pipeline
- HTTP API
backend/main.py - Pipeline orchestration
backend/pipeline.py - Four AI agents
backend/agents.py
Accounts and usage
- Authentication routes
backend/auth_routes.py - Password utilities
backend/auth_utils.py - Quota and history service
backend/quota_service.py - Tier definitions
backend/tiers.py - Rate limiting
backend/rate_limit.py - Application database
backend/database.py
Billing
- Billing routes
backend/billing_routes.py - Stripe webhook handler
backend/stripe_webhooks.py
Other components
- Claim submitter
- Google Search and Fact Check
- Gemini provider
- Stripe
Connections 29
- Claim submitter → Fact-check UI: submits claim
- Fact-check UI → HTTP API: posts claim
- HTTP API → Authentication routes: checks session
- HTTP API → Rate limiting: checks rate
- HTTP API → Quota and history service: checks quota
- HTTP API → Pipeline orchestration: runs analysis
- Pipeline orchestration → Four AI agents: invokes stages
- Four AI agents → Gemini provider: requests generation
- Four AI agents → Google Search and Fact Check: grounds research
- Pipeline orchestration → HTTP API: streams progress and verdict
- HTTP API → Fact-check UI: sends SSE
- HTTP API → Quota and history service: records successful check
- Fact-check UI → HTTP API: refreshes quota
- Page router → Fact-check UI: renders checker
- Page router → Billing page: renders billing
- Page router → History page: renders history
- Page router → Authentication routes: loads session
- Authentication routes → Password utilities: hashes and verifies
- Authentication routes → Application database: reads and writes users
- HTTP API → Application database: reads and writes checks
- Quota and history service → Application database: reads and updates usage
- Quota and history service → Tier definitions: gets tier limits
- Billing page → Billing routes: requests billing actions
- Billing routes → Stripe: creates checkout or portal
- HTTP API → Stripe webhook handler: dispatches webhook
- Stripe webhook handler → Stripe: verifies event
- Stripe webhook handler → Application database: updates subscriptions
- Billing routes → Application database: reads and updates billing
- History page → HTTP API: loads check history