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.
- π€ 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
- 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
- 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
Before you begin, ensure you have the following installed:
- Python 3.9+ - Download here
- Node.js 16+ - Download here
- npm or yarn - Comes with Node.js
- Git - Download here
- Capital One Nessie API Key - Get it here
- Google Gemini API Key - Get it here
- Mediastack API Key (Optional) - Get it here
git clone <your-repo-url>
cd ai-financial-coachcd backend
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txtCreate a .env file in the backend directory:
cd backend
cp .env.example .envEdit .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_heresource venv/bin/activate
python app.pyBackend will run on http://localhost:5002
cd ../frontend
npm install
npm startFrontend will run on http://localhost:3000
- Visit Capital One Nessie API
- Click "Get API Key" and create an account
- Copy your API key from the dashboard
- Add to
.envasCAPITAL_ONE_KEY
- Visit Google AI Studio
- Sign in with your Google account
- Click "Create API Key"
- Add to
.envasGEMINI_API_KEY
- Visit Mediastack
- Sign up for a free account (1000 requests/month)
- Get your API key from the dashboard
- Add to
.envasMEDIASTACK_API_KEY
- Onboarding: Click "Start Your Journey" to create a mock financial account
- Set Goal: Enter your monthly savings goal (e.g., $500)
- View Dashboard: See your spending analysis with interactive charts
- Get Recommendations: Read AI-generated financial advice
- Track Progress: Monitor your savings goal progress
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
| 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 |
| 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 |
All endpoints return JSON with the following structure:
{
"success": true,
"data": {...},
"error": null
}- 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
- π¦ 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
We welcome contributions from the community! Here's how you can help:
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/ai-financial-coach.git - Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Test thoroughly
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- π 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
- 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.
This project is licensed under the MIT License - see the LICENSE file for details.
- 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
- Languages: Python, JavaScript, CSS
- Framework: React + Flask
- AI Integration: Google Gemini
- Visualization: Recharts
- Styling: Tailwind CSS
- API: RESTful with JSON responses
- Make sure Python virtual environment is activated
- Check that
.envfile exists with valid API keys - Ensure port 5002 is not in use
- Make sure Node.js dependencies are installed
- Check that backend is running on port 5002
- Clear browser cache if needed
- Verify API keys are correct and active
- Check internet connection
- Review API rate limits
For questions or issues, please open a GitHub issue or contact the team.
Built with β€οΈ for HackTX 2025