TruthifyWeb application / AI

Truthify extracts claims from text, assigns an estimated reliability level, and helps readers locate each passage in the original content.

Overview

Explore text reliability, one claim at a time

The problemA series of claims can be hard to examine without losing track of its context, especially in long texts or video transcripts.

The solutionTruthify splits content into chunks, submits them to an OpenAI model, and displays claim cards, scores out of ten, and highlights in the original text.

User workflow

Text or transcript

Paste text or enter a YouTube URL; manual text entry remains available if transcript retrieval fails. Two input modes in a single analysis interface.

1 / 4: Enter content. Previous step / Next step

Technical architecture

The React client calls a Next.js SSE route, which orchestrates OpenAI analysis and stores results and cache in PostgreSQL through Prisma.

React interface

React

Input, progress and results display
Request and SSE stream

Next.js SSE API

Next.js

Streaming, cache and persistence
Chunks for analysis

Analysis service

TypeScript

Chunking, prompts and score normalization
Prompts and responses

OpenAI API

OpenAI

Claim extraction and assessment
  • React interface: React. Input, progress and results display Request and SSE stream.
  • Next.js SSE API: Next.js. Streaming, cache and persistence Chunks for analysis.
  • Analysis service: TypeScript. Chunking, prompts and score normalization Prompts and responses.
  • OpenAI API: OpenAI. Claim extraction and assessment

Technical challenges

01

Handle longer texts

Constraint

A single request would be sensitive to input length and processing time.

The solution

Overlapping chunks with explicit limits on text length and the number of chunks.

02

Make processing visible

Constraint

Analyzing multiple chunks yields results at different times.

The solution

A Server-Sent Events route and React hook expose progress and newly extracted claims.

03

Connect scores to source text

Constraint

An isolated assessment lacks context if the user cannot find the original passage.

The solution

Excerpt position matching and interactive highlighting connected to result cards.

04

Retrieve YouTube transcripts

Constraint

Transcript retrieval depends on external sources and can fail depending on the video.

The solution

A cascade of retrieval strategies, transcript caching, and manual text entry when retrieval fails.

Main technical stack

Next.jsReactTypeScriptTailwind CSSOpenAI APIPostgreSQLStripeBetter Auth

Outcomes and learnings

Progressive analysis interface

Input workflow, chunk-level progress, overall score and assessment cards linked to the text.

Persistence and reuse

Analyses stored with Prisma in PostgreSQL, with caching based on a hash of normalized text.

Service management foundation

Magic-link authentication, account area, Stripe checkout sessions and signed webhook handling.