TrueAD is an AI-powered Flask-based web application that collects, analyzes, and detects scam advertisements on social media platforms in real-time using web scraping, NLP, computer vision, and machine learning.
- Backend: Flask (Python)
- Web Scraping: BeautifulSoup, Requests
- NLP & ML: spaCy, BERT, XGBoost
- Image Processing: Tesseract, OpenCV
- Frontend: Tailwind CSS, HTML, JavaScript
- Database: MongoDB or SQLite
- Alerts: Email, Telegram, WebSockets
- Real-time scam ad detection from Facebook, Twitter, and Instagram.
- Multi-layered scam detection using ML, NLP, OCR, URL checks, and wallet blacklist verification.
- Real-time alerts sent via email, Telegram, or browser notifications.
- Admin Dashboard to manage ads and view flagged reports.
- AI-powered text and image processing for enhanced scam detection.
- Modular architecture for easy scalability and maintenance.
Ensure you have the following installed:
- Python 3.8+
- MongoDB (or SQLite for local setup)
- pip (Python package manager)
Create or update the config.py
file with the following structure:
class Config:
SECRET_KEY = "your_secret_key"
MONGO_URI = "mongodb://localhost:27017/"
DEBUG = True
REDDIT_CLIENT_ID = "your_client_id"
REDDIT_CLIENT_SECRET = "your_client_secret"
REDDIT_USERNAME = "your_reddit_username"
REDDIT_PASSWORD = "your_reddit_password"
REDDIT_USER_AGENT = "TrueADScraper/1.0"
Install the required dependencies:
pip install -r requirements.txt
If requirements.txt
is missing, install manually:
pip install flask beautifulsoup4 requests spacy xgboost opencv-python
Use two terminal tabs:
- Terminal 1: Start Flask Backend
python main.py
- Terminal 2: Start Social Media Scraping and AI Monitoring
python scraper.py
Open your browser and visit: http://localhost:5000
Detection Technique | Weight Added |
---|---|
ML Model Prediction | +0.6 |
Keyword Match | +0.5 |
Phishing URL Detected | +0.6 |
Crypto Wallet Blacklist Match | +0.7 |
NLP Embedding Match (Semantic) | +0.2 |
OCR-based Scam Text Detection | +0.3 |
Messages are flagged if the total risk score > 0.4 (default threshold).
We welcome contributions from developers!
📌 Here's how you can help:
- Improve scam detection accuracy (enhance ML models or NLP logic).
- Add support for more scam patterns or keywords.
- Refactor code for modularity and scalability.
- UI/UX improvements for the dashboard.
- Write documentation or create test cases.
- Fork this repository.
- Create a new branch (feature/your-feature-name).
- Commit your changes with clear messages.
- Push to your branch and create a Pull Request.
- Admin login & access control.
- Visual scam heatmaps & statistics.
- PDF export of scam reports.
- Multilingual support.
- Integration with Discord, WhatsApp, etc.
For support, questions, or collaboration:
- 📧 Email: [mukeshkumar.cse24@gmail.com]
This project is licensed under the MIT License.