FACTORIZER: Empowering Social Media Users with AI Fact-Checking

Inspiration

In an era of information overload and the rapid spread of "fake news," the ability to quickly discern truth from fiction on social media is more critical than ever. I was inspired to create FACTORIZER to provide users with a simple, accessible tool to verify information directly within their social media feeds. The goal was to seamlessly integrate fact-checking into the browsing experience, empowering users to make more informed decisions about the content they consume and share.

What I Learned

This project was a deep dive into several key areas:

  1. Browser Extension Development (Manifest V3): I gained hands-on experience with the intricacies of building a modern Chrome extension, including manifest configuration, background scripts, content scripts, and inter-component communication.
  2. Third-Party API Integration: I learned how to effectively integrate and manage API calls to services like Perplexity AI (for fact-checking) and OCR.space (for image-to-text conversion), including handling authentication, request/response cycles, and error management.
  3. Asynchronous JavaScript: The project heavily relied on asynchronous operations (Promises, async/await) for API calls and browser event handling, which significantly improved my understanding and application of these concepts.

How It Was Built

FACTORIZER was built as a Chrome browser extension using the following core technologies and approaches:

  • Manifest V3: The extension adheres to the latest Chrome extension platform standards.
  • Perplexity AI API: Leveraged for its powerful AI-driven fact-checking capabilities. The extension sends text content to the API and processes the JSON response to display ratings, explanations, and sources.
  • OCR.space API: Integrated to enable fact-checking of text within images. The image URL is sent to the API, and the extracted text is then passed to the Perplexity API.
  • Context Menus API: Implemented to allow users to right-click on images or selected text to initiate a fact-check.

The development process involved:

  1. Initial Scaffolding: Setting up the basic extension structure (manifest.json, core script files).
  2. Core Logic (Background Script): Implementing API call functions for Perplexity and OCR, along with caching mechanisms.

This project was a rewarding experience, pushing me to develop a practical tool that addresses a real-world problem while deepening my web development and browser extension skills.

Built With

  • google-chrome-(as-a-browser-extension
  • javascript-(es6+)-html5-css3
  • manifest
  • ocr.space
  • perplexity
Share this project:

Updates