Inspiration
So much of the web is full of misleading facts or outright fake news. We wanted to build a way to be able to know if something we're viewing is actually true or not, without having to leave the page or open a dozen tabs to fact-check manually. We were inspired by the idea of a "digital seatbelt"—a passive safety layer that's always there to protect you from misinformation, powered by the latest advancements in local AI.
What it does
PostPolice is a Chrome Extension that acts as your personal truth-detective. Analyze: When you click the "Analyze Page" button, it scans the current webpage (news articles, tweets, blog posts) for verifiable factual claims. Extract: It uses on-device AI (Gemini Nano) and cloud models (Groq) to extract the core claims, filtering out opinions and noise. Verify: It automatically cross-references these claims against a whitelist of credible news sources (like Reuters, AP, BBC) using a custom search engine integration. Verdict: The extension overlays the results directly on the page—highlighting claims in blue. Hovering over a claim reveals a verdict (Verified/Uncertain) and provides direct links to the sources used for verification.
How we built it
We built PostPolice as a Manifest V3 Chrome Extension with a hybrid AI architecture: Frontend: Native JavaScript for the content script to handle DOM manipulation and the floating UI. We used MutationObserver to handle dynamic content like infinite scroll feeds on X (formerly Twitter). AI Engine: We experimented with Chrome's built-in Gemini Nano for local, privacy-first summarization, and supplemented it with Groq's Llama-3 via a local proxy server for high-speed, complex reasoning. Verification: We built a custom searcher that queries DuckDuckGo, parsing the HTML results to find corroborating evidence from trusted domains. Backend: A lightweight Node.js server handles the API proxying and uses Valkey (a high-performance key-value store) to cache summaries, ensuring we don't re-analyze the same viral tweet a thousand times.
Challenges we ran into
Anti-Bot Defenses: One of our biggest hurdles was scraping search results for verification. DuckDuckGo frequently blocked our requests or served CAPTCHAs, causing a "No sources found" error. We had to engineer a robust fallback parser that could extract useful links from the HTML even when the standard DOM structure was obfuscated or changed. AI Context Limits: Webpages are huge. Feeding an entire article to an LLM often hit context windows or increased latency. We implemented a smart content extraction algorithm that prioritizes
tags and user selection to keep the AI focused. Browser AI Availability: Accessing the window.ai (Gemini Nano) API in Chrome is still experimental. We spent a lot of time debugging Chrome flags and model download states to handle graceful fallbacks when the local model wasn't ready.Accomplishments that we're proud of
The "Hybrid" Approach: We successfully combined local on-device AI (for privacy/cost) with cloud AI (for power), creating a system that feels fast and responsive. Resilience: Overcoming the search scraping blocks was a major win. Seeing the system successfully pull sources from a raw, garbled HTML response felt like magic. The UI: Typically, browser extensions feel clunky. We're proud of the "Analyze Page" floating action button—it feels like a native part of the browser, not an afterthought.
What we learned
The Web is Messy: There is no standard structure for a "webpage." Building a universal content extractor that works on both a minimal blog and a complex React app like Twitter requires a lot of heuristics. Local AI is the Future: Running models directly in the browser (window.ai) eliminates server costs and latency. It's still early days, but the potential for extensions like ours is massive.
What's next for Post Police
Community Notes Integration: allowing users to submit their own evidence to train the system. Multi-Modal Support: Analyzing images and charts, not just text. Mobile Support: Porting the logic to mobile browsers where screen real estate for fact-checking is even more limited.
Built With
- api
- cache
- css
- gemini
- javascript
- npm
- valkey
Log in or sign up for Devpost to join the conversation.