How soha-nabi/relay works
Relay is a payment-recovery platform for merchants and customers. A merchant or administrator signs in, reviews recovery and payment analytics, and can upload transaction data or configure automations; failed payments are analyzed and recovery actions are coordinated, while customers can choose a payment method and complete recovery. Dashboards expose performance and role-specific views. The graph preserves documented analytics and workflow capabilities even where their UI or implementation was not sampled. Edges reflect shown imports/calls or README statements; unsampled links are omitted.
Main entry points: MerchantShell.tsx Merchant dashboard · api.ts Frontend API client · main.py FastAPI application · LoginView.tsx Login view
Components 24
Access and roles
- Authentication context
frontend/src/contexts/AuthContext.tsx - Login view
frontend/src/components/LoginView.tsx
Dashboards and customer experience
- Admin dashboard
frontend/src/components/AdminShell.tsx - Merchant dashboard
frontend/src/components/MerchantShell.tsx - Recovery overview
frontend/src/components/MerchantOverview.tsx - Recovery analytics
frontend/src/components/Analytics.tsx - User dashboard
frontend/src/components/UserShell.tsx - Mobile navigation
frontend/src/components/MobileDrawer.tsx - Customer payment
frontend/src/components/CustomerPaymentExperience.tsx
Recovery operations
- Recovery workflow
frontend/src/components/RecoveryWorkflow.tsx - Automation console
frontend/src/components/AutomationsCenter.tsx - Webhook simulator
frontend/src/components/WebhookDemoWidget.tsx - Recovery engine
backend/recovery_engine.py - Automation engine
backend/automation_engine.py
API and persistence
- Frontend API client
frontend/src/lib/api.ts - FastAPI application
main.py - MongoDB persistence
backend/db.py
Communications
- Voice recovery agent
frontend/src/components/RelayVoiceAgent.tsx - Voice service
backend/elevenlabs_service.py - Email service
backend/email_service.py - Email log repository
backend/email_log_repository.py
Other components
- Merchant
- Customer
- Administrator
Connections 34
- Merchant → Login view: signs in
README.md - Customer → Login view: signs in
README.md - Administrator → Login view: signs in
README.md - Login view → Authentication context: uses
frontend/src/components/LoginView.tsx - Authentication context → Frontend API client: calls
frontend/src/contexts/AuthContext.tsx - Frontend API client → FastAPI application: requests
README.md - Merchant → Merchant dashboard: reviews
README.md - Administrator → Admin dashboard: reviews
README.md - Customer → User dashboard: accesses
README.md - Merchant dashboard → Recovery overview: renders
frontend/src/components/MerchantShell.tsx - Merchant dashboard → Recovery workflow: renders
frontend/src/components/MerchantShell.tsx - Merchant dashboard → Automation console: renders
frontend/src/components/MerchantShell.tsx - Merchant dashboard → Customer payment: renders
frontend/src/components/MerchantShell.tsx - Merchant dashboard → Mobile navigation: renders
frontend/src/components/MerchantShell.tsx - Admin dashboard → Mobile navigation: renders
frontend/src/components/AdminShell.tsx - User dashboard → Mobile navigation: renders
frontend/src/components/UserShell.tsx - User dashboard → Customer payment: renders
frontend/src/components/UserShell.tsx - Merchant dashboard → Frontend API client: requests data
frontend/src/components/MerchantShell.tsx - Recovery workflow → Frontend API client: requests
frontend/src/components/RecoveryWorkflow.tsx - Automation console → Frontend API client: manages workflows
frontend/src/components/AutomationsCenter.tsx - Customer payment → Frontend API client: processes payment
frontend/src/components/CustomerPaymentExperience.tsx - Webhook simulator → Frontend API client: sends event
frontend/src/components/WebhookDemoWidget.tsx - FastAPI application → Recovery engine: delegates
main.py - FastAPI application → Automation engine: delegates
main.py - FastAPI application → MongoDB persistence: persists data
main.py - Automation engine → Recovery engine: delegates actions
backend/automation_engine.py - Automation engine → MongoDB persistence: reads and writes
backend/automation_engine.py - Recovery engine → MongoDB persistence: records sessions
backend/recovery_engine.py - FastAPI application → Email service: sends recovery email
main.py - Email service → Recovery engine: checks and marks sends
backend/email_service.py - Email service → Email log repository: records email
backend/email_service.py - Email log repository → MongoDB persistence: writes logs
backend/email_log_repository.py - Merchant dashboard → Recovery analytics: shows reporting
- Voice recovery agent → Voice service: connects agent