How paldhaduk7-png/ai-scam-phishing-detector works
ScamShield is a web platform for scanning email, SMS, and URLs, then presenting threat verdicts and security activity. The main workflow runs from the React detection interface through the FastAPI API to unified ML or email-only deep-learning inference; authenticated scans are recorded for history and dashboard views. Separate product branches cover account access and profiles, Gmail import, and administrative operations. README capability descriptions supplement the sampled excerpts; some internal router-to-service wiring is not shown, so uncertain links are omitted.
Main entry points: auth.py Auth routes · main.py FastAPI gateway · database.py Database access · gmail.py Gmail routes
Components 23
Web client
- React application
frontend/src/App.jsx - Scan interface
frontend/src/pages/Detect.jsx - Account and profile
frontend/src/store/slices/authSlice.js - History and dashboard
frontend/src/pages/History.jsx - API client
frontend/src/services/api.js
API and detection
- FastAPI gateway
backend/app/main.py - Detection routes
backend/app/routers/detections.py - Detection dispatcher
backend/app/services/unified_detector.py - Admin operations
backend/app/routers/admin.py
Identity and integrations
- Auth routes
backend/app/routers/auth.py - Auth service
backend/app/services/auth_service.py - Gmail routes
backend/app/routers/gmail.py - Gmail integration
backend/app/services/gmail_service.py - Email delivery
backend/app/services/email_service.py
Security records
- User and scan records
backend/app/models.py - Database access
backend/app/database.py
Inference engines
- Traditional ML
backend/app/services/detector.py - Deep-learning detector
backend/app/services/dl_detector.py - ML pipeline
ml/src/predict.py - DL pipeline
dl/src/predict.py
Other components
- User
- Google services
- Cloudinary
Connections 28
- User → React application: uses
- React application → Scan interface: routes to
- React application → Account and profile: checks session
- Scan interface → API client: submits scans
- Account and profile → API client: requests account
- History and dashboard → API client: requests records
- API client → FastAPI gateway: sends HTTP
- FastAPI gateway → Detection routes: dispatches
- Detection routes → Detection dispatcher: runs detection
- Detection dispatcher → Traditional ML: uses ML
- Detection dispatcher → Deep-learning detector: uses DL
- Traditional ML → ML pipeline: predicts with
- Deep-learning detector → DL pipeline: predicts with
- Detection routes → Database access: records scans
- Database access → User and scan records: reads and writes
- FastAPI gateway → Auth routes: dispatches
- Auth routes → Auth service: validates sessions
- Auth routes → Database access: reads and writes
- Auth routes → Email delivery: sends recovery email
- Auth routes → Google services: OAuth exchange
- Auth routes → Cloudinary: manages avatars
- FastAPI gateway → Gmail routes: dispatches
- Gmail routes → Gmail integration: fetches messages
- Gmail integration → Google services: Gmail API
- Gmail routes → Detection dispatcher: analyzes messages
- Gmail routes → Database access: records scans
- FastAPI gateway → Admin operations: dispatches
- Admin operations → Database access: reads and writes