Protect yourself from recruitment fraud with transparent, AI-driven analysis
Features β’ Installation β’ Usage β’ API β’ Architecture
ScamRadar is a production-ready, explainable AI system that helps job seekers identify fraudulent job postings. It combines machine learning, rule-based detection, and advanced AI reasoning to provide transparent, actionable fraud detection.
- π― Explainable AI: Every decision is explained in plain language
- β‘ Fast Analysis: Results in seconds with ML pattern detection
- π§ Deep Intelligence: Google Gemini AI for contextual analysis
- π Production-Ready: Rate limiting, caching, and comprehensive error handling
- π¨ Modern UI: Clean neobrutalism design with smooth animations
- Quick ML Scan: Instant pattern-based analysis using trained machine learning models
- Advanced AI Investigation: Deep contextual reasoning powered by Google Gemini AI
- Screenshot Analysis (OCR): Upload screenshots of job postings for automatic text extraction
- Risk Arbitration Layer: Weighted scoring system combining multiple detection signals
- Structured Fraud Explanation: Clear, categorized explanations of detected risks
- Rate-Limited & Secure: Built-in protection against API abuse
-
ML Pattern Detection (50% weight)
- Trained on thousands of scam postings
- Identifies linguistic and structural fraud patterns
-
Red Flag Rule Engine (20% weight)
- Deterministic rules for known scam indicators
- Detects fake domains, suspicious contact methods, inflated promises
-
AI Deep Investigation (30% weight)
- Gemini AI performs contextual reasoning
- Analyzes manipulation tactics beyond pattern matching
-
Risk Arbitration System
- Weighted aggregation of all signals
- Final risk assessment with structured explanations
User Input (Job Posting)
β
ML Model (Pattern Recognition - 50% weight)
β
Rule Engine (Deterministic Red Flags - 20% weight)
β
Gemini AI (Deep Contextual Analysis - 30% weight)
β
Final Risk Score (Weighted aggregation with explanation)
Backend:
- Python 3.10+
- FastAPI (REST API)
- Scikit-learn (Logistic Regression)
- Google Gemini AI (Deep analysis)
- Tesseract.js (OCR)
Frontend:
- Next.js 14 (React framework)
- TypeScript
- Tailwind CSS (Neobrutalism theme)
- Framer Motion (Animations)
- React Hot Toast (Notifications)
ML/AI:
- Logistic Regression (TF-IDF features)
- Rule-based detection engine
- Google Gemini API
- Python 3.10+ (for backend)
- Node.js 18+ and npm (for frontend)
- Google Gemini API Key (optional, for deep AI analysis)
-
Clone the repository
git clone <repository-url> cd "ScamRadar Reborn"
-
Backend Setup
# Install Python dependencies pip install -r requirements.txt # Train the ML model python -m scamradar_backend.training.train # Set Gemini API key (optional) # Windows PowerShell: $env:GOOGLE_API_KEY="your-api-key-here" # Linux/Mac: export GOOGLE_API_KEY="your-api-key-here" # Start backend server python -m scamradar_backend.main
-
Frontend Setup
# Install Node.js dependencies npm install # Start development server npm run dev
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
For comprehensive setup instructions, see SETUP_INSTRUCTIONS.md.
- Navigate to http://localhost:3000
- Choose Quick Scan or Detailed Scan mode
- Paste the job posting text (or upload a screenshot)
- Click "Analyze Job Posting"
- Review the risk assessment and detailed analysis
curl -X POST "http://localhost:8000/predict" \
-H "Content-Type: application/json" \
-d '{
"title": "Work from home - Earn quickly!!!",
"description": "Apply now. Earn money fast. Email hr@gmail.com",
"requirements": "No experience needed",
"company_profile": "",
"salary_range": "$5000 per week",
"employment_type": "Full-time"
}'curl -X POST "http://localhost:8000/deep-analysis" \
-H "Content-Type: application/json" \
-d '{
"title": "Software Engineer",
"description": "We are looking for an experienced developer...",
"requirements": "3+ years experience",
"company_profile": "Leading tech company since 2015",
"salary_range": "$80,000 - $120,000",
"employment_type": "Full-time"
}'Basic ML prediction with rule-based analysis.
Request Body:
{
"title": "string",
"description": "string",
"requirements": "string",
"company_profile": "string",
"salary_range": "string",
"employment_type": "string"
}Response:
{
"final_label": "FAKE" | "GENUINE",
"ml_probability": 0.85,
"rule_score": 0.3,
"final_risk_score": 0.75,
"ml_reasoning": {
"explanation": "Statistical pattern analysis detected...",
"tokens": ["earn", "quickly", "apply now"]
}
}Advanced analysis with Gemini AI (requires API key).
Request Body: Same as /predict
Response:
{
"final_label": "FAKE",
"ml_probability": 0.85,
"rule_score": 0.3,
"gemini_risk_level": "HIGH",
"final_risk_score": 0.89,
"ml_reasoning": {...},
"ai_analysis": {
"risk_level": "HIGH",
"manipulation_signals": [...],
"tone_analysis": {...},
"company_risk": {...},
"safety_recommendations": [...]
}
}Visit http://localhost:8000/docs for interactive Swagger UI documentation.
ScamRadar Reborn/
βββ app/ # Next.js app directory
β βββ page.tsx # Main landing page
β βββ layout.tsx # Root layout
β βββ globals.css # Global styles
βββ components/ # React components
β βββ landing/ # Landing page sections
β β βββ Navbar.tsx
β β βββ HeroSection.tsx
β β βββ ProblemSection.tsx
β β βββ ...
β βββ AnalyzerForm.tsx # Job posting input form
β βββ ResultCard.tsx # Results display
β βββ AIAnalysisSection.tsx # Gemini AI analysis
β βββ RiskMeter.tsx # Risk visualization
βββ lib/ # Utility libraries
β βββ api.ts # API client
β βββ ocr.ts # OCR functionality
β βββ storage.ts # Local storage
β βββ types.ts # TypeScript types
βββ scamradar_backend/ # Python backend
β βββ api/ # FastAPI routes
β β βββ app.py # Main API app
β β βββ predictor.py # ML prediction logic
β β βββ gemini_client.py # Gemini AI client
β βββ explainability/ # Explainability modules
β β βββ keyword_reasoner.py # ML keyword extraction
β β βββ rules.py # Rule-based detection
β βββ training/ # Model training
β β βββ train.py # Training script
β βββ preprocessing/ # Text preprocessing
β βββ models/ # Saved ML models
β βββ main.py # Backend entry point
βββ public/ # Static assets
βββ package.json # Node.js dependencies
βββ requirements.txt # Python dependencies
βββ README.md # This file
URGENT HIRING!
Earn βΉ5000 per day working from home!
No experience required!
Daily payments guaranteed!
Contact WhatsApp: +91-XXXXX
Apply now - Limited positions available!
Expected Result: HIGH RISK (85%+), multiple red flags detected
Software Engineer - Full Stack
About the Company:
Echo Booom is a leading digital marketing agency founded in 2015...
Job Description:
- Develop and maintain web applications
- Collaborate with cross-functional teams
- 3+ years experience required
Salary Range: $80,000 - $120,000 annually
Employment Type: Full-time, Remote
Expected Result: LOW RISK (20-30%), genuine indicators present
Backend:
GOOGLE_API_KEY: Google Gemini API key (optional)
Frontend:
NEXT_PUBLIC_API_URL: Backend API URL (default: http://localhost:8000)
The ML model is trained on the Kaggle dataset "Real or Fake: Fake Job Posting Prediction" (Shivam Bansal).
Training Command:
python -m scamradar_backend.training.trainModel Artifacts:
model.pkl: Trained Logistic Regression modelvectorizer.pkl: TF-IDF vectorizerthreshold.json: Optimized decision thresholdfake_indicators.json: High-weight scam indicators
- Neobrutalism Design: Bold, modern aesthetic with thick borders and shadows
- Smooth Animations: Framer Motion for engaging interactions
- Responsive Design: Works seamlessly on desktop, tablet, and mobile
- Dark Mode Ready: CSS variables support for theme switching
- PWA Support: Installable as a Progressive Web App
- History Tracking: Local storage for scan history
- Live Model Retraining from user feedback
- Social Media Dataset Expansion (LinkedIn, Instagram, Facebook)
- Adaptive AI Weighting based on scam type
- User Feedback Learning system
- Multi-language support
- Browser extension
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow existing code style and conventions
- Add tests for new features
- Update documentation as needed
- Ensure all linting checks pass
This project is licensed under the MIT License - see the LICENSE file for details.
- Dataset: Real or Fake: Fake Job Posting Prediction by Shivam Bansal
- AI Model: Google Gemini API
- Icons: Lucide React
- UI Framework: Next.js, Tailwind CSS
For issues, questions, or contributions:
- Issues: Open an issue on GitHub
- Documentation: See SETUP_INSTRUCTIONS.md
- Demo Script: See DEMO_SCRIPT.md
If you find this project helpful, please consider giving it a star on GitHub!
Built with β€οΈ to protect job seekers from fraud