How 404avinash/sampati_v2 works
SAMPATI V2 and Fox Guard form isolated core and edge fraud-defense planes. A phone-side workflow detects scam context, assesses device risk, and warns or blocks before payment; the core workflow evaluates UPI transactions, enriches risk with institutional and network intelligence, issues a verdict, and supports investigation and statutory reporting. The README documents their REST/FCM bridge. Relationships below use README or SOURCE INDEX evidence; unsampled subsystems are represented only where documented or indexed.
Main entry points: upi_cases.py Evaluation and Cases · LomdiAccessibilityService.kt Payment Intercept · main.py FastAPI Application · RiskManager.kt Context Risk
Components 25
Fox Guard Edge
- Device Signals
lomdi-guard/app/src/main/java/com/lomdi/dsih/CallReceiver.kt - SMS Analysis
lomdi-guard/app/src/main/java/com/lomdi/dsih/domain/usecase/SmsAnalyzer.kt - Context Risk
lomdi-guard/app/src/main/java/com/lomdi/dsih/domain/usecase/RiskManager.kt - Payment Intercept
lomdi-guard/app/src/main/java/com/lomdi/dsih/LomdiAccessibilityService.kt
SAMPATI Core
- Edge Telemetry API
app/api/telemetry.py - UPI Gate API
app/api/upi.py - Evaluation and Cases
app/services/upi_cases.py - Risk Scoring
app/engine/upi_scorer.py - Institutional Adapters
app/adapters/service.py - FastAPI Application
app/main.py
Intelligence Mesh
- Fraud Graph
app/services/graph_service.py - Federation
app/federation/coordinator.py - Threat Intelligence
app/services/threat_intel_service.py - Intel API
app/api/intel.py
Cases and Forensics
- Case Persistence
app/models/upi_persistence.py - SAR Reporting
app/forensics/sar_pdf.py - Forensic Copilot
app/services/gemini_service.py
Analyst Console
- Analyst Dashboard
frontend/src/App.jsx - Live App State
frontend/src/context/AppStateContext.jsx - Dashboard API Client
frontend/src/services/api.js
Other components
- Phone User
- Analyst
- UPI Switch
- Google Gemini
- FCM
Connections 24
- Phone User → Device Signals: generates signals
- Device Signals → Context Risk: contributes context
- SMS Analysis → Context Risk: contributes context
- Context Risk → Payment Intercept: drives interception
lomdi-guard/app/src/main/java/com/lomdi/dsih/LomdiAccessibilityService.kt - Payment Intercept → Edge Telemetry API: posts events
- Payment Intercept → Intel API: posts signals
- UPI Switch → UPI Gate API: submits transaction
- UPI Gate API → Evaluation and Cases: delegates evaluation
app/api/upi.py - Evaluation and Cases → Risk Scoring: scores transaction
app/services/upi_cases.py - Evaluation and Cases → Institutional Adapters: queries signals
app/services/upi_cases.py - Evaluation and Cases → Federation: coordinates consensus
app/services/upi_cases.py - Evaluation and Cases → Fraud Graph: updates graph
- Evaluation and Cases → Case Persistence: persists cases
app/services/upi_cases.py - Threat Intelligence → Fraud Graph: updates graph
app/services/threat_intel_service.py - Intel API → Threat Intelligence: ingests signals
app/api/intel.py - Evaluation and Cases → SAR Reporting: generates reports
app/services/upi_cases.py - Evaluation and Cases → Forensic Copilot: requests assistance
app/services/upi_cases.py - Forensic Copilot → Google Gemini: calls model
- FastAPI Application → UPI Gate API: registers routes
app/main.py - Analyst → Analyst Dashboard: uses console
- Analyst Dashboard → Live App State: provides state
frontend/src/App.jsx - Live App State → Dashboard API Client: fetches data
frontend/src/context/AppStateContext.jsx - Dashboard API Client → FastAPI Application: calls REST API
- FastAPI Application → FCM: sends alerts