Project Introduction
Relevant source files
The following files were used as context for generating this wiki page:
TrueLens is an AI-powered content verification platform designed to combat the "trust crisis" on the internet. It provides a comprehensive suite of tools to detect AI-generated text, manipulated images, fake reviews, and fraudulent documents by providing users with a calculated "Trust Score" and detailed evidentiary signals.
The platform employs a multi-signal machine learning pipeline that analyzes stylometry, domain reputation, and cryptographic provenance to provide explainable authenticity verdicts. Beyond simple detection, TrueLens includes features for cryptographic document signing and verification to ensure the integrity of digital assets.
Sources: truelens-app/src/app/page.tsx:28-32, truelens-app/src/app/page.tsx:88-92, truelens-app/src/lib/analysis.ts:219-224
Core Capabilities
The system architecture is built around several specialized detection and verification modules. These modules work in tandem to evaluate content submitted via URL, raw text, or file upload.
| Capability | Description | Key Technologies/Signals |
|---|---|---|
| AI Text Detection | Identifies synthetic text using stylometry and transformer models. | Vocabulary richness, burstiness, sentence variance. |
| Domain Trust | Evaluates website credibility and reputation. | TLD analysis, HTTPS status, domain age. |
| Document Verification | Detects tampering and signs documents cryptographically. | SHA-256 hashing, digital signatures, QR codes. |
| Ensemble Scoring | Aggregates multiple signals into a single trust metric. | Weighted signal averaging (Text, Domain, Image). |
Sources: truelens-app/src/app/page.tsx:205-245, truelens-app/src/lib/analysis.ts:211-217
System Architecture and Data Flow
TrueLens utilizes a Next.js frontend that communicates with internal analysis libraries and simulated API endpoints. The content verification process follows a structured pipeline from submission to verdict generation.
Content Analysis Pipeline
When a user submits content, the system processes it through a series of analysis engines. For URL submissions, the system evaluates both the domain characteristics and the text content extracted from the page.
The diagram shows the parallel processing of domain and text signals before they are aggregated by the ensemble scorer.
Sources: truelens-app/src/lib/analysis.ts:219-289, truelens-app/src/app/scan/page.tsx:32-60
Text Analysis Logic
The text analysis engine (extractTextFeatures) calculates stylometric markers to distinguish human writing from AI-generated patterns. It specifically looks for uniformity in sentence structure, which is a common hallmark of LLM output.
function extractTextFeatures(text: string): TextFeatures {
// Logic to calculate markers of human vs AI text
// ...
return {
avgSentenceLength,
sentenceLengthVariance, // Low variance suggests AI
vocabularyRichness, // Uniform vocab suggests AI
burstiness, // Variation in paragraph lengths
repetitionScore, // Frequency of repeated words
// ...
};
}
Sources: truelens-app/src/lib/analysis.ts:18-68
Document Security and Provenance
TrueLens handles sensitive documents by performing integrity checks and providing a cryptographic "Seal of Authenticity." This involves generating SHA-256 hashes and creating tamper-evident digital signatures.
Document Verification Sequence
Users can verify the authenticity of a signed document by providing its hash or scanning a QR code, which the system checks against its ledger.
The sequence illustrates the lookup process for cryptographically signed documents within the platform's storage.
Sources: truelens-app/src/app/verify/page.tsx:64-85, truelens-app/src/lib/store.ts:114-142
Data Structures
The project defines strict interfaces for its core entities to ensure consistency across the analysis and reporting phases.
| Interface | Purpose | Key Fields |
|---|---|---|
Scan | Represents a single content analysis session. | id, trustScore, verdict, signals, scanDuration |
Signal | A specific piece of evidence from an analysis engine. | type, score, label, confidence, evidence |
Document | Represents a file processed for verification. | filename, hash, findings, signature |
DocumentSignature | Cryptographic data for a verified document. | documentHash, signature, publicKey, timestamp |
Sources: truelens-app/src/lib/types.ts:12-70
API and Integration
TrueLens provides a RESTful API for developers to integrate content verification into external applications. The portal supports multiple languages including cURL, Node.js, and Python.
Primary Endpoints
POST /api/v1/scans: Submit content (URL/Text) for immediate analysis.GET /api/v1/scans/:id: Retrieve detailed breakdown of a previous scan.POST /api/v1/documents: Upload and analyze documents for tampering.POST /api/v1/verify: Verify a document's signature via hash.
Sources: truelens-app/src/app/developers/page.tsx:14-46
Summary
The "Project Introduction" phase of TrueLens establishes a multi-layered defense against digital misinformation. By combining heuristic stylometry with cryptographic verification, the platform offers a technical framework for restoring trust in online content and documents.
Sources: truelens-app/src/app/page.tsx:280-295, truelens-app/src/app/layout.tsx:7-24