How ganesh-marathe/ai-revenue-recovery-agent works
ReviveAI is a revenue-recovery application for monitoring invoices and payments, identifying risk, recommending and executing recovery actions, and tracking outcomes. The principal workflow runs from invoice/payment data through risk assessment and AI diagnosis/intervention to a recovery case and audit record; users access these capabilities through an authenticated dashboard. Analytics and authentication are distinct supporting branches. The recovery flow and frontend API calls are visible in excerpts; other API wiring is supported by the README and source index, so unsampled implementation details are not inferred.
Main entry points: App.jsx React application · recovery.py Recovery API · main.py FastAPI application · api.js REST API client
Components 27
Dashboard UI
- React application
frontend/src/App.jsx - Login page
frontend/src/pages/Login.jsx - Invoice monitoring
frontend/src/pages/Invoices.jsx - Recovery cases
frontend/src/pages/RecoveryCases.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - AI insights
frontend/src/pages/AIInsights.jsx - Analytics
frontend/src/pages/Analytics.jsx - Audit trail
frontend/src/pages/AuditTrail.jsx - REST API client
frontend/src/services/api.js
Backend APIs
- FastAPI application
backend/app/main.py - Authentication API
backend/app/api/auth.py - Invoice API
backend/app/api/invoices.py - Payment API
backend/app/api/payments.py - Customer API
backend/app/api/customers.py - Recovery API
backend/app/api/recovery.py - Analytics API
backend/app/api/analytics.py
Recovery Intelligence
- Revenue risk
backend/app/services/risk_service.py - Problem diagnosis
backend/app/agents/diagnosis_agent.py - Action selection
backend/app/agents/intervention_agent.py
Domain Data
- Customers
backend/app/models/customer.py - Invoices
backend/app/models/invoice.py - Payments
backend/app/models/payment.py - Recovery cases
backend/app/models/recovery_case.py - Audit records
backend/app/models/audit_log.py - User accounts
backend/app/models/user.py - SQLite database
backend/app/database/database.py
Other components
- Business user
Connections 39
- Business user → React application: uses
frontend/src/App.jsx - React application → Login page: shows when signed out
frontend/src/App.jsx - React application → Invoice monitoring: routes to
frontend/src/App.jsx - React application → Recovery cases: routes to
frontend/src/App.jsx - React application → Dashboard: routes to
frontend/src/App.jsx - React application → AI insights: routes to
frontend/src/App.jsx - React application → Analytics: routes to
frontend/src/App.jsx - React application → Audit trail: routes to
frontend/src/App.jsx - Invoice monitoring → REST API client: requests data
frontend/src/pages/Invoices.jsx - Recovery cases → REST API client: uses
frontend/src/pages/RecoveryCases.jsx - Dashboard → REST API client: uses
frontend/src/pages/Dashboard.jsx - AI insights → REST API client: uses
frontend/src/pages/AIInsights.jsx - Analytics → REST API client: uses
frontend/src/pages/Analytics.jsx - Audit trail → REST API client: uses
frontend/src/pages/AuditTrail.jsx - REST API client → FastAPI application: sends REST requests
README.md - FastAPI application → Authentication API: registers router
backend/app/main.py - FastAPI application → Recovery API: registers router
backend/app/main.py - FastAPI application → Invoice API: registers router
backend/app/main.py - FastAPI application → Payment API: registers router
backend/app/main.py - FastAPI application → Customer API: registers router
backend/app/main.py - FastAPI application → Analytics API: registers router
backend/app/main.py - Authentication API → User accounts: queries and writes
backend/app/api/auth.py - Recovery API → Invoices: reads
backend/app/api/recovery.py - Recovery API → Payments: reads
backend/app/api/recovery.py - Recovery API → Revenue risk: calculates risk
backend/app/api/recovery.py - Recovery API → Problem diagnosis: diagnoses issue
backend/app/api/recovery.py - Recovery API → Action selection: chooses action
backend/app/api/recovery.py - Recovery API → Recovery cases: creates and updates
backend/app/api/recovery.py - Recovery API → Audit records: records execution
backend/app/api/recovery.py - Analytics API → Revenue risk: uses risk calculation
backend/app/api/analytics.py - Invoice API → Invoices: uses invoice records
backend/app/api/invoices.py - Payment API → Payments: uses payment records
backend/app/api/payments.py - Customer API → Customers: uses customer records
backend/app/api/customers.py - Customers → SQLite database: maps to
backend/app/models/customer.py - Invoices → SQLite database: maps to
backend/app/models/invoice.py - Payments → SQLite database: maps to
backend/app/models/payment.py - Recovery cases → SQLite database: maps to
backend/app/models/recovery_case.py - Audit records → SQLite database: maps to
backend/app/models/audit_log.py - User accounts → SQLite database: maps to
backend/app/models/user.py