How bhaskararamkarri/revivex works
ReviveX is a payment-failure recovery control center. Its documented workflow ingests gateway events, detects at-risk transactions, diagnoses failures, applies deterministic safety decisions, and executes authorized recovery; verified payment events ground recovered-revenue reporting. The graph preserves the major operational views and the simulation capability. Several backend imports are confirmed by the source index, but the frontend-to-API wiring and some route-level dispatch details were not shown, so those connections are omitted rather than inferred.
Main entry points: main.py API Routes · orchestrator.py Case Orchestrator · razorpay.py Gateway Integration · database.py SQL Database
Components 23
Ingestion & Data
- API Routes
backend/app/main.py - Gateway Integration
backend/app/services/razorpay.py - SQL Database
backend/app/database.py - Payment Records
backend/app/models.py - API Schemas
backend/app/schemas.py
Recovery Workflow
- Risk Detection
backend/app/services/detection.py - Case Orchestrator
backend/app/services/orchestrator.py - AI Diagnosis
backend/app/services/diagnosis.py - Safety Decisions
backend/app/services/decision.py - Recovery Execution
backend/app/services/recovery.py - Workflow Simulator
backend/app/services/simulator.py
Operations & Insights
- Executive Overview
frontend/src/app/overview/page.tsx - Incident Views
frontend/src/app/incidents - Investigation Views
frontend/src/app/investigations - Risk Case Views
frontend/src/app/risk-cases - Transaction Views
frontend/src/app/transactions - Recovery Operations
frontend/src/app/recovery/page.tsx - Policy Center
frontend/src/app/policies/page.tsx - Audit Trail
frontend/src/app/audit/page.tsx - AI Assistant
frontend/src/app/ai-assistant/page.tsx
Control Center
- Frontend Shell
frontend/src/app/layout.tsx
Other components
- Merchant Operator
- Razorpay Gateway
Connections 26
- Razorpay Gateway → API Routes: sends webhooks
README.md - API Routes → Gateway Integration: handles gateway events
README.md - Gateway Integration → Razorpay Gateway: creates payment links
backend/app/services/razorpay.py - Gateway Integration → API Routes: normalizes events
README.md - API Routes → SQL Database: reads and writes
backend/app/main.py - Payment Records → SQL Database: maps records
backend/app/models.py - API Routes → Risk Detection: dispatches detection
backend/app/main.py - Risk Detection → SQL Database: creates risk cases
backend/app/services/detection.py - API Routes → Case Orchestrator: starts case workflow
backend/app/main.py - Case Orchestrator → AI Diagnosis: requests diagnosis
backend/app/services/orchestrator.py - Case Orchestrator → Safety Decisions: evaluates policies
backend/app/services/orchestrator.py - Case Orchestrator → Recovery Execution: executes decision
backend/app/services/orchestrator.py - Recovery Execution → Gateway Integration: creates payment links
backend/app/services/recovery.py - Merchant Operator → API Routes: authorizes recovery
README.md - API Routes → Workflow Simulator: runs simulation
backend/app/main.py - Frontend Shell → Executive Overview: frames views
frontend/src/app/layout.tsx - Merchant Operator → Frontend Shell: uses control center
README.md - Executive Overview → API Routes: loads dashboard data
- Incident Views → API Routes: loads incident data
- Investigation Views → API Routes: loads investigation data
- Risk Case Views → API Routes: loads case data
- Transaction Views → API Routes: loads transaction data
- Recovery Operations → API Routes: manages recovery
- Policy Center → API Routes: edits policy bounds
- Audit Trail → API Routes: loads audit trail
- AI Assistant → API Routes: requests assistance