Skip to content

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

🛡️ TruthLens AI

AI-powered trust and safety platform for detecting suspicious messages, phishing patterns, risky URLs, and potentially dangerous online content.

Python FastAPI React scikit-learn Status

Problem

People receive suspicious emails, SMS messages, social-media messages, verification requests, payment requests, and URLs every day. A simple fake/real label does not explain why content is risky or what the user should do next.

TruthLens AI combines machine-learning classification with security signals to produce an explainable, risk-oriented result.

Key Features

  • 🤖 Word + character TF-IDF text classification
  • 🧠 ML probability and risk scoring
  • 🚨 Security signals for urgency, financial language, credential requests, and action requests
  • 🔗 URL analysis for suspicious structural characteristics
  • 🔍 Reasons and recommended actions
  • 📚 Analysis history
  • 🌐 FastAPI backend + React frontend

Architecture

User
 │
 ▼
React Frontend
 │
 ▼
FastAPI API
 │
 ├──────────────┬──────────────┐
 ▼              ▼              ▼
ML Classifier   Risk Engine    URL Analyzer
 │              │              │
 └──────────────┼──────────────┘
                ▼
        Explainable Result
                │
                ▼
          SQLite History

ML Performance

The documented V2 evaluation uses a leakage-aware validation setup.

Metric Result
Accuracy 98.81%
Precision 98.85%
Recall 98.78%
F1 Score 98.82%
ROC-AUC 0.9989

These are project evaluation results, not a guarantee of real-world detection performance.

Tech Stack

Layer Technology
Frontend React
Backend Python + FastAPI
ML scikit-learn
NLP Word + character TF-IDF
Database SQLite
Tooling Git + GitHub

Workflow

Message / URL
     ↓
Preprocessing
     ↓
ML Classification + Security Signals
     ↓
Risk Scoring
     ↓
Explainable Analysis
     ↓
Recommended Action
     ↓
History / Dashboard

Project Status

Active portfolio project. The core ML analysis, risk-oriented workflow, URL signals, and full-stack structure are implemented. The next stage focuses on automated testing, authentication, production data storage, containerization, CI/CD, monitoring, and cloud deployment.

Roadmap

  • Leakage-aware model evaluation
  • Word + character TF-IDF model
  • Risk-oriented analysis
  • URL signal analysis
  • FastAPI backend
  • React frontend
  • Analysis history
  • Automated test suite expansion
  • Authentication
  • Production database
  • Docker deployment
  • CI/CD
  • Model monitoring
  • Cloud deployment

Author

Sahibzada Aizaz Ur Rahman
Python Developer | AI/ML Engineer

⭐ If you find TruthLens AI useful, consider starring the repository.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages