TrustLens: Empowering Users Through Transparency
Inspiration
Turning 18 and opening my first bank account was a milestone—an exciting step into independence. But that thrill quickly soured as I navigated the online shopping world. Everywhere I looked, websites bombarded me with fake urgency: countdown timers, "only 2 left!" messages, and manipulative offers that pushed me to decide—fast. It was overwhelming and frustrating to realize how easily I could be manipulated into making rushed decisions.
That experience sparked a question: How many others are falling for these tricks, unknowingly? I realized that behind these tactics are psychological tricks designed to influence us without us even noticing. I wanted to create something that could empower people—something that would reveal these hidden pressures rather than prey on them.
And so, TrustLens was born: a tool to uncover and decode the dark patterns embedded in websites and online marketing.
Key Features
TrustLens provides a comprehensive toolkit for understanding and exposing dark patterns:
Comprehensive Pattern Library
12 Dark Patterns Detected: Urgency, Scarcity, Social Proof, Authority, Fear of Missing Out, Framing Bias, Emotional Manipulation, Pressure Tactics, Hidden Costs, False Hierarchy, Roach Motel, and Misdirection
Pattern Cards with Context: Each detected pattern displays the exact text snippet, the psychological tactic being used, and a plain-language explanation of why it's manipulative
Severity Indicators: Visual representation of pattern intensity and impact level
Advanced Filtering System
Users can organize and filter detected patterns by:
- Category - Urgency, Social Proof, Conversion, Attention, Data Capture, or Pressure
- Severity Level - High, Medium, Low impact patterns
- Industry Type - E-commerce, Travel, Finance, SaaS, Media, Social - to understand which industries use which tactics most
- Custom Search - Find specific manipulation tactics within analysis results
Data Export & Analysis
- JSON Export - Raw, structured data export for developers, researchers, and API integration
- CSV Export - Spreadsheet-friendly format for statistical analysis and reporting
- Pattern Metadata Included - Each export contains detected patterns, severity, category, and context
Local Analysis History
- Browser-based Storage - All analysis results saved locally (no data leaves your device unless you choose to export)
- History Timeline - View past analyses with timestamps, URLs analyzed, and number of patterns detected
Real-Time Feedback
- Instant Pattern Detection - Analysis completes in seconds with visual animations
- Intent Breakdown Rings - Animated donut charts showing psychological intent distribution (Urgency %, Conversion %, Attention %, Data Capture %)
- Severity Ratings - Visual indicators showing which patterns pose the highest risk
What TrustLens Does
TrustLens is a dark pattern detector—a digital lie detector that analyzes entire websites and extracts text, then uses NLP and rule-based logic to break down the content and expose the psychological tricks being used to manipulate users.
It uncovers:
- Urgency tricks - "Only 2 left!" countdowns
- Social proof pressure - "Join thousands of happy customers!"
- Fear-based persuasion - Warnings about missing out or losing value
- Framing bias - Highlighting benefits while hiding downsides
- Emotional nudges - Appeals to guilt or desire
- Conversion tactics - Pushy pop-ups, limited-time offers
Instead of relying on "AI magic," TrustLens uses a transparent, rule-based approach—powered by NLP, regex logic, and psychology research—to identify these patterns. Users see clear, understandable results:
- Pattern cards explaining each tactic with highlighted text
- Plain-language explanations of what's happening and why
- Intent rings showing the psychological goal behind each pattern
- Professional, minimal interface built for credibility
Tech Stack
Backend Architecture
Core Framework:
- FastAPI - Asynchronous Python web framework for building fast, production-ready APIs with automatic documentation
Web Scraping & Content Extraction:
- Selenium - Browser automation for capturing dynamically-loaded content
- webdriver-manager - Automatic ChromeDriver management across platforms
- BeautifulSoup4 - HTML parsing and DOM traversal
- Requests - HTTP client for fetching URLs
Server & Deployment:
- Uvicorn - ASGI server (runs on Render)
- python-dotenv - Environment variable management
Analysis Engine:
- Custom NLP Pipeline - Pattern detection using regex rules and text analysis
- Psychology-driven Rules - Detection based on marketing psychology research
Frontend Technology
Structure & Markup:
- HTML5 - Semantic, accessible markup
- CSS3 - Modern styling with custom design tokens and animations
Interaction & Dynamics:
- Vanilla JavaScript - Zero dependencies, fast performance
- Dynamic SVG Rendering - Animated circular progress indicators
- Real-time API Integration - Seamless backend communication
Design System:
- Playfair Display - Professional serif font for headings
- Inter - Clean sans-serif for body text
- Minimalist Color Palette - Black, white, grays for credibility
- Smooth Animations - 1.2s fill animations with easing
Deployment Infrastructure
Frontend:
- GitHub Pages - Static site hosting with HTTPS
- Git-based deployment - Simple push-to-deploy workflow
Backend:
- Render - Cloud application hosting
- Chromium & Selenium - Browser automation for URL analysis
- Build Scripts - Automated dependency installation
Building TrustLens: Challenges & Triumphs
Creating TrustLens wasn't straightforward. Here's what we faced and how we overcame it:
Detecting Complex Psychological Patterns
- Identifying dark patterns required extensive tuning of NLP and regex rules
- Patterns weren't always consistent across websites, so we iterated many times
- Solution: Built a flexible rule engine that combines multiple detection strategies
Web Scraping Dynamic Content
- Initially, BeautifulSoup only captured static HTML, missing JavaScript-rendered content
- Solution: Integrated Selenium for real-time browser automation, though it required learning new tools and optimizing for server environments
Designing a Credible Interface
- The temptation to add "AI magic" visuals was strong, but credibility demanded restraint
- Solution: Built a clean, minimal design—avoiding gimmicks while making data visual through animated rings and clean cards
Balancing Performance with Accuracy
- Deep analysis on large websites was slow; shallow analysis missed patterns
- Solution: Optimized scraping to focus on text content, implemented caching, and streamlined the analysis pipeline
Cross-Origin Communication
- Frontend (GitHub Pages) needed to communicate with backend (Render) safely
- Solution: Configured CORS on FastAPI backend and updated frontend API endpoints dynamically
Despite these challenges, we stayed committed and built a tool that genuinely helps users understand manipulation.
What We've Achieved and Learned
Technical Achievements:
- Built a full-stack application with independent frontend and backend deployments
- Implemented real-time web scraping with Selenium for dynamic content analysis
- Created interactive animations and responsive design without frameworks
- Deployed to production environments (GitHub Pages + Render)
Design & UX:
- Crafted a clean, research-oriented interface that conveys seriousness and trust
- Designed animated intent rings that make data engaging without being gimmicky
- Built a professional visual hierarchy using typography and spacing
Knowledge Gained:
- Deep understanding of NLP and rule-based pattern detection
- Hands-on experience with web scraping and browser automation
- Lessons in full-stack deployment and cross-origin communication
- Awareness of how deeply embedded psychology is in everyday interfaces
Core Insight: We learned that transparency can be powerful. Users don't need flashy AI promises—they need clear, honest information to make informed decisions.
The Road Ahead
TrustLens is just beginning. Future plans include:
- Full-site crawling with behavioral pattern logging over time
- Export options - PDF, CSV, JSON reports for researchers and journalists
- Enhanced pattern library - Adding more dark patterns and psychological tactics
- Browser extension - Real-time detection as users browse
- Community contributions - Crowdsourced pattern detection and feedback
- Expanded accessibility - Support for students, journalists, watchdogs, and everyday users
A Note on Deployment
As a developer early in my journey, navigating deployment was challenging. I deployed the frontend on GitHub Pages and the backend on Render to learn how different parts of an application come together in production.
To see the backend in action, visit: https://trustlens-cutx.onrender.com/docs
This interactive documentation lets you test the /analyze-text and /analyze-url endpoints directly.
Conclusion
In essence, TrustLens is about empowering users to see beyond the tricks—helping them make informed decisions in a manipulative digital world. It's a small tool with a big purpose: restoring trust, one website at a time.
Thank you for taking the time to explore TrustLens.
Built with transparency, tested with intention, deployed with determination.
Built With
- ai
- css
- fastapi
- github
- html
- javascript
- ml
- natural-language-processing
- python
- render
- selenium
Log in or sign up for Devpost to join the conversation.