How v1629/x.a.v.i.e.r. works
X.A.V.I.E.R. is a payment-failure recovery product with a React operations UI and a FastAPI agent backend. Its principal workflow accepts failures from payment reports or Razorpay webhooks, processes eligible transactions through detection, governance, diagnosis, notification and recovery strategy execution, then records outcomes and streams updates. The README also describes gateway-health fallback routing, customer nudges and safeguards. Several backend relationships are grounded in excerpts or the source index; unsampled UI and API details are represented only where documented or indexed, so uncertain links are omitted.
Main entry points: routes.py Payment & API Routes · orchestrator.py Recovery Orchestrator · actions.py Recovery Actions · App.jsx React Application
Components 27
Failure Intake
- Payment & API Routes
server/app/api/routes.py - Transaction Store
server/app/data/transaction_store.py
Recovery Agent
- Recovery Orchestrator
server/app/agent/orchestrator.py - Failure Detector
server/app/agent/detector.py - AI Diagnoser
server/app/agent/diagnoser.py - Error Knowledge Base
server/app/ai/kb_retriever.py - Groq Client
server/app/ai/groq_client.py - AI Prompts
server/app/ai/prompts.py - Recovery Strategies
server/app/agent/strategies.py - Recovery Actions
server/app/agent/actions.py - Gateway Health Monitor
server/app/agent/gateway_monitor.py
Governance & Audit
- Governance Rules
server/app/governance/rules.py - Audit Logger
server/app/audit/audit_logger.py - Audit Store
server/app/data/audit_store.py
API & Events
- SSE Manager
server/app/api/sse_manager.py
Operations UI
- React Application
client/src/App.jsx - Agent Console
client/src/pages/AgentPage.jsx - SSE Hook
client/src/hooks/useSSE.js - Recovery Dashboard
client/src/pages/DashboardPage.jsx - Store Checkout
client/src/pages/StorePage.jsx - Audit View
client/src/pages/AuditPage.jsx - Settings View
client/src/pages/SettingsPage.jsx
Other components
- Payment Gateways
- Customer
- Groq AI Service
- Stripe Checkout
- Resend Email
Connections 38
- Payment Gateways → Payment & API Routes: reports failures
README.md - Customer → Payment & API Routes: reports failure
server/app/api/routes.py - Payment & API Routes → Transaction Store: stores transactions
server/app/api/routes.py - Payment & API Routes → Recovery Orchestrator: starts batch
server/app/api/routes.py - Recovery Orchestrator → Failure Detector: detects failures
server/app/agent/orchestrator.py - Recovery Orchestrator → Governance Rules: checks limits
server/app/agent/orchestrator.py - Recovery Orchestrator → AI Diagnoser: requests diagnosis
server/app/agent/orchestrator.py - AI Diagnoser → Error Knowledge Base: retrieves patterns
server/app/agent/diagnoser.py - AI Diagnoser → Groq Client: analyzes errors
server/app/agent/diagnoser.py - AI Diagnoser → AI Prompts: uses prompts
server/app/agent/diagnoser.py - Groq Client → Groq AI Service: calls model
server/app/ai/groq_client.py - Recovery Orchestrator → Recovery Actions: dispatches notification
server/app/agent/orchestrator.py - Recovery Actions → Groq Client: generates nudge
server/app/agent/actions.py - Recovery Actions → AI Prompts: builds nudge
server/app/agent/actions.py - Recovery Actions → Resend Email: sends email
server/app/agent/actions.py - Recovery Orchestrator → Recovery Strategies: selects strategy
server/app/agent/orchestrator.py - Recovery Strategies → Recovery Actions: invokes actions
server/app/agent/strategies.py - Recovery Actions → Stripe Checkout: creates fallback
server/app/agent/actions.py - Recovery Actions → SSE Manager: broadcasts fallback
server/app/agent/actions.py - Recovery Orchestrator → Transaction Store: updates outcomes
server/app/agent/orchestrator.py - Recovery Orchestrator → SSE Manager: broadcasts status
server/app/agent/orchestrator.py - Recovery Orchestrator → Audit Logger: records actions
server/app/agent/orchestrator.py - Audit Logger → Audit Store: persists entries
server/app/audit/audit_logger.py - Payment & API Routes → SSE Manager: streams events
server/app/api/routes.py - Payment & API Routes → Gateway Health Monitor: reads health
server/app/api/routes.py - React Application → Agent Console: routes to
client/src/App.jsx - React Application → Recovery Dashboard: routes to
client/src/App.jsx - React Application → Settings View: routes to
client/src/App.jsx - React Application → Store Checkout: routes to
client/src/App.jsx - Agent Console → SSE Hook: subscribes events
client/src/pages/AgentPage.jsx - SSE Hook → SSE Manager: receives stream
- Agent Console → Payment & API Routes: starts recovery batch
- React Application → Payment & API Routes: toggles kill switch
client/src/App.jsx - Audit View → Payment & API Routes: loads audit entries
- Recovery Dashboard → Payment & API Routes: loads metrics
- Store Checkout → Payment & API Routes: uses payment API
- Customer → Payment & API Routes: opens recovery link
server/app/api/routes.py - Payment & API Routes → Transaction Store: marks recovered
server/app/api/routes.py