How nilesh1381/pratyavartan works
Pratyavartan is an autonomous payment-failure recovery service with a separate Next.js landing experience. Its documented main workflow ingests failures, applies bounded diagnosis and recovery actions, then records payment outcomes and audit events. The graph preserves documented recovery, mandate, voice, monitoring, and merchant-assurance capabilities. Backend relationships are supported by excerpts, the source index, or README; some internals and the landing page’s component wiring were not sampled, so those links are omitted.
Main entry points: orchestrator.py Recovery orchestration · main.py Webhook and API · db.py Payment state · ai_agent.py AI diagnosis
Components 16
Recovery runtime
- Webhook and API
main.py - Recovery orchestration
orchestrator.py - AI diagnosis
ai_agent.py - Payment recovery actions
razorpay_service.py - Mandate retries
orchestrator.py - Promise follow-ups
orchestrator.py - Voice outreach
ai_agent.py
State and assurance
- Payment state
db.py - Hash-chained audit ledger
db.py - Merchant assurance API
main.py
User experiences
- Merchant war room
main.py - Landing experience
revive-site/src/app/page.tsx
External services
- Razorpay payments
- LLM provider
- gTTS
Other components
- Merchant
Connections 18
- Razorpay payments → Webhook and API: sends webhooks
- Webhook and API → Payment state: ingests failures
main.py - Webhook and API → Recovery orchestration: dispatches workflow
main.py - Recovery orchestration → AI diagnosis: requests diagnosis
orchestrator.py - AI diagnosis → LLM provider: queries diagnosis
- Recovery orchestration → Payment recovery actions: dispatches actions
orchestrator.py - Payment recovery actions → Razorpay payments: creates payment links
- Recovery orchestration → Mandate retries: schedules retries
check_ai.py - Recovery orchestration → Promise follow-ups: sends follow-ups
orchestrator.py - Recovery orchestration → Voice outreach: generates scripts
orchestrator.py - Voice outreach → gTTS: synthesizes audio
- Webhook and API → Payment state: marks recovered
main.py - Webhook and API → Hash-chained audit ledger: logs events
main.py - Recovery orchestration → Payment state: reads payment state
orchestrator.py - Recovery orchestration → Hash-chained audit ledger: records decisions
orchestrator.py - Webhook and API → Merchant assurance API: serves metrics
main.py - Merchant → Merchant war room: reviews recovery
- Merchant → Landing experience: visits landing page