Skip to content

BudgetBuddy is an intelligent financial coaching platform that uses Google Gemini AI to automatically categorize spending as "Needs" vs "Wants" and provides personalized recommendations. Features an interactive React dashboard with real-time analysis, gamified rewards, and AI-powered investment education using mock data.

Notifications You must be signed in to change notification settings

AzaanWaseem/BudgetBuddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI-Powered Financial Coach πŸ’°

License: MIT Python 3.9+ React 18

An intelligent financial coaching application that leverages AI to analyze spending patterns, provide personalized recommendations, and help users achieve their financial goals. Built for educational purposes and personal finance management.

✨ Features

  • πŸ€– AI-Powered Analysis: Uses Google Gemini AI to intelligently categorize spending as "Needs" vs "Wants"
  • πŸ“Š Interactive Dashboard: Beautiful charts and visualizations powered by Recharts
  • 🎯 Goal Tracking: Set and monitor personalized monthly savings goals
  • πŸ’‘ Smart Recommendations: AI-generated financial advice based on your spending patterns
  • πŸ“ˆ Investment Education: Learn about investment concepts and get stock recommendations
  • πŸ’³ Credit Card Suggestions: Get personalized credit card recommendations
  • πŸ”’ Privacy-First: Uses mock data - no real financial information required
  • πŸ“± Responsive Design: Modern, mobile-friendly interface

πŸ› οΈ Technology Stack

Backend

  • Python 3.9+ - Core backend language
  • Flask 2.3+ - Web framework with CORS support
  • Google Gemini AI - AI-powered transaction analysis and recommendations
  • Capital One Nessie API - Mock financial data generation
  • APScheduler - Background task scheduling
  • python-dotenv - Environment variable management

Frontend

  • React 18 - Modern UI framework with hooks
  • Recharts 2.8+ - Interactive data visualization
  • Axios - HTTP client for API communication
  • Tailwind CSS - Utility-first CSS framework
  • Modern CSS3 - Gradients, animations, and responsive design

πŸ“‹ Prerequisites

Before you begin, ensure you have the following installed:

API Keys (Free)

πŸš€ Quick Start

1. Clone the Repository

git clone <your-repo-url>
cd ai-financial-coach

2. Backend Setup

cd backend
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt

3. Environment Variables

Create a .env file in the backend directory:

cd backend
cp .env.example .env

Edit .env and add your API keys:

# Required: Capital One Nessie API Key
CAPITAL_ONE_KEY=your_nessie_api_key_here

# Required: Google Gemini API Key  
GEMINI_API_KEY=your_gemini_api_key_here

# Optional: Mediastack API Key (for news features)
MEDIASTACK_API_KEY=your_mediastack_api_key_here

4. Start Backend Server

source venv/bin/activate
python app.py

Backend will run on http://localhost:5002

5. Frontend Setup

cd ../frontend
npm install
npm start

Frontend will run on http://localhost:3000

πŸ”‘ API Keys Setup

Capital One Nessie API (Free)

  1. Visit Capital One Nessie API
  2. Click "Get API Key" and create an account
  3. Copy your API key from the dashboard
  4. Add to .env as CAPITAL_ONE_KEY

Google Gemini API (Free)

  1. Visit Google AI Studio
  2. Sign in with your Google account
  3. Click "Create API Key"
  4. Add to .env as GEMINI_API_KEY

Mediastack API (Optional)

  1. Visit Mediastack
  2. Sign up for a free account (1000 requests/month)
  3. Get your API key from the dashboard
  4. Add to .env as MEDIASTACK_API_KEY

πŸ“± How to Use

  1. Onboarding: Click "Start Your Journey" to create a mock financial account
  2. Set Goal: Enter your monthly savings goal (e.g., $500)
  3. View Dashboard: See your spending analysis with interactive charts
  4. Get Recommendations: Read AI-generated financial advice
  5. Track Progress: Monitor your savings goal progress

πŸ—οΈ Project Structure

ai-financial-coach/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app.py              # Main Flask application
β”‚   β”œβ”€β”€ nessie_client.py    # Nessie API integration
β”‚   β”œβ”€β”€ gemini_client.py    # Google Gemini AI integration
β”‚   β”œβ”€β”€ requirements.txt    # Python dependencies
β”‚   β”œβ”€β”€ .env               # Environment variables (not in git)
β”‚   └── venv/              # Virtual environment (not in git)
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/    # React components
β”‚   β”‚   β”œβ”€β”€ App.js         # Main React app
β”‚   β”‚   └── index.js       # React entry point
β”‚   β”œβ”€β”€ public/            # Static files
β”‚   β”œβ”€β”€ package.json       # Node.js dependencies
β”‚   └── node_modules/      # Dependencies (not in git)
└── README.md

πŸ”§ API Documentation

Core Endpoints

Method Endpoint Description Request Body
POST /api/onboard Create mock account and seed transactions {"monthly_budget": number}
POST /api/set-goal Set monthly savings goal {"goal": number}
GET /api/analysis Get spending analysis and AI recommendations None
GET /api/investment-idea Get investment education content None
GET /api/health Health check endpoint None

Additional Endpoints

Method Endpoint Description Request Body
POST /api/add-transaction Add custom transaction {"description": string, "amount": number}
POST /api/remove-transaction Remove/hide transaction {"id": string}
GET /api/trending-stocks Get trending stock recommendations None
POST /api/rate-stocks Get AI stock analysis {"stocks": [{"symbol": string, "name": string}]}
GET /api/best-credit-cards Get personalized credit card recommendations None

Response Format

All endpoints return JSON with the following structure:

{
  "success": true,
  "data": {...},
  "error": null
}

🎯 Hackathon Features

  • Real-time AI Analysis: Instant spending categorization
  • Beautiful UI: Modern, responsive design
  • Mock Data: No real financial data required
  • Educational: Teaches basic financial concepts
  • Scalable: Easy to extend with more features

πŸš€ Future Enhancements

  • 🏦 Real Bank Integration: Connect with Plaid API for live transaction data
  • πŸ” User Authentication: Multi-user support with secure login
  • πŸ’Ύ Data Persistence: Database integration for saving user data
  • πŸ“Š Advanced Analytics: More detailed spending insights and trends
  • πŸ“± Mobile App: React Native mobile application
  • πŸ”” Smart Notifications: Goal reminders and spending alerts
  • πŸ€– Enhanced AI: More sophisticated financial recommendations
  • 🌐 Multi-language: Internationalization support

🀝 Contributing

We welcome contributions from the community! Here's how you can help:

Getting Started

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/your-username/ai-financial-coach.git
  3. Create a feature branch: git checkout -b feature/amazing-feature
  4. Make your changes
  5. Test thoroughly
  6. Commit your changes: git commit -m 'Add amazing feature'
  7. Push to the branch: git push origin feature/amazing-feature
  8. Open a Pull Request

Types of Contributions

  • πŸ› Bug Fixes: Report and fix bugs
  • ✨ New Features: Add new functionality
  • πŸ“š Documentation: Improve docs and examples
  • 🎨 UI/UX: Enhance user interface and experience
  • πŸ§ͺ Testing: Add tests and improve coverage
  • πŸ”§ DevOps: Improve build and deployment processes

Development Guidelines

  • Follow existing code style and conventions
  • Add tests for new features
  • Update documentation as needed
  • Keep commits focused and well-documented
  • Be respectful in discussions and reviews

See CONTRIBUTING.md for detailed guidelines.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Capital One for the Nessie API providing mock financial data
  • Google for the Gemini AI API enabling intelligent analysis
  • HackTX 2025 for the inspiration and development opportunity
  • React and Flask communities for excellent documentation
  • All contributors who help improve this project

πŸ“Š Project Stats

  • Languages: Python, JavaScript, CSS
  • Framework: React + Flask
  • AI Integration: Google Gemini
  • Visualization: Recharts
  • Styling: Tailwind CSS
  • API: RESTful with JSON responses

πŸ†˜ Troubleshooting

Backend Issues

  • Make sure Python virtual environment is activated
  • Check that .env file exists with valid API keys
  • Ensure port 5002 is not in use

Frontend Issues

  • Make sure Node.js dependencies are installed
  • Check that backend is running on port 5002
  • Clear browser cache if needed

API Issues

  • Verify API keys are correct and active
  • Check internet connection
  • Review API rate limits

πŸ“ž Support

For questions or issues, please open a GitHub issue or contact the team.


Built with ❀️ for HackTX 2025

About

BudgetBuddy is an intelligent financial coaching platform that uses Google Gemini AI to automatically categorize spending as "Needs" vs "Wants" and provides personalized recommendations. Features an interactive React dashboard with real-time analysis, gamified rewards, and AI-powered investment education using mock data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •