How nainar1409-sketch/fact-lens-pro works
Truth Compass is a news-credibility analysis web app. Users submit text, a URL, or a selected file; the main page invokes the Supabase analyze-news function, then displays the returned score, model breakdown, factors, and sources. A separate monitoring page reads monitored-news records and offers scan controls. The README describes broader ML and verification capabilities, but sampled code does not establish their implementation details, so those are represented only where the tree supports a subsystem. Unsampled function internals and scan dispatch are not inferred.
Main entry points: Index.tsx Analysis page · MonitoringDashboard.tsx Monitoring dashboard · ResultsDashboard.tsx Results dashboard · client.ts Supabase client
Components 19
Web application
- App router
src/App.tsx - Analysis page
src/pages/Index.tsx - News input
src/components/NewsInput.tsx - Results dashboard
src/components/ResultsDashboard.tsx - Truth gauge
src/components/TruthGauge.tsx - Model breakdown
src/components/ModelBreakdown.tsx - Key factors
src/components/KeyFactors.tsx - Source verification
src/components/SourceVerification.tsx - Site header
src/components/Header.tsx - Landing hero
src/components/Hero.tsx - How it works
src/components/HowItWorks.tsx - Site footer
src/components/Footer.tsx
News analysis
- Analysis function
supabase/functions/analyze-news/index.ts
News monitoring
- Monitoring dashboard
src/pages/MonitoringDashboard.tsx - Monitored news
- Monitoring function
supabase/functions/monitor-news/index.ts
Supabase integration
- Supabase client
src/integrations/supabase/client.ts - Preview auth storage
src/integrations/supabase/previewAuthStorage.ts
Other components
- News analyst
Connections 22
- News analyst → Analysis page: opens
- App router → Analysis page: routes to
src/App.tsx - App router → Monitoring dashboard: routes to
src/App.tsx - Analysis page → Site header: renders
src/pages/Index.tsx - Analysis page → Landing hero: renders
src/pages/Index.tsx - Analysis page → News input: renders
src/pages/Index.tsx - Analysis page → How it works: renders
src/pages/Index.tsx - Analysis page → Site footer: renders
src/pages/Index.tsx - News input → Analysis page: submits content
src/pages/Index.tsx - Analysis page → Supabase client: invokes function
src/pages/Index.tsx - Analysis page → Analysis function: sends text
src/pages/Index.tsx - Analysis page → Results dashboard: renders result
src/pages/Index.tsx - Results dashboard → Truth gauge: renders
src/components/ResultsDashboard.tsx - Results dashboard → Model breakdown: renders
src/components/ResultsDashboard.tsx - Results dashboard → Key factors: renders
src/components/ResultsDashboard.tsx - Results dashboard → Source verification: renders
src/components/ResultsDashboard.tsx - Monitoring dashboard → Site header: renders
src/pages/MonitoringDashboard.tsx - Monitoring dashboard → Site footer: renders
src/pages/MonitoringDashboard.tsx - Monitoring dashboard → Supabase client: queries records
src/pages/MonitoringDashboard.tsx - Monitoring dashboard → Monitored news: reads
src/pages/MonitoringDashboard.tsx - Supabase client → Preview auth storage: configures auth
src/integrations/supabase/client.ts - Monitoring dashboard → Monitoring function: may dispatch scan