Project Darpan
Reflecting the Truth Behind Online Content
December 24, 2025
About the Project
Darpan, meaning mirror in Sanskrit, is an AI-powered browser extension designed to reflect the true nature of online discourse. It analyzes social media content in real time to detect toxicity, propaganda, and coordinated misinformation campaigns targeting India.
The project was developed for Code Spring 2025 with the goal of empowering users through transparency and contextual awareness, rather than opaque moderation.
Problem Statement
Digital platforms such as X (Twitter), YouTube, Telegram, and Facebook are frequently misused to spread:
- Anti-India propaganda
- Hate speech and communal incitement
- Coordinated misinformation campaigns
Existing moderation systems are often reactive, centralized, and non-transparent.
There is a strong need for a real-time, user-side, explainable AI solution.
Inspiration
The project was inspired by:
- Lack of India-specific context in generic toxicity detectors
- Black-box content moderation systems
- The growing importance of digital literacy and informed consumption
Darpan focuses not only on flagging content, but also on clearly explaining why it is flagged.
Approach
Project Darpan follows a hybrid multi-layered pipeline:
1. Local Rule-Based Analysis
- Keyword and phrase detection for hate speech, disinformation, and separatist rhetoric
- Identification of propaganda tactics such as excessive capitalization and emotional triggers
2. Threat Scoring System
Each detected pattern contributes to a cumulative threat score:
Threat Score = Σ (wᵢ × fᵢ)
Where:
- fᵢ = detected feature
- wᵢ = assigned severity weight
3. AI-Powered Contextual Analysis
For deeper understanding, the system integrates the Hugging Face Inference API using the model:
cardiffnlp/twitter-roberta-base-sentiment-latest
Tech Stack
Programming Languages
- JavaScript – Analysis engine, API calls, DOM manipulation
- HTML – Popup interface structure
- CSS – User interface styling
Frameworks and Libraries
- Web Extensions API
- Tailwind CSS
APIs
- Hugging Face Inference API
Innovation and Uniqueness
- India-specific toxic pattern database
- Category-based analysis instead of a single toxicity score
- Transparent explanation of detected issues
- Real-time, on-screen feedback while browsing
Challenges Faced
- Difficulty in detecting sarcasm and satire
- Dependency on external APIs for large-scale deployment
- Frequent UI and DOM changes on social platforms
Mitigation Strategies
- Hybrid AI approach (local + ML)
- Local fallback analysis engine
- Modular and adaptable extraction logic
Impact and Benefits
- Empowers users to identify propaganda
- Enhances digital and media literacy
- Reduces exposure to harmful and manipulative content
Key benefits include:
- Instant verdicts
- Numerical threat scores
- Detailed key findings
Key Learnings
- Importance of explainable AI over opaque moderation
- Effectiveness of browser extensions for user-side AI
- Transparency significantly improves user trust
Project Links
GitHub Repository:
https://github.com/Raghavkhare12/Project_DarpanDemo Video:
https://drive.google.com/file/d/1_ODhUw0MJC6j0kl8lZIx-XxFMBPQ3ina/view
References
- Hugging Face Inference API Documentation
- Political Hate Speech Detection in Indian Elections
- Disinformation and Psychological Warfare Reports
Note: This project was built entirely from scratch and represents an original idea by me.
Built With
- api
- css3
- extensions
- html5
- huggingface
- javascript
- tailwind
- web
Log in or sign up for Devpost to join the conversation.