No description
- Python 53.3%
- HTML 46.7%
| __pycache__ | ||
| instance | ||
| templates | ||
| uploads | ||
| .DS_Store | ||
| .env | ||
| .gitignore | ||
| app.log | ||
| app.py | ||
| README.md | ||
| requirements.txt | ||
Invest.AI
A Flask-based web application for aggregating and analyzing investment portfolios using AI-powered file parsing and agentic analysis.
Features
- Add and manage multiple bank accounts
- Upload banking statements (PDF, CSV, or screenshots)
- AI-powered data extraction using OpenRouter LLM models
- Track asset history over time
- View current balances for each account
- Modern, responsive web interface
Setup
-
Install system dependencies for OCR:
- Windows: Download and install Tesseract OCR from UB-Mannheim/tesseract
- macOS:
brew install tesseract - Linux:
sudo apt-get install tesseract-ocr
-
Install Python dependencies:
pip install -r requirements.txt
- Configure environment variables:
cp .env.example .env
Edit .env and add your OpenRouter API key:
OPENROUTER_API_KEY=your_api_key_here
OPENROUTER_MODEL=anthropic/claude-3-haiku:beta
FLASK_SECRET_KEY=your_secret_key_here
Optional: For better PDF parsing of printed webpages, use a vision-capable model:
OPENROUTER_MODEL=claude-3.5-sonnet
- Run the application:
python app.py
- Open your browser to
http://localhost:5000
Usage
- Click "Add Bank Account" to create a new account
- Enter account name and description
- Click on an account to view details
- Upload banking statements (PDF, CSV, or images)
- The AI will automatically parse the file and extract asset data
- View current balance and asset history for each account
Supported File Types
- PDF files (bank statements)
- CSV files (transaction exports)
- Images (screenshots of banking apps)
API Endpoints
GET /- Main web interfaceGET /api/accounts- List all accountsPOST /api/accounts- Create new accountDELETE /api/accounts/<id>- Delete accountPOST /api/accounts/<id>/files- Upload file for accountGET /api/accounts/<id>/files- List account filesGET /api/accounts/<id>/history- Get asset history
Technology Stack
- Backend: Flask, SQLAlchemy
- Database: SQLite
- AI: OpenRouter API (configurable LLM models)
- Frontend: HTML, Tailwind CSS, JavaScript
- File Processing: PyPDF2, Pandas, Pillow