Students often receive internship and job opportunities through messaging apps, email, and social media. Many offers look realistic at first glance but hide suspicious demands such as upfront payments, urgent deadlines, or requests for sensitive information. ScamCheck helps students check opportunity text and screenshots before they trust a message.
ScamCheck is a beginner-friendly web app that combines rule-based scam detection with a lightweight machine learning model. Users can paste an opportunity message or upload a screenshot, and the app returns a risk score, risk level, indicator explanations, recommended actions, and a history of prior analyses.
- Paste internship or job opportunity text for analysis
- Upload a screenshot and extract text with OCR
- Rule-based scam detection for payment, urgency, salary, selection, contact, URL, and sensitive data requests
- Lightweight ML/NLP prediction using TF-IDF + Logistic Regression
- Transparent scoring with explanations and recommendations
- History dashboard for saved analyses
- SQLite database for local persistence
- Modern responsive UI
ScamCheck follows a simple modular architecture:
- Frontend: React + Vite
- Backend: FastAPI + SQLAlchemy + SQLite
- OCR: Tesseract + pytesseract + Pillow
- ML: scikit-learn TF-IDF + Logistic Regression
- React
- JavaScript
- FastAPI
- Python
- SQLite
- SQLAlchemy
- scikit-learn
- pandas
- numpy
- pytesseract
- Pillow
scamcheck/
├── backend/
│ ├── main.py
│ ├── database.py
│ ├── models.py
│ ├── schemas.py
│ ├── routes/
│ │ ├── __init__.py
│ │ └── analysis.py
│ ├── services/
│ │ ├── __init__.py
│ │ ├── analyzer.py
│ │ ├── ocr_service.py
│ │ └── history_service.py
│ ├── ml/
│ │ ├── train_model.py
│ │ ├── model.py
│ │ ├── dataset.csv
│ │ ├── scam_model.pkl
│ │ └── vectorizer.pkl
│ ├── uploads/
│ ├── requirements.txt
│ └── .env
├── frontend/
│ ├── src/
│ │ ├── App.jsx
│ │ ├── main.jsx
│ │ ├── pages/
│ │ │ ├── Home.jsx
│ │ │ ├── Analyze.jsx
│ │ │ ├── ScreenshotAnalysis.jsx
│ │ │ ├── Results.jsx
│ │ │ └── History.jsx
│ │ ├── services/
│ │ │ └── api.js
│ │ └── styles.css
│ ├── index.html
│ ├── package.json
│ └── vite.config.js
├── .gitignore
├── README.md
└── demo_messages.py
- Clone the project.
- Create a Python virtual environment.
- Install backend dependencies:
cd scamcheck/backend pip install -r requirements.txt - Create your local environment file from the example:
Then set your Google Places API key in
copy .env.example .env
.env:GOOGLE_PLACES_API_KEY=your_google_places_api_key_here
- Install frontend dependencies:
cd scamcheck/frontend npm install - Install Tesseract OCR:
- Windows: install from https://github.com/UB-Mannheim/tesseract/wiki
- Ubuntu/Debian:
sudo apt-get install tesseract-ocr - macOS:
brew install tesseract
cd scamcheck/backend
uvicorn main:app --reload --host 0.0.0.0 --port 8000cd scamcheck/frontend
npm run dev -- --host 0.0.0.0The frontend is configured for Vercel from the repository root. The root
vercel.json builds frontend and serves the React SPA entrypoint, including
client-side routes.
The FastAPI backend should be deployed separately because it uses SQLite,
filesystem uploads, Tesseract OCR, and scikit-learn. Suitable Python hosting
must provide those runtime dependencies and persistent storage if history and
uploads need to survive restarts. The included Dockerfile and Procfile
provide the backend startup configuration.
- Import the repository into Vercel with the repository root as the project
root. Do not set
frontendas the root directory when using the rootvercel.json. - Add this Vercel environment variable for Production:
VITE_API_BASE_URL=https://your-backend.example.com/api
- Deploy. The site will be available at the Vercel project domain.
For local development, keep frontend/.env based on
frontend/.env.example, which points to http://localhost:8000/api.
Deploy the backend directory to a Python host that supports FastAPI and
Tesseract. Start it with:
gunicorn -k uvicorn.workers.UvicornWorker main:app --bind 0.0.0.0:$PORTSet these backend variables on that host:
APP_ENV=production
PORT=8000
DATABASE_URL=sqlite:///./scamcheck.db
CORS_ORIGINS=https://your-vercel-project.vercel.app
GOOGLE_PLACES_API_KEY=your_google_places_api_key
TESSERACT_CMD=tesseractSet CORS_ORIGINS to the exact deployed Vercel origin, without a trailing
slash. The frontend API URL must end in /api, for example
https://your-backend.example.com/api. The text and screenshot endpoints are
then available at /api/analyze and /api/analyze-image.
cd scamcheck/backend/ml
python train_model.pyPOST /api/analyzePOST /api/analyze-imageGET /api/historyGET /api/history/{id}GET /api/health
We are hiring interns. You are selected without interview. Pay a registration fee of ₹299 today to confirm your placement. Guaranteed salary of ₹45,000 per month from home.
{
"risk_score": 85,
"risk_level": "HIGH RISK",
"indicators": [
"payment request",
"urgency",
"instant selection",
"unrealistic salary"
],
"explanation": [
"The opportunity asks for a registration fee.",
"The message pushes immediate action and payment.",
"The candidate is allegedly selected without interview."
],
"recommendation": "Do not pay any fee and verify the company independently before proceeding."
}- The rule-based checks rely on text patterns and are best used as a warning system rather than a definitive verdict.
- The ML model is a lightweight demonstration model and should be retrained with larger real-world datasets.
- OCR quality depends on screenshot clarity and lighting.
- Add a better fraud dataset and model tuning
- Add user login for personal history
- Add email and WhatsApp parsing utilities
- Include company verification API integration
- Add multi-language support for scam detection
This project is designed for educational and demo purposes. It should be used as a decision-support tool, not as a legal or definitive scam detector.