How rohit25-git/pravaah works
PRAVAAH forecasts ATM cash-out risk from transaction, complaint, and ATM observations, then turns elevated predictions into alerts and operational intelligence for law-enforcement and banking users. The frontend provides command, map, prediction, investigation, graph, case, report, and bank workflows through an API client; the backend exposes these through FastAPI and persists domain records. The prediction and alert path is supported by sampled source; other capability branches are documented in the README and their detailed implementation was not sampled.
Main entry points: prediction_service.py Prediction runner · session.py PostGIS database · main.py FastAPI app · api.ts API client
Components 22
User console
- Portal shell
frontend/src/App.tsx - API client
frontend/src/services/api.ts - Graph explorer
frontend/src/pages/GraphIntelligencePage.tsx - GIS heatmap
frontend/src/components/LeafletMap.tsx
Backend API
- FastAPI app
backend/app/main.py - V1 endpoints
backend/app/api/v1
Risk intelligence
- Prediction runner
backend/app/services/prediction_service.py - ML scoring pipeline
backend/app/ml/prediction_service.py - Feature engineering
backend/app/ml/features.py - Weighted risk scoring
backend/app/ml/scoring.py - Network intelligence
backend/app/graph/network_service.py
Response workflows
- Alert evaluation
backend/app/alerts/engine.py - Live notifications
backend/app/alerts/notification.py - AI copilot
backend/app/ai/copilot.py - Intelligence reports
backend/app/services/report_service.py - Activity simulation
backend/app/services/simulation_service.py
Domain storage
- PostGIS database
backend/app/database/session.py - Transactions & complaints
backend/app/models/transaction.py - Predictions & risk factors
backend/app/models/prediction.py - Cases & evidence
backend/app/models/case.py - Users & audit records
backend/app/models/user.py
Other components
- Analysts & officers
Connections 33
- Analysts & officers → Portal shell: uses
- Portal shell → API client: requests data
frontend/src/App.tsx - Portal shell → Graph explorer: renders
frontend/src/App.tsx - Graph explorer → API client: loads graph data
frontend/src/pages/GraphIntelligencePage.tsx - GIS heatmap → API client: uses map data
- API client → FastAPI app: calls HTTP & WebSocket
frontend/src/services/api.ts - FastAPI app → V1 endpoints: mounts routers
backend/app/main.py - V1 endpoints → Prediction runner: dispatches predictions
- Prediction runner → Transactions & complaints: reads observations
backend/app/services/prediction_service.py - Prediction runner → Feature engineering: builds features
backend/app/services/prediction_service.py - Prediction runner → Weighted risk scoring: scores risk
backend/app/services/prediction_service.py - Prediction runner → Predictions & risk factors: writes predictions
backend/app/services/prediction_service.py - Prediction runner → Alert evaluation: evaluates alerts
backend/app/services/prediction_service.py - ML scoring pipeline → Feature engineering: calculates features
backend/app/ml/prediction_service.py - ML scoring pipeline → Weighted risk scoring: calculates composite score
backend/app/ml/prediction_service.py - Alert evaluation → Live notifications: broadcasts alerts
backend/app/alerts/engine.py - FastAPI app → Live notifications: serves alert socket
backend/app/main.py - FastAPI app → PostGIS database: initializes storage
backend/app/main.py - Transactions & complaints → PostGIS database: maps tables
backend/app/models/transaction.py - Predictions & risk factors → PostGIS database: maps tables
backend/app/models/prediction.py - Users & audit records → PostGIS database: maps tables
backend/app/models/user.py - Cases & evidence → PostGIS database: maps tables
backend/app/models/case.py - Network intelligence → Cases & evidence: uses case relations
backend/app/graph/network_service.py - AI copilot → Predictions & risk factors: grounds answers
backend/app/ai/copilot.py - AI copilot → Cases & evidence: grounds answers
backend/app/ai/copilot.py - Intelligence reports → Predictions & risk factors: reads intelligence
backend/app/services/report_service.py - Intelligence reports → Cases & evidence: reads case evidence
backend/app/services/report_service.py - Activity simulation → Transactions & complaints: creates activity
backend/app/services/simulation_service.py - Activity simulation → Alert evaluation: evaluates alerts
backend/app/services/simulation_service.py - Analysts & officers → AI copilot: asks decision support
- Analysts & officers → Intelligence reports: generates bulletins
- Analysts & officers → Network intelligence: traces entities
- Analysts & officers → Activity simulation: triggers simulation