How mahirfaysal01/upay-financial-resilience-ai works
upay Financial Resilience AI is a bilingual financial decision-support app. A customer selects a synthetic financial persona; the shared financial context builds their profile and forecast, risk, anomaly, recommendations, and savings data for dashboard and specialist views. Users can explore cash-flow forecasts, spending, savings goals, risk, and what-if scenarios, then get AI coaching or export data. The README also documents interventions and responsible-AI disclosures. Edges reflect shown imports, calls, and documented capabilities; unsampled page and server internals limit detail.
Main entry points: FinancialContext.tsx Financial context · AppLayout.tsx Navigation and layout · App.tsx App composition · AICoach.tsx AI coach
Components 30
User experience
- App composition
src/App.tsx - Navigation and layout
src/components/AppLayout.tsx - Persona selection
src/pages/HomePage.tsx - Financial dashboard
src/pages/Dashboard.tsx - Cash-flow forecast
src/pages/CashFlowForecast.tsx - Financial risk
src/pages/FinancialRisk.tsx - Spending intelligence
src/pages/SpendingIntelligence.tsx - What-if simulator
src/pages/WhatIfSimulator.tsx - Savings goals
src/pages/SavingsGoals.tsx - Profile overview
src/pages/ProfileOverview.tsx - AI coach
src/pages/AICoach.tsx
Financial state
- Financial context
src/context/FinancialContext.tsx - Notification context
src/context/NotificationContext.tsx - Synthetic ledger and personas
src/data/syntheticData.ts
Financial intelligence
- Profile engineering
src/services/financialProfileEngine.ts - Cash-flow forecasting
src/services/forecastingEngine.ts - Shortage risk scoring
src/services/shortageRiskEngine.ts - Spending anomaly detection
src/services/anomalyDetectionEngine.ts - Intervention recommendations
src/services/recommendationEngine.ts - Savings planning
src/services/savingsPlannerEngine.ts - Scenario simulation
src/services/simulationEngine.ts
Persistence and assistance
- Coach response engine
src/services/aiCoachEngine.ts - AI service client
src/services/aiService.ts - AI API client
src/services/aiClient.ts - Server AI endpoints
server.ts - Firebase goal sync
src/services/firebaseSync.ts - Financial data export
src/utils/exportFinancialData.ts - Bilingual translations
src/utils/translations.ts - Speech assistance
src/utils/speechVoiceHelper.ts
Other components
- Customer
Connections 40
- Customer → App composition: opens app
README.md - App composition → Financial context: provides state
src/App.tsx - App composition → Notification context: provides notifications
src/App.tsx - App composition → Navigation and layout: renders
src/App.tsx - Navigation and layout → Persona selection: routes to
src/components/AppLayout.tsx - Navigation and layout → Financial dashboard: routes to
src/components/AppLayout.tsx - Navigation and layout → Cash-flow forecast: routes to
src/components/AppLayout.tsx - Navigation and layout → Financial risk: routes to
src/components/AppLayout.tsx - Navigation and layout → Spending intelligence: routes to
src/components/AppLayout.tsx - Navigation and layout → What-if simulator: routes to
src/components/AppLayout.tsx - Navigation and layout → Savings goals: routes to
src/components/AppLayout.tsx - Navigation and layout → AI coach: routes to
src/components/AppLayout.tsx - Persona selection → Financial context: selects persona
src/pages/HomePage.tsx - Financial context → Synthetic ledger and personas: loads persona data
src/context/FinancialContext.tsx - Financial context → Profile engineering: builds profile
src/context/FinancialContext.tsx - Profile engineering → Synthetic ledger and personas: generates transactions
src/services/financialProfileEngine.ts - Financial context → Cash-flow forecasting: calculates forecast
src/context/FinancialContext.tsx - Financial context → Shortage risk scoring: calculates risk
src/context/FinancialContext.tsx - Financial context → Spending anomaly detection: detects anomalies
src/context/FinancialContext.tsx - Financial context → Intervention recommendations: generates actions
src/context/FinancialContext.tsx - Financial context → Savings planning: loads goals
src/context/FinancialContext.tsx - Financial dashboard → Financial context: reads metrics
src/pages/Dashboard.tsx - Cash-flow forecast → Financial context: reads forecast
src/components/AppLayout.tsx - Financial risk → Financial context: reads risk
src/pages/FinancialRisk.tsx - Spending intelligence → Financial context: reads spending
src/pages/SpendingIntelligence.tsx - What-if simulator → Financial context: reads finances
src/pages/WhatIfSimulator.tsx - What-if simulator → Scenario simulation: runs scenarios
src/pages/WhatIfSimulator.tsx - Scenario simulation → Cash-flow forecasting: uses forecast
src/services/simulationEngine.ts - Scenario simulation → Shortage risk scoring: uses risk scoring
src/services/simulationEngine.ts - Savings goals → Financial context: reads goals
src/components/AppLayout.tsx - Profile overview → Financial context: reads profile
src/components/AppLayout.tsx - Profile overview → Financial data export: exports data
src/pages/ProfileOverview.tsx - AI coach → Financial context: reads context
src/pages/AICoach.tsx - AI coach → Coach response engine: requests guidance
src/pages/AICoach.tsx - Coach response engine → Server AI endpoints: requests AI endpoint
- Financial dashboard → Coach response engine: requests insights
src/pages/Dashboard.tsx - AI service client → AI API client: uses client
src/services/aiService.ts - Financial context → Firebase goal sync: syncs goals
src/context/FinancialContext.tsx - Financial context → Bilingual translations: uses language
src/context/FinancialContext.tsx - AI coach → Speech assistance: uses speech
src/pages/AICoach.tsx