How balavishnu437-ai/phishguard works
PhishGuard accepts a URL through its web scanner, sends it to the FastAPI service, extracts URL and page features, applies a trained classifier plus safety overrides, and returns a verdict for presentation. The API also exposes scan history, statistics, and threat-intelligence capabilities; the React application includes scanning, dashboard, history, and threat-analysis views. The README documents REST and persistence behavior. Some route-to-storage and page-to-API wiring is unsampled, so those documented connections are marked dashed.
Main entry points: server.py FastAPI Service · ThreatIntel.jsx Threat Intel View · App.js React App Router · predictor.py Prediction and Overrides
Components 20
Web Application
- React App Router
frontend/src/App.js - URL Scanner
frontend/src/pages/Scanner.jsx - Verdict Presentation
frontend/src/components/ResultCard.jsx - Threat Dashboard
frontend/src/pages/Dashboard.jsx - Scan History View
frontend/src/pages/History.jsx - Threat Intel View
frontend/src/pages/ThreatIntel.jsx
API and Persistence
- FastAPI Service
backend/server.py - MongoDB
- Local JSON Fallback
backend/.data
Detection Engine
- Prediction and Overrides
backend/predictor.py - Feature Extraction
backend/feature_extractor.py - URL Validation and Risk
backend/utils.py - Decision Tree Pipeline
backend/models/phishing_decision_tree_pipeline.pkl
Threat Intelligence
- URL Forensics
frontend/src/components/URLForensics.jsx - Threat Risk Meter
frontend/src/components/ThreatRiskMeter.jsx - MITRE Intel Cards
frontend/src/components/ThreatIntelCards.jsx - Security Recommendations
frontend/src/components/SecurityRecommendations.jsx - Live Threat Map
frontend/src/components/LiveThreatMap.jsx - Threat Timeline
frontend/src/components/ThreatHistoryTimeline.jsx
Other components
- User / Analyst
Connections 22
- User / Analyst → React App Router: uses
README.md - React App Router → URL Scanner: routes
frontend/src/App.js - React App Router → Threat Dashboard: routes
frontend/src/App.js - React App Router → Scan History View: routes
frontend/src/App.js - React App Router → Threat Intel View: routes
frontend/src/App.js - URL Scanner → FastAPI Service: submits URL
README.md - FastAPI Service → Prediction and Overrides: invokes scan
backend/server.py - Prediction and Overrides → Feature Extraction: extracts features
backend/predictor.py - Prediction and Overrides → Decision Tree Pipeline: classifies features
README.md - Prediction and Overrides → URL Validation and Risk: validates and scores
backend/predictor.py - FastAPI Service → MongoDB: persists records
README.md - FastAPI Service → Local JSON Fallback: falls back to
README.md - FastAPI Service → URL Scanner: returns verdict
README.md - URL Scanner → Verdict Presentation: presents result
- Threat Dashboard → FastAPI Service: requests statistics
README.md - Scan History View → FastAPI Service: requests history
README.md - Threat Intel View → URL Forensics: presents forensics
README.md - Threat Intel View → Threat Risk Meter: presents risk
README.md - Threat Intel View → MITRE Intel Cards: presents intel
README.md - Threat Intel View → Security Recommendations: presents guidance
README.md - Threat Intel View → Live Threat Map: presents map
README.md - Scan History View → Threat Timeline: presents timeline
README.md