How makwana23-harshil/cyber-sentinel works
CyberSentinel Pro is a browser-based threat-detection platform: users authenticate, submit SMS, email, or URLs, receive risk verdicts and evidence, and review scan history; admins manage users and platform-wide analytics. The API detection routes dispatch to modality detectors, persist scans, and serve dashboards. README capabilities include email parsing, ML and heuristic scoring, deep link inspection, optional reputation/LLM checks, and user/admin views. Several route implementations and frontend modules are unsampled, so only documented or indexed relationships are shown where direct wiring is not excerpted.
Main entry points: detection_routes.py Detection API · link_inspector.py Deep link inspector · database.py MongoDB · middleware.py JWT authorization
Components 26
Browser experience
- Scanner and dashboards
frontend/js/scan.js - Browser auth
frontend/js/auth.js - Admin console
frontend/js/admin.js - History view
frontend/js/history.js
API and identity
- Flask app
backend/app.py - Auth endpoints
backend/auth/routes.py - JWT authorization
backend/auth/middleware.py - Detection API
backend/api/detection_routes.py - User API
backend/api/user_routes.py - Admin API
backend/api/admin_routes.py
Threat analysis
- SMS detector
backend/detection/sms/sms_detector.py - Email detector
backend/detection/email/email_detector.py - Email parser
backend/services/email_parser.py - URL detector
backend/detection/url/url_detector.py - Deep link inspector
backend/detection/link/link_inspector.py - LLM inspection
backend/detection/link/llm_inspector.py - Heuristic risk engine
backend/services/rule_engine.py - URL features
backend/detection/url/features.py
Persistence and reporting
- MongoDB
backend/database.py - Scan records
backend/models/scan_history.py - Usage analytics
backend/routes/analytics.py
External intelligence
- VirusTotal
- Google Safe Browsing
- Gemini API
Other components
- User
- Administrator
Connections 38
- User → Scanner and dashboards: submits scans
README.md - User → Browser auth: signs in
README.md - Administrator → Admin console: manages platform
README.md - Scanner and dashboards → Detection API: requests scans
- Browser auth → Auth endpoints: authenticates
- Admin console → Admin API: requests administration
- History view → User API: requests history
- Flask app → Auth endpoints: registers
backend/app.py - Flask app → Detection API: registers
backend/app.py - Flask app → User API: registers
backend/app.py - Flask app → Admin API: registers
backend/app.py - Auth endpoints → MongoDB: reads and updates
backend/auth/routes.py - Auth endpoints → JWT authorization: issues tokens
backend/auth/routes.py - JWT authorization → MongoDB: loads user
backend/auth/middleware.py - Detection API → JWT authorization: guards routes
backend/api/detection_routes.py - User API → JWT authorization: guards routes
backend/api/user_routes.py - Admin API → JWT authorization: guards routes
backend/api/admin_routes.py - Detection API → SMS detector: dispatches SMS
backend/api/detection_routes.py - Detection API → Email detector: dispatches email
backend/api/detection_routes.py - Detection API → URL detector: dispatches URLs
backend/api/detection_routes.py - Detection API → LLM inspection: requests email analysis
backend/api/detection_routes.py - Detection API → MongoDB: saves scans
backend/api/detection_routes.py - SMS detector → Deep link inspector: inspects extracted links
backend/detection/sms/sms_detector.py - Email detector → Deep link inspector: inspects embedded links
backend/detection/email/email_detector.py - URL detector → Deep link inspector: deep-inspects URL
backend/detection/url/url_detector.py - URL detector → URL features: extracts features
backend/detection/url/url_detector.py - Deep link inspector → LLM inspection: requests AI analysis
backend/detection/link/link_inspector.py - Deep link inspector → VirusTotal: checks reputation
backend/detection/link/link_inspector.py - Deep link inspector → Google Safe Browsing: checks safe browsing
README.md - LLM inspection → Gemini API: generates analysis
backend/detection/link/llm_inspector.py - User API → MongoDB: queries user scans
backend/api/user_routes.py - Admin API → MongoDB: manages users and scans
backend/api/admin_routes.py - Usage analytics → MongoDB: reports activity
- Detection API → Scan records: records scan details
- Email parser → Email detector: parses message content
- Heuristic risk engine → SMS detector: scores suspicious signals
- Heuristic risk engine → Email detector: scores suspicious signals
- Heuristic risk engine → URL detector: scores suspicious signals