π€ AI-Driven Insights β’ π Real-Time Analytics β’ π Multi-Currency Support β’ π Enterprise-Grade Security
View Demo β’ Features β’ Tech Stack β’ Get Started
Spendlify is a personal finance management platform that leverages Google's Gemini 2.0 Flash AI to deliver intelligent financial insights and recommendations. Built with modern web technologies and a robust Python backend, it demonstrates advanced software engineering principles including RESTful API design, secure authentication, real-time data processing, and conversational AI integration.
- π€ AI-First Architecture: using Google Gemini 2.0
- π Dual Interface Design: Full-featured CLI and modern web application
- π Real-Time Analytics: Dynamic dashboards with interactive visualizations
- π Production-Ready: RESTful API, session management, and comprehensive error handling
- π¨ Modern UX: Glass-morphism design, responsive layouts, and smooth animations
- Full CRUD Operations: Create, Read, Update, Delete with validation
- Multi-Currency Support: USD, EUR, GBP, JPY, EGP with real-time conversion context
- Smart Categorization: Automated category suggestions (Food, Transport, Bills, Shopping, Other)
- Payment Tracking: Cash vs. Credit Card analytics
- CSV Import/Export: Bulk operations with error handling and validation
- Advanced Search: Filter by date range, category, amount, with sorting options
- Interactive Charts: Chart.js powered visualizations
- Financial Summary Cards: Income, Expenses, Net Balance with trend indicators
- Category Breakdown: Pie charts and percentage analysis
- Monthly Trends: Historical data visualization
- Top Spending Categories: Ranked by amount and frequency
- Progress Monitoring: Real-time percentage calculations
- Deadline Management: Automatic status updates (active/completed)
- Visual Indicators: Progress bars and achievement notifications
- Flexible Adjustments: Update targets and current amounts dynamically
- Automated Notifications: 5-day advance warnings
- Overdue Tracking: Calculates days past due
- Payment History: Complete audit trail
- Dashboard Integration: Upcoming bills prominently displayed
- SHA-256 Password Hashing: Industry-standard encryption
- Strong Password Policy: Enforced complexity requirements
- Session Management: Secure token-based authentication
- Data Isolation: User-specific data filtering at query level
- Input Validation: Frontend and backend sanitization
π Python 3.11+ # Core language
πΆοΈ Flask 3.0+ # Web framework & REST API
π€ Google Gemini 2.0 # AI/ML integration
π Hashlib (SHA-256) # Cryptographic hashing
π CSV/JSON # Data persistence
π Python-dotenv # Environment managementπ¨ HTML5/CSS3 # Modern semantic markup
β‘ Vanilla JavaScript # No framework dependencies
π Chart.js 4.4.0 # Data visualization
π Lucide Icons # SVG icon library
πͺ Glass-morphism UI # Modern design system
π± Responsive Design # Mobile-first approachSpendlify's AI assistant, powered by Google Gemini 2.0 Flash, transforms complex financial data into actionable insights through natural language conversations.
You: "How much did I spend on food this month?"
AI: "You spent $143.65 on food this month, which is 15% higher than last month..."
- Transaction History Integration: AI analyzes your last 5 transactions for context
- Temporal Awareness: Understands current date and time-based queries
- User-Specific Insights: Personalized recommendations based on spending patterns
- Multi-Currency Intelligence: Handles queries across different currencies
- π‘ Spending Pattern Recognition: Identifies trends and anomalies
- π Budget Recommendations: Suggests optimal budget allocations
- π― Goal Achievement Strategies: Provides actionable steps to reach financial goals
β οΈ Proactive Alerts: Warns about unusual spending or upcoming bills
# AI Integration Architecture
- API: Google Gemini 2.0 Flash (generativelanguage.googleapis.com)
- Context Building: Dynamic prompt engineering with user transaction data
- Real-time Processing: Asynchronous request handling
- Error Handling: Comprehensive exception management
- Security: API key management via environment variables# Clone the repository
git clone https://github.com/albert429/Spendlify.git
cd Spendlify
# Install dependencies
pip install flask requests python-dotenv
# Configure environment variables
echo "GEMINI_API_KEY=your_gemini_api_key_here" > .env
# Launch Web Application (Recommended)
python app.py
# Access at: http://localhost:5001
# OR Launch CLI Application
python main_menu.py- Visit Google AI Studio
- Create a new API key
- Add to
.envfile
π¬ User: "What's my spending trend this month?"
π€ AI: "Based on your transactions, you've spent $1,247.50 this month.
This is 12% higher than last month, primarily due to increased
spending in the Shopping category (+$150)."
π¬ User: "Should I be worried about my expenses?"
π€ AI: "Your expense-to-income ratio is 62%, which is within healthy
limits. However, I notice your Bills category has increased.
Consider reviewing your subscriptions."
π¬ User: "Help me save $500 by next month"
π€ AI: "To save $500, I recommend: 1) Reduce dining out by 30% ($120),
2) Use public transport instead of taxis ($80), 3) Review and
cancel unused subscriptions ($50). This leaves $250 from your
current surplus."
# Example: Query AI Assistant via API
import requests
response = requests.post('http://localhost:5001/api/ai/chat',
json={'question': 'Analyze my spending patterns'},
headers={'Cookie': 'session=your_session_token'}
)
print(response.json()['response'])Built with π and β | Powered by AI π€
"Where intelligent code meets intelligent finance"

