Skip to content

Repository files navigation

VerifyAI

Trust, but verify.

VerifyAI is a Next.js 15 application for checking news credibility, spotting suspicious images, and analyzing video URLs for misleading context. It combines structured AI analysis, real-time grounding, and a guided UI so users can inspect text, images, and videos from one place.

Tech AI

Live Demo

Overview

VerifyAI is built to help users evaluate whether a claim, image, or video is trustworthy. The app supports:

  • Text credibility analysis with verdicts, checked claims, red flags, supporting evidence, and current context.
  • Image verification with deepfake-style forensic analysis plus online circulation context.
  • Video URL analysis with metadata inspection, current misuse context, and live-news-aware reasoning.
  • Read-aloud summaries and a modern verification dashboard designed for both desktop and mobile.

Key Features

Text Verification

  • Structured credibility scoring from 0 to 100
  • Verdicts such as REAL, SUSPICIOUS, and FAKE
  • Claim-by-claim verification output
  • Source-style analysis, red flags, and suggested search queries
  • Current news context when grounding is available

Image Verification

  • Deepfake-oriented visual artifact analysis
  • Confidence scoring and evidence-based explanations
  • Current circulation context
  • Reverse-search suggestions
  • Known misuse and misinformation context when detected

Video URL Verification

  • Supports public video URLs such as YouTube, TikTok, Instagram, X, Facebook, Vimeo, and Dailymotion
  • Detects platform metadata and preview thumbnails in the UI
  • Analyzes whether a video is authentic, misleading, or shared with false context
  • Shows current misuse context, news context, and inconsistencies

Reliability and Fallbacks

  • Gemini is the primary analysis provider
  • Groq is used automatically as a fallback if Gemini fails or times out
  • Browser speech is used as a fallback when cloud TTS is unavailable or quota-limited
  • The dev server automatically falls back to the next free port if 9002 is already in use

Tech Stack

Frontend

Backend and AI

  • Firebase for auth and Firestore
  • Genkit for Gemini-based flow orchestration
  • Direct Groq API integration for provider fallback
  • Next.js Server Actions for AI requests

Project Structure

Verify-AI/
|-- src/
|   |-- ai/
|   |   |-- flows/              # Text, image, video, and speech flows
|   |   |-- genkit.ts           # Gemini / Genkit configuration
|   |   `-- groq.ts             # Groq fallback client
|   |-- app/
|   |   |-- actions.ts          # Server actions
|   |   `-- api/oembed/         # OEmbed proxy for video preview metadata
|   |-- components/
|   |   |-- ui/                 # Shadcn UI building blocks
|   |   `-- verifier.tsx        # Main verification interface
|   |-- firebase/               # Firebase config and hooks
|   `-- lib/                    # Schemas, helpers, types, rate limiting
|-- scripts/
|   `-- dev.mjs                 # Auto-port dev launcher
|-- next.config.ts
|-- package.json
`-- README.md

Getting Started

Prerequisites

  • Node.js 18 or newer
  • npm
  • A Firebase project with Firestore and Authentication enabled
  • A Gemini API key
  • A Groq API key

Installation

Clone the repository:

git clone https://github.com/HakkanShah/verifyai.git
cd verifyai

Install dependencies:

npm install

Environment Setup

Create a .env or .env.local file in the project root:

# Firebase
NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id

# Gemini / Google GenAI
GEMINI_API_KEY=your_gemini_key
GOOGLE_GENAI_API_KEY=your_gemini_key
GOOGLE_API_KEY=your_gemini_key
GEMINI_MODEL=flash

# Groq fallback
GROQ_API_KEY=your_groq_key

# Provider timeouts
AI_PROVIDER_TIMEOUT_MS=20000
GROQ_TIMEOUT_MS=20000

Run the Development Server

npm run dev

The dev launcher prefers port 9002. If 9002 is already occupied, it automatically starts the app on the next available port instead of failing with EADDRINUSE.

Typical URLs:

  • http://localhost:9002
  • http://localhost:9003 if 9002 is already busy

Available Scripts

  • npm run dev starts the Next.js dev server with automatic port fallback
  • npm run build creates a production build
  • npm run start starts the production server
  • npm run lint runs linting
  • npm run typecheck runs TypeScript checks
  • npm run genkit:dev starts the Genkit development environment
  • npm run genkit:watch starts Genkit in watch mode

AI Provider Behavior

VerifyAI uses a layered provider strategy:

  1. Gemini is tried first for analysis flows.
  2. If Gemini errors or exceeds the configured timeout, the app falls back to Groq.
  3. If cloud speech generation is unavailable, the UI can fall back to browser speech.

This means users can still analyze text, images, and videos even when one provider is temporarily unavailable.

Current Notes

  • The app is optimized for local development on port 9002, but no longer depends on it being free.
  • LAN access can be used during development through the configured Next.js allowedDevOrigins.
  • Some Genkit development warnings may still appear in the console because of upstream package behavior, but they do not block the app from building or running.

License

This project is provided as-is for development and educational use unless your repository specifies another license separately.

About

VerifyAI : is an AI-powered tool that detects fake news and deepfake content, helping users verify the authenticity of headlines, articles, and media instantly.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages