Truth Guardian is a Flask-based misinformation analysis web app that combines lightweight claim parsing, real-time DuckDuckGo lookups, source credibility hints, and explainable scoring. It is not a machine learning classifier; the strength of the project is that the reasoning path is inspectable and easy to discuss in an interview.
- It treats misinformation analysis as a systems problem, not just a single score.
- It explains where a verdict came from with sources, contradiction counts, and linguistic signals.
- It exposes both a browser UI and a JSON API workflow.
- It is simple enough to review quickly, while still showing product thinking and backend reasoning.
- Receive a claim from the UI or
/analyzeendpoint. - Extract searchable phrases, entities, and numeric cues.
- Query DuckDuckGo Instant Answer data for supporting context.
- Separate supporting, contradicting, and neutral evidence.
- Combine evidence balance with source credibility hints into an explainable verdict.
- Return structured output for the frontend to render.
- app.py: Flask app, heuristics, web lookups, evidence scoring, and API responses.
- templates/index.html: interactive landing page and analyzer UI.
- static/script.js: fetch flow, result rendering, and interaction logic.
- static/style.css: immersive frontend styling and responsive layout.
- tests/test_app.py: lightweight route and scoring tests.
git clone https://github.com/Neth766/AI-Misinformation-Detector.git
cd AI-Misinformation-Detector
pip install -r requirements.txt
python app.pyOpen http://localhost:5000 in your browser.
python -m unittest discover -s testscurl -X POST http://127.0.0.1:5000/analyze \
-H "Content-Type: application/json" \
-d '{"text":"According to a peer-reviewed study, climate change affects weather patterns."}'{
"label": "LIKELY TRUE",
"confidence": 88,
"warning": null,
"source_summary": "Analyzed 4 web sources: 2 supporting, 0 contradicting, 2 from credible outlets",
"processing_time": "428ms"
}- Explainable scoring versus opaque black-box classification.
- Trust tradeoffs when using live web data instead of a curated fact-check database.
- Frontend and backend contract design for rich result rendering.
- How you would extend this into a stronger ML-assisted or source-ranked system.
- Safety limitations and why confidence should not be treated as ground truth.
- The app depends on live web availability and the quality of DuckDuckGo Instant Answer data.
- Credibility scoring is heuristic and intentionally transparent, not authoritative.
- The current search and phrase extraction logic is English-first.
- This should be treated as a decision-support demo, not a substitute for professional fact-checking.
- Add richer source ranking and deduplication.
- Introduce claim history and caching.
- Support multilingual claim extraction.
- Pair heuristics with a trained text classifier.
- Add containerization and CI if the project grows further.
This project is licensed under the MIT License. See LICENSE for details.