Skip to content

dandan64/ProjectLegit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

131 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Legit - AI-Powered News Credibility Verifier

Legit Logo

Instantly verify news credibility, detect bias, and cross-reference sources using a multi-agent AI system directly in your browser.

Before you share an article, Legit gives you a clear credibility score, explains why, and shows supporting and contradicting sources in one click.

Manifest V3 Powered By Gemini License


Watch the Demo Video
๐Ÿ“บ Watch the Demo: See how Legit analyzes a news article in real-time.

๐ŸŽ“ Academic Context

This project was developed and submitted as a final project at the Technion โ€“ Israel Institute of Technology, Faculty of Computer Science, during the Winter 2025โ€“2026 semester.

  • Developers: Daniel Ben Zeev & Moshe Aizenfratz
  • Supervisors: Prof. Omri Ben-Eliezer & Dr. Oren Mishali

๐Ÿ“– About The Project

Legit is a Chrome Side Panel extension that helps you quickly judge whether a news article is trustworthy.
With one click, it analyzes the article, checks the publisher and author, compares the main claims against independent coverage, and flags signs of bias or manipulation.

The result is a weighted credibility score plus a clear breakdown of why the score was given, including supporting and contradicting sources you can open yourself.


๐Ÿ–ผ๏ธ Screenshots & Demo


โœจ Key Features

Here is how Legit helps you navigate the news landscape:

1. ๐Ÿ•ต๏ธโ€โ™‚๏ธ Multi-Agent Analysis Engine

Don't rely on a single opinion. Legit deploys a team of AI agents to investigate the article from multiple angles: source history, author credibility, and factual consensus.

Multi Agent Analysis Screenshot Multi Agent Analysis Screenshot
View a comprehensive breakdown of the article's credibility score.

2. ๐Ÿง  Smart Context Search (SIFT)

The agents donโ€™t rely only on the article text. They search for independent coverage and surface supporting or contradicting sources, so you can do quick โ€œlateral readingโ€ and verify the claims transparently.

SIFT Search Screenshot
See exactly which sources support or contradict the claims.

3. ๐Ÿ”ฆ Fuzzy Quote Highlighting

Found a suspicious claim in the analysis? Click it. Our robust Levenshtein Distance algorithm instantly scrolls to and highlights the exact sentence in the article, even if there are formatting differences.

Highlighting Feature Screenshot
Interactive highlighting brings the analysis to life inside the article.

๐Ÿค– Meet the Agents

Legit works like a small newsroom team. Each โ€œagentโ€ is simply a separate checker that focuses on one job (publisher, author, facts, bias, or writing quality). Then Legit combines the findings into a clear credibility score with explanations and links, so you can verify the story yourself.

Agent Name What it does Implementation
The Investigator
(Source Verification)
Checks the publisherโ€™s track record. Is it satire, propaganda, or known for repeated misinformation? View Implementation
The Profiler
(Author Analysis)
Checks whether the author appears real and credible, and whether they have relevant background or expertise. View Implementation
The Fact-Checker
(Cross-checking)
Checks whether other reputable outlets report the same core facts, and flags claims that seem unverified. View Implementation
The Psychologist
(Bias)
Looks for manipulative or emotionally loaded language, framing, and common persuasion tactics. View Implementation
The Editor
(Writing Quality)
Evaluates writing quality and structure. Lots of errors and incoherence can be a warning sign of low-quality content. View Implementation
The Headline Critic
(Headline Analysis)
Checks whether the headline matches what the article actually supports, or if it is exaggerated clickbait. View Implementation

๐Ÿ› ๏ธ Tech Stack

  • Platform: Chrome Extension (Manifest V3)
  • Core Logic: Vanilla JavaScript (ES6+)
  • AI Backend: Google Gemini API (Model: gemini-2.5-flash)
  • UI/Styling: CSS3 (Glassmorphism, CSS Variables, Animations), HTML5
  • Content Extraction: Readability.js
  • Storage: chrome.storage.local with Quota Management

๐Ÿš€ Getting Started

Prerequisites

  • Google Chrome or Microsoft Edge (Chromium based).
  • A Google Gemini API Key (Free tier available). Get one here.

Installation

  1. Clone the Repository

    git clone https://github.com/dandan64/Project_Legit.git
    cd Project_Legit
  2. Load into Chrome

    • Open Chrome and navigate to chrome://extensions/.
    • Toggle Developer mode (top right corner).
    • Click Load unpacked.
    • Select the directory where you cloned the repository.
  3. Setup

    • Open the Chrome Side Panel (click the square icon next to your profile or press Ctrl+B).
    • Select "Legit" from the dropdown.
    • Enter your Gemini API Key and click Save.

๐Ÿ’ก Usage

  1. Navigate to any news article (e.g., CNN, BBC, Fox News, or a blog).
  2. Open the Legit Side Panel.
  3. Click "Analyze This Page".
  4. View Results:
    • Overall Score: A weighted 0-100 score indicating trustworthiness.
    • Agent Breakdown: Click on individual agents to read detailed findings.
    • Interactive Quotes: Click on highlighted quotes in the analysis to find them in the text.
    • Source Links: Click on Green (Supporting) or Red (Contradicting) source links to verify claims externally.

โš™๏ธ Architecture

The project follows a modular pattern:

  • popup.js: Handles the main UI logic, orchestrates the analysis flow, and renders results.
  • agents.js: Defines the "System Instructions" and "Prompts" for each AI agent (Source, Author, Bias, etc.).
  • background.js: Acts as the bridge to the Gemini API, handles rate limiting, and manages the caching layer.
  • contentHighlighter.js: Injected into the page to perform fuzzy text matching and DOM manipulation for highlighting.

For a deep dive into data flow, the two-phase agent pipeline, and the caching strategy, see PROJECT_STRUCTURE.md.


๐Ÿค Contributing

Contributions are welcome! Here is how to get started:

Development Setup

  1. Fork and clone the repository.
  2. Load the extension in Chrome (see Installation above).
  3. Open chrome://extensions/, find Legit, and click the Service Worker link to open the background DevTools console.
  4. Open the side panel on any news page to see the popup DevTools console.

Project Conventions

File Purpose What to change here
scripts/agents.js AI prompt definitions Tune prompts, add new agents, adjust weights
scripts/background.js API proxy & caching Rate limits, cache TTL, Gemini model version
scripts/popup.js UI orchestration Analysis flow, card rendering
scripts/utils.js Shared helpers Scoring, linkification, animations
scripts/contentHighlighter.js In-page highlighter Fuzzy match thresholds, highlight colours
scripts/localization.js i18n strings Add languages or update translated strings

Adding a New Agent

  1. Add a new object to the array returned by getAnalysisAgents() in agents.js.
  2. Give it a unique id, set weight (the six scored agents must still sum to 1.0), and write a prompt.
  3. Add a translation key matching the agent id to both en and he blocks in localization.js.
  4. If your agent needs another agent's output, set dependsOn: "<parent-id>" and include a matching {INPUT_FROM_<PARENT_ID>} placeholder in the prompt.

Pull Request Guidelines

  • Keep PRs focused on a single change.
  • Run through at least three different news articles manually before submitting.
  • Do not commit .env files or API keys.

๐Ÿ”’ Privacy & Data Usage

Legit is committed to user transparency and digital rights. In order to analyze credibility, the text of the article you choose to scan is sent securely to the Google Gemini API. We do not collect, store, or monitor your personal browsing history or data on our servers.

For full details on how we handle data, please read our Privacy Policy.


๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for more information.

๐Ÿ“ง Contact


Built with ๐Ÿ’ป and โ˜• by Daniel and Mosh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors