Skip to content
AhmedxsaadPublic

About

1st place winner at Menacraft Hackathon, FST 2026

Resources

Stars

7 stars

Watchers

0 watching

Forks

Repository files navigation

Truth Engine

A defense-in-depth digital verification platform evaluating media across three axes — Content Authenticity, Contextual Consistency, and Source Credibility — unified by an explainable AI layer and a 3D-interactive frontend.

Architecture

Frontend (Next.js 15) → Core (NestJS :8000)
                              ├── Authenticity Service (:8001)
                              ├── AuthorDNA Service    (:8006)
                              ├── Context Service     (:8002)
                              ├── OSINT Service       (:8003)
                              ├── LLM Service         (:8004)
                              ├── Trust Shield        (:8005)
                              └── Truth Stamp         (:8006)

Quick Start

1. Configure

cp .env.example .env
# Fill in your free API keys (see below)

2. Run with Docker

docker-compose up --build

2b. Run with Helm (Kubernetes)

helm lint ./helm
helm upgrade --install truth-engine ./helm
kubectl port-forward svc/frontend 3000:3000

3. Local development (no Docker)

Core (NestJS gateway):

cd backend/core && npm install && cp .env.example .env
npm run start:dev

Any Python service (e.g. authenticity):

cd backend/services/content-authenticity-service
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
uvicorn main:app --reload --port 8001

Frontend:

cd web-app && npm install && npm run dev

Required API Keys (all free)

Key Where to get
CLOUDFLARE_ACCOUNT_ID dash.cloudflare.com
CLOUDFLARE_API_TOKEN dash.cloudflare.com
HUGGINGFACE_API_TOKEN huggingface.co/settings/tokens
VIRUSTOTAL_API_KEY virustotal.com — optional
GOOGLE_SAFE_BROWSING_KEY console.cloud.google.com — optional

Services

Service Port Tech Role
core 8000 NestJS API gateway & orchestrator
authenticity 8001 FastAPI Axis I: forensic content analysis
author_dna 8006 FastAPI Text-only author fingerprint comparison
context 8002 FastAPI Axis II: semantic consistency
osint 8003 FastAPI Axis III: source credibility
llm 8004 FastAPI Cloudflare Workers AI client
trust_shield 8005 FastAPI Extension-first fast verdict + async full report
truth_stamp 8006 FastAPI Verifiable blockchain stamp minting and lookup
frontend 3000 Next.js 15 UI with 3D Trust Sphere

Chrome Extension (Trust Shield)

  • Extension code: extension/trust-shield
  • Backend endpoint: http://localhost:8005

Run only extension backend:

docker compose up -d trust_shield
curl -sS http://127.0.0.1:8005/health

Then load unpacked extension from extension/trust-shield in chrome://extensions.

Truth Stamp Service

  • Service code: backend/services/provenance-stamp-service
  • Endpoint: http://localhost:8006

Run only Truth Stamp backend:

docker compose up -d truth_stamp
curl -sS http://127.0.0.1:8006/health

API

POST /api/v1/analyze   multipart/form-data
  file        <binary>   image or text file
  claim       <string>   caption/claim about the media
  source_url  <string>   source URL (optional — enables Axis III)
  author_samples <string> prior writing samples for the same author (optional, text uploads)
  author_label   <string> display label for the author fingerprint (optional)
  author_source  <string> URL or supported handle syntax for auto-ingesting reference posts

GET  /health

Demo Scenarios

  1. Upload a known deepfake → Axis I flags manipulation + heatmap highlights face
  2. Upload image with forged C2PA → Integrity Clash triggers contradiction
  3. Upload AI-generated text → ImBD alignment score > 0.7
  4. Upload suspicious text + author_source=https://example.com/author/jane → AuthorDNA auto-builds a reference fingerprint
  5. Upload real photo + false caption → Axis II flags semantic mismatch
  6. Submit suspicious domain URL → Axis III threat radar populates
  7. Observe Trust Sphere 3D react to different trust scores

Supported author_source forms:

  • Full URL: https://example.com/author/jane
  • medium:@name
  • substack:name
  • devto:name
  • rss:https://example.com/feed.xml

About

1st place winner at Menacraft Hackathon, FST 2026

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages