A full-stack fake news and propaganda detection web application built with Flask, vanilla JS, and a custom dark UI. Designed as a final year cybersecurity project.
- NLP Analysis — Detects 9 propaganda tactics via pattern matching (fear appeal, loaded language, false dichotomy, bandwagon, appeal to authority, scapegoating, repetition, black & white thinking, glittering generality)
- Sentiment Scoring — Measures emotional manipulation through linguistic signals
- OSINT Source Analysis — Domain credibility scoring, age detection, registrar country risk, fact-check database lookup
- Multi-signal Fusion — Weighted risk score combining NLP + OSINT signals
- Scan History — Persists all analyses in the session with timeline view
- Propaganda Guide — Reference library of all tactic types with examples
- Domain Lookup — Standalone domain credibility tool
- Responsive Dark UI — Sleek dashboard with animated risk meters
# 1. Install dependencies
pip install -r requirements.txt
# 2. Run the server
python app.py
# 3. Open in browser
# http://localhost:5000veridect/
├── app.py # Flask backend + NLP/OSINT analysis engine
├── requirements.txt
├── templates/
│ └── index.html # Single-page app shell
└── static/
├── css/
│ └── style.css # Full dark theme stylesheet
└── js/
└── app.js # Frontend logic, API calls, rendering
- Input — URL or raw article text submitted via the top bar
- Domain extraction — Parses URL to extract domain for OSINT checks
- Domain analysis — Scores domain against whitelist, checks naming patterns, TLD, simulates age and registrar country
- NLP analysis — Regex-based propaganda tactic detection across 9 categories, sentiment scoring via keyword heuristics, manipulation signal extraction
- Score fusion — Weighted combination: tactics (30%) + sentiment (20%) + manipulation (15%) + source credibility (25%) + cross-source (10%)
- Output — Risk score, credibility score, per-signal breakdown, OSINT report
Replace the heuristic components with:
- BERT/RoBERTa fine-tuned on FakeNewsNet or LIAR dataset (HuggingFace Transformers)
- Real Whois API (python-whois library)
- NewsAPI / GDELT for cross-source agreement
- ClaimBuster API for claim-level fact checking
- Google Reverse Image API for image forensics
- PostgreSQL for persistent scan history
- SHAP / LIME for ML explainability
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/analyze |
Analyse article URL or text. Body: {"text": "..."} |
| GET | /api/history |
Returns sample scan history |
curl -X POST http://localhost:5000/api/analyze \
-H "Content-Type: application/json" \
-d '{"text": "SHOCKING: Government HIDING 5G truth! Share before banned!"}'{
"input": "SHOCKING: Government HIDING 5G truth!...",
"scores": {
"fake_probability": 78,
"credibility_score": 22,
"risk_level": "high",
"source_credibility": 0.5,
"cross_source_agreement": 0.4
},
"domain_analysis": { ... },
"text_analysis": {
"tactics": [
{ "key": "fear_appeal", "name": "Fear appeal", "severity": "high" },
{ "key": "loaded_language", "name": "Loaded language", "severity": "high" }
],
"signals": {
"sentiment_bias": 0.72,
"linguistic_manipulation": 0.65,
"claim_verifiability": 0.08
}
}
}| Layer | Technology |
|---|---|
| Backend | Python, Flask |
| NLP | Regex heuristics (→ BERT/RoBERTa) |
| OSINT | Domain pattern analysis (→ Whois, Shodan) |
| Frontend | Vanilla HTML/CSS/JS, Space Grotesk + DM Mono |
| Deployment | Python built-in server (→ Docker + Gunicorn) |