How 07mickey/phishtrace works
PhishTrace is a passive URL-forensics product: a user submits a URL in the browser, the Flask API validates and analyzes its text, a native C++ engine supplies detection evidence, and the interface presents an explainable assessment. The graph also includes authentication and guest limits, local scan history, algorithm learning tools, and the interactive visualization. Relationships are based on excerpts, SOURCE INDEX references, and README statements; unsampled details are represented only where the README documents the capability.
Main entry points: scan.py Scan endpoint · main.cpp Engine input and dispatch · scanner.js Scan interaction · main.js App bootstrap
Components 29
Web application
- App bootstrap
frontend/src/js/main.js - Scan interaction
frontend/src/js/scanner.js - API client
frontend/src/js/api.js - Scan report
frontend/src/js/scanReport.js - Scan history
frontend/src/js/history.js - Account interface
frontend/src/js/auth.js - Navigation
frontend/src/js/navigation.js - UI motion utilities
frontend/src/js/motion.js
Backend API
- Flask application
PhishTrace_Backend/backend/app.py - Scan endpoint
PhishTrace_Backend/backend/routes/scan.py - URL validation
PhishTrace_Backend/backend/services/url_validator.py - Feature extraction
PhishTrace_Backend/backend/services/feature_extractor.py - Assessment policy
PhishTrace_Backend/backend/services/assessment_service.py - Engine bridge
PhishTrace_Backend/backend/services/dsa_engine_bridge.py
Detection engine
- Engine input and dispatch
engine/src/main.cpp - URL parser
engine/src/url_parser.cpp - Trie matching
engine/src/trie.cpp - Reference lookup
engine/src/hash_lookup.cpp - Lookalike distance
engine/src/edit_distance.cpp - Engine JSON
engine/src/json_helper.h
Access and storage
- Guest allowance
PhishTrace_Backend/backend/services/guest_service.py - User accounts
PhishTrace_Backend/backend/services/user_service.py - Authentication routes
PhishTrace_Backend/backend/routes/auth.py - Rate limiter
PhishTrace_Backend/backend/utils/rate_limiter.py - SQLite persistence
PhishTrace_Backend/backend/extensions.py
Learning and visualization
- Algorithm laboratory
frontend/src/js/algorithms/labView.js - Algorithm simulators
frontend/src/js/algorithms/simulators.js - Threat visualization
frontend/src/js/visualization/scene.js
Other components
- URL investigator
Connections 33
- URL investigator → Scan interaction: submits URL
- App bootstrap → Scan interaction: initializes
frontend/src/js/main.js - Scan interaction → API client: requests scan
frontend/src/js/scanner.js - API client → Scan endpoint: sends API request
README.md - Scan endpoint → URL validation: validates URL
PhishTrace_Backend/backend/routes/scan.py - Scan endpoint → Feature extraction: extracts features
PhishTrace_Backend/backend/routes/scan.py - Scan endpoint → Engine bridge: requests engine analysis
PhishTrace_Backend/backend/routes/scan.py - Scan endpoint → Assessment policy: applies policy
PhishTrace_Backend/backend/routes/scan.py - Scan endpoint → Guest allowance: checks allowance
PhishTrace_Backend/backend/routes/scan.py - Engine bridge → Engine input and dispatch: exchanges JSON
README.md - Engine input and dispatch → URL parser: parses URL
engine/src/main.cpp - Engine input and dispatch → Trie matching: matches patterns
engine/src/main.cpp - Engine input and dispatch → Reference lookup: checks references
engine/src/main.cpp - Engine input and dispatch → Lookalike distance: checks lookalikes
engine/src/main.cpp - Engine input and dispatch → Engine JSON: formats response
engine/src/main.cpp - Scan endpoint → API client: returns assessment
README.md - Scan interaction → Scan report: renders details
frontend/src/js/scanner.js - Scan interaction → Scan history: updates scans
frontend/src/js/scanner.js - Scan history → Scan report: opens details
frontend/src/js/history.js - App bootstrap → Account interface: initializes
frontend/src/js/main.js - Account interface → API client: calls auth API
frontend/src/js/auth.js - Authentication routes → User accounts: authenticates users
PhishTrace_Backend/backend/routes/auth.py - Authentication routes → Rate limiter: limits attempts
PhishTrace_Backend/backend/routes/auth.py - Scan endpoint → SQLite persistence: stores scan result
PhishTrace_Backend/backend/extensions.py - Guest allowance → SQLite persistence: persists usage
PhishTrace_Backend/backend/services/guest_service.py - User accounts → SQLite persistence: persists accounts
PhishTrace_Backend/backend/services/user_service.py - App bootstrap → Navigation: initializes
frontend/src/js/main.js - Navigation → Scan history: opens history
frontend/src/js/navigation.js - Navigation → Algorithm laboratory: opens laboratory
frontend/src/js/navigation.js - Algorithm laboratory → Algorithm simulators: uses algorithms
frontend/src/js/algorithms/labView.js - App bootstrap → Threat visualization: initializes scene
frontend/src/js/main.js - Account interface → UI motion utilities: uses UI utilities
frontend/src/js/auth.js - Scan history → UI motion utilities: uses UI utilities
frontend/src/js/history.js