How alfiashk/adaptive-phising-url-detector works
This is an adaptive phishing-URL detector with a React interface and FastAPI backend. Users submit a URL for feature-based model scoring plus bounded website inspection, then see a label, confidence, risk signals, and inspection checks. An admin can submit a verified label; the backend records it, retrains on the dataset plus feedback, and reloads the model. The API routes and backend calls are visible in the excerpts; the scan request from the UI is only partially shown, so that edge is marked unverified.
Main entry points: predict.py Prediction orchestration · train.py Model training · feedback.py Feedback recording · App.jsx Scanner and feedback UI
Components 13
User interface
- Scanner and feedback UI
frontend/src/App.jsx - React entry
frontend/src/main.jsx
API orchestration
- FastAPI routes
backend/main.py
URL analysis
- Prediction orchestration
backend/predict.py - URL feature extraction
backend/feature_extractor.py - Website inspection
backend/web_inspector.py - Model schema and labels
backend/constants.py
Model learning
- Trained classifier
model/phishing_model.pkl - Verified feedback records
model - Feedback recording
backend/feedback.py - Model training
backend/train.py - Phishing URL dataset
dataset/PhiUSIIL_Phishing_URL_Dataset.csv
Other components
- URL submitter
Connections 19
- URL submitter → Scanner and feedback UI: submits URL
frontend/src/App.jsx - React entry → Scanner and feedback UI: renders
frontend/src/main.jsx - Scanner and feedback UI → FastAPI routes: requests scan
- Scanner and feedback UI → FastAPI routes: posts feedback
frontend/src/App.jsx - FastAPI routes → Prediction orchestration: routes prediction
backend/main.py - FastAPI routes → Feedback recording: routes feedback
backend/main.py - Prediction orchestration → URL feature extraction: extracts features
backend/predict.py - Prediction orchestration → Website inspection: inspects URL
backend/predict.py - Prediction orchestration → Model schema and labels: uses schema
backend/predict.py - Prediction orchestration → Trained classifier: loads and scores
backend/predict.py - Prediction orchestration → Verified feedback records: reads labels
backend/predict.py - Feedback recording → Verified feedback records: appends labels
backend/feedback.py - Feedback recording → Model training: triggers training
backend/feedback.py - Feedback recording → Prediction orchestration: reloads model
backend/feedback.py - Model training → Phishing URL dataset: reads training data
backend/train.py - Model training → Verified feedback records: reads feedback
backend/train.py - Model training → URL feature extraction: extracts features
backend/train.py - Model training → Model schema and labels: uses schema
backend/train.py - Model training → Trained classifier: writes classifier
backend/train.py