How vamshikpatel/propay works
ProPay is a UPI and digital-payment fraud shield. A user submits a payment URI or link through the frontend; the Flask API passes simulation requests to the risk orchestrator, which applies fast deterministic checks, conditionally requests AI forensics, then records the decision and dispatches alerts. The main internal layer is that orchestrator, coordinating rule evaluation, forensic analysis, policy outcomes, email, and audit events. The README documents URL unwrapping, velocity checks, ledger verification, SMTP configuration, and an offline demo; some implementation details were not sampled, so those links are included only where documented.
Main entry points: orchestrator.py Risk orchestrator · server.py Flask API · email_agent.py Alert dispatcher · app.js Payment UI
Components 11
Client experience
- Payment UI
frontend/js/app.js - Flask API
backend/server.py
Risk evaluation
- Risk orchestrator
backend/orchestrator.py - URI and risk rules
backend/rule_engine.py - AI forensics
backend/ollama_agent.py - Local Ollama
- Payment action
backend/orchestrator.py
Response services
- Alert dispatcher
backend/email_agent.py - SMTP relay
Audit trail
- Hash-chain ledger
backend/event_ledger.py
Other components
- Payment user
Connections 12
- Payment user → Payment UI: submits intent
README.md - Payment UI → Flask API: requests simulation
README.md - Flask API → Risk orchestrator: processes transaction
backend/server.py - Risk orchestrator → URI and risk rules: evaluates intent
backend/orchestrator.py - Risk orchestrator → AI forensics: investigates conditionally
backend/orchestrator.py - AI forensics → Local Ollama: requests analysis
README.md - Risk orchestrator → Payment action: determines action
backend/orchestrator.py - Risk orchestrator → Alert dispatcher: dispatches alert
backend/orchestrator.py - Alert dispatcher → SMTP relay: sends mail
README.md - Risk orchestrator → Hash-chain ledger: appends decision
backend/orchestrator.py - Flask API → Alert dispatcher: configures and tests
backend/server.py - Flask API → Hash-chain ledger: reads status
backend/server.py