Skip to main content
TruthTracer is a comprehensive misinformation detection platform that leverages Perplexity’s Sonar API to provide multi-layered claim analysis. The platform combines fact-checking, trust chain tracing, and Socratic reasoning to deliver accurate, evidence-based verification results with confidence scores and detailed sourcing.

Demo

Features

  • Multi-method Analysis combining fact-checking, trust chain analysis, and Socratic reasoning
  • AI-Powered Verification using Perplexity’s Sonar, Sonar Deep Research, and Sonar Reasoning Pro models
  • Real-time Processing with parallel execution of multiple analysis methods
  • Evidence-based Results providing sources, confidence scores, and detailed reasoning
  • Clean Architecture with NestJS backend and React frontend
  • Production-Ready with Docker deployment, comprehensive testing, and API documentation
  • Configurable Confidence Scoring with customizable weights and thresholds

Prerequisites

  • Node.js 18+ and npm
  • Perplexity API key (Sonar models access)
  • Docker (optional for deployment)
  • Git for repository cloning

Installation

Configuration

Create .env file in the backend directory:

Usage

  1. Start Backend:
  1. Start Frontend:
  1. Access Application: Open http://localhost:3000 in your browser
  2. Analyze Claims:
    • Enter a claim in the text area
    • Click “Analyze Claim” to run fact-checking, trust chain analysis, and Socratic reasoning
    • View results with confidence scores, sources, and detailed explanations

Code Explanation

  • Backend: NestJS application with clean architecture following Typescript best practices
  • AI Integration: Perplexity Sonar API with three specialized models - Sonar for fact-checking, Sonar Deep Research for trust chain analysis, and Sonar Reasoning Pro for logical evaluation
  • Parallel Processing: Simultaneous execution of all three analysis methods for efficient claim verification
  • Response Sanitization: Custom JSON parsing and validation to handle various API response formats
  • Confidence Scoring: Weighted scoring system combining results from all three analysis methods
  • Frontend: React application with intuitive claim submission interface and detailed results visualization
  • Testing: Comprehensive test suite including unit tests, end-to-end tests, and claim analysis testing

How the Sonar API Is Used

TruthTracer leverages Perplexity’s Sonar API through three distinct analysis approaches: