How nandv2007/redflag--phishing-and-fraud-alert-platform works
RedFlag is a multilingual fraud-alert platform: users submit text, URLs, screenshots, or QR codes; the service analyzes evidence, returns an explainable risk result, and supports campaign correlation and community reporting. The map includes the preserved classic scanner and documented campaign, moderation, and threat-pulse features. Some frontend/backend and unsampled-subsystem links are based on README contracts; source excerpts do not expose every implementation detail.
Main entry points: analyzer.py Unified analysis engine · intel_routes.py Intelligence endpoints · api.ts Intelligence API client · db.py Intelligence database
Components 25
User experience
- Application shell
frontend/src/App.tsx - Analyze inputs
frontend/src/intel/AnalyzeHub.tsx - Analysis results
frontend/src/intel/ResultView.tsx - Campaigns and feed
frontend/src/intel/Community.tsx - Campaign view
frontend/src/intel/CampaignView.tsx - Classic scanners
frontend/src/components/UrlScanner.tsx - Intelligence API client
frontend/src/intel/api.ts - Classic API client
frontend/src/services/api.ts
API and intake
- Intelligence endpoints
backend/app/api/intel_routes.py - Classic endpoints
backend/app/api/endpoints.py - Image and QR adapters
backend/app/intel/adapters.py - API and result schemas
backend/app/models/schemas.py - HTTP service
backend/app/main.py
Evidence analysis
- Unified analysis engine
backend/app/intel/analyzer.py - Language analysis
backend/app/intel/language.py - Scam intent
backend/app/intel/intent.py - Text classifier
backend/app/intel/classifier.py - URL risk analysis
backend/app/services/url_analyzer.py - Brand matching
backend/app/services/brand_matcher.py - Risk scoring
backend/app/services/risk_scorer.py
Threat intelligence
- Entity extraction
backend/app/intel/entities.py - Campaign correlation
backend/app/intel/graph.py - Community reports
backend/app/intel/reports.py
Persistence
- Intelligence database
backend/app/intel/db.py
Other components
- User
Connections 33
- User → Application shell: uses
- Application shell → Analyze inputs: opens analysis
frontend/src/App.tsx - Application shell → Campaigns and feed: opens feed
frontend/src/App.tsx - Application shell → Campaign view: opens campaigns
frontend/src/App.tsx - Analyze inputs → Intelligence API client: submits inputs
frontend/src/intel/AnalyzeHub.tsx - Intelligence API client → Intelligence endpoints: calls analysis API
- Intelligence endpoints → Image and QR adapters: decodes uploads
backend/app/api/intel_routes.py - Intelligence endpoints → Unified analysis engine: analyzes inputs
backend/app/api/intel_routes.py - Intelligence endpoints → Community reports: handles reports
backend/app/api/intel_routes.py - Intelligence endpoints → Intelligence database: loads analysis
backend/app/api/intel_routes.py - Intelligence endpoints → API and result schemas: validates requests
backend/app/api/intel_routes.py - Unified analysis engine → Language analysis: detects language
backend/app/intel/analyzer.py - Unified analysis engine → Scam intent: classifies intent
backend/app/intel/analyzer.py - Unified analysis engine → Text classifier: uses model
backend/app/intel/analyzer.py - Unified analysis engine → URL risk analysis: analyzes URLs
backend/app/intel/analyzer.py - URL risk analysis → Brand matching: checks brands
backend/app/services/url_analyzer.py - Unified analysis engine → Risk scoring: scores evidence
backend/app/intel/analyzer.py - Unified analysis engine → Entity extraction: extracts entities
backend/app/intel/analyzer.py - Unified analysis engine → Campaign correlation: correlates threats
backend/app/intel/analyzer.py - Unified analysis engine → Intelligence database: stores result
backend/app/intel/analyzer.py - Campaign correlation → Intelligence database: reads and writes
backend/app/intel/graph.py - Community reports → Intelligence database: persists reports
backend/app/intel/reports.py - Community reports → Campaign correlation: updates campaigns
backend/app/intel/reports.py - Intelligence API client → Analysis results: returns result
frontend/src/intel/ResultView.tsx - Campaigns and feed → Intelligence API client: loads feed
frontend/src/intel/Community.tsx - Campaign view → Intelligence API client: loads campaign
frontend/src/intel/CampaignView.tsx - User → Classic scanners: scans URL or SMS
- Classic scanners → Classic API client: requests scan
frontend/src/components/UrlScanner.tsx - Classic API client → Classic endpoints: calls scan API
frontend/src/services/api.ts - Classic endpoints → URL risk analysis: analyzes URL
backend/app/api/endpoints.py - HTTP service → Intelligence endpoints: mounts routes
backend/app/main.py - HTTP service → Classic endpoints: mounts routes
backend/app/main.py - HTTP service → Intelligence database: initializes database
backend/app/main.py