A sophisticated financial coaching application powered by AI that continuously learns about individual user behavior, analyzes spending and income patterns, identifies risks, and delivers personalized recommendations.
Chat with your finances! The app now includes an intelligent AI agent powered by OpenAI GPT-4 that lets you manage your finances through natural conversation.
- π¬ Natural Language Interface: Talk to manage finances instead of filling forms
- π All Website Features: Add transactions, track income, set goals - all via chat
- π§ Contextual Understanding: Remembers conversation and understands intent
- π Instant Analysis: Get financial insights through simple questions
- π‘ Personalized Advice: Recommendations tailored to your conversation
- π― 20 Powerful Tools: Complete CRUD for goals, wealth tracking (assets/liabilities), and financial management
See AI_AGENT_GUIDE.md for detailed documentation.
- Intelligent Pattern Recognition: Automatically analyzes spending and income patterns to identify trends
- Risk Detection: Proactively identifies financial risks (overspending, irregular income, low savings, etc.)
- Personalized Recommendations: Generates actionable, context-aware financial advice based on:
- Employment type (gig workers, informal sector, full-time, etc.)
- Income variability and reliability
- Spending habits and trends
- Financial goals and priorities
- Risk tolerance
-
Transaction Management
- Add income and expense transactions
- Categorize transactions automatically
- Track recurring transactions
- View transaction history
-
Income Stream Analysis
- Multiple income source tracking
- Income reliability assessment
- Variability analysis for irregular income
- Ideal for gig workers and freelancers
-
Financial Goal Tracking
- Set and monitor financial goals
- Priority-based goal management
- Progress tracking with deadlines
- Actionable steps to reach goals
-
Real-time Analysis
- Financial health score (0-100)
- Spending pattern visualization
- Income stream breakdown
- Savings rate calculation
- Months of runway estimation
-
Personalized Insights
- Category-wise spending trends
- Risk alerts with severity levels
- Priority-based recommendations
- Action items for improvement
-
Data Management
- Local storage (no database required)
- Export data as JSON
- Import existing financial data
- Complete privacy - data never leaves your browser
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Charts: Recharts
- Icons: Lucide React
- Storage: Browser LocalStorage
- API: Next.js API Routes
mumbai/
βββ app/
β βββ api/
β β βββ analyze/route.ts # Main analysis endpoint
β β βββ insights/route.ts # Insights endpoint
β β βββ recommendations/route.ts # Recommendations endpoint
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
β βββ page.tsx # Main dashboard page
βββ components/
β βββ TransactionForm.tsx # Transaction input form
β βββ IncomeStreamForm.tsx # Income stream input form
β βββ GoalForm.tsx # Financial goal form
β βββ SpendingChart.tsx # Spending visualization
β βββ RiskAlert.tsx # Risk display component
β βββ RecommendationCard.tsx # Recommendation display
β βββ FinancialHealthScore.tsx # Health score widget
βββ lib/
β βββ types.ts # TypeScript type definitions
β βββ financialAgent.ts # AI agent logic
β βββ storage.ts # LocalStorage utilities
β βββ utils.ts # Helper functions
βββ package.json
βββ tsconfig.json
βββ tailwind.config.ts
βββ next.config.js
- Node.js 18.x or higher
- npm or yarn
- Clone or navigate to the project directory:
cd /home/ubuntu/mumbai- Install dependencies:
npm install- Run the development server:
npm run dev- Open your browser and navigate to:
http://localhost:3000
npm run build
npm startThe financial coaching agent uses a sophisticated algorithm that:
-
Analyzes Spending Patterns
- Groups transactions by category
- Calculates trends (increasing/stable/decreasing)
- Determines percentage of income per category
- Identifies discretionary vs. essential spending
-
Evaluates Income Patterns
- Calculates total and average income
- Measures income variability (coefficient of variation)
- Assesses reliability of income sources
- Tracks contribution of each income stream
-
Identifies Risks
- Overspending detection
- Irregular income warnings
- Low savings rate alerts
- High discretionary spending flags
- Increasing spending trend notifications
-
Generates Recommendations
- Context-aware advice for different employment types
- Prioritized action items
- Specific dollar amounts and percentages
- Potential impact estimation
- Step-by-step guidance
-
Calculates Health Score
- Savings rate (0-40 points)
- Income stability (0-20 points)
- Risk factors (deductions)
- Final score: 0-100
- Track irregular income from multiple platforms
- Plan for income variability
- Build appropriate emergency fund (6-12 months)
- Identify income patterns and seasonality
- Manage cash-based transactions
- Track daily/weekly income
- Plan for uncertain income periods
- Simple budgeting based on minimum income
- Optimize spending categories
- Build savings habits
- Plan for financial goals
- Investment recommendations
- Balance multiple income sources
- Diversification strategies
- Risk management
- Comprehensive financial planning
- No Database: All data stored in browser LocalStorage
- No Server Storage: Data never transmitted to external servers
- Client-Side Processing: All analysis happens in your browser
- Data Portability: Export your data anytime
- Full Control: Delete all data with one click
- Financial health score with visual indicator
- Quick stats (income, expenses, goals)
- Risk alerts with severity levels
- Spending breakdown pie chart
- Income stream analysis
- Personalized recommendations
- Quick transaction entry
- Income stream management
- Goal setting and tracking
- Recent transactions list
- Goals overview with progress bars
- Employment type configuration
- Risk tolerance setting
- Data summary
- Clear all data option
- Modern Design: Clean, professional interface
- Responsive: Works on desktop, tablet, and mobile
- Intuitive Navigation: Tab-based navigation
- Visual Feedback: Color-coded alerts and scores
- Data Visualization: Charts and progress bars
- Accessibility: Semantic HTML and ARIA labels
Edit the EXPENSE_CATEGORIES or INCOME_CATEGORIES arrays in:
components/TransactionForm.tsx
Customize risk thresholds in:
lib/financialAgent.tsβidentifyRisks()method
Modify recommendation logic in:
lib/financialAgent.tsβgenerateRecommendations()method
Update colors in:
lib/utils.tsβgetCategoryColor(),getSeverityColor(), etc.tailwind.config.tsfor theme colors
- Add various transactions (income and expenses)
- Add multiple income streams with different reliabilities
- Create financial goals with different priorities
- Check dashboard updates after each addition
- Verify risk alerts appear correctly
- Review personalized recommendations
- Test export/import functionality
- Verify data persistence after page refresh
Potential features for future versions:
- Machine learning integration for better predictions
- Automated transaction categorization
- Bill payment reminders
- Budget planning tools
- Multi-currency support
- Expense splitting for shared expenses
- Receipt scanning (OCR)
- Bank account integration (optional)
- Financial literacy resources
- Chatbot interface for Q&A
This is a demonstration project for the Agentic AI Challenge. Feel free to:
- Report issues
- Suggest improvements
- Fork and modify for your needs
- Use as a learning resource
This project is created for educational and demonstration purposes.
Built as part of the Agentic AI Challenge to demonstrate:
- AI-powered financial coaching
- Personalized recommendation systems
- Pattern recognition algorithms
- User-centric design
- Privacy-first approach
For questions or issues:
- Check the code documentation
- Review the type definitions in
lib/types.ts - Examine the AI agent logic in
lib/financialAgent.ts
Note: This application is for educational purposes. Always consult with a qualified financial advisor for professional financial advice.