Expense Ledger & Income Zone Assistant for Budgeting, Expenditure, Taxes & Househould-finance.
This is the backend for a privacy-first, LLM-enhanced expense tracking system built with Flask, Google Cloud Vision, OpenAI, and ChromaDB.
It handles:
- OCR-powered receipt parsing
- CSV ingestion
- Transaction storage
- LLM-powered monthly summaries
- Semantic search using vector embeddings
-
📸 Smart Receipt Uploads
Snap a photo → OCR + GPT parses vendor, date, amount, category -
📊 CSV Uploads
Drop bank exports into the system and ingest them into your local DB -
🧠 LLM Financial Summary
Generate a monthly report (total spending, top categories, outliers, suggestions) -
🔍 Vector Searchable Transactions
All expenses are embedded and stored in a local ChromaDB vector DB — for semantic search and RAG -
🔌 Modular Codebase
Flaskfor routing + APIsOpenAIfor parsing and summarizationChromaDBfor semantic memoryGoogle Cloud Visionor Tesseract for OCRSQLitefor simple local persistence
git clone https://github.com/yourname/expense-tracker.git
cd expense-trackerpython3.10 -m venv .venv
source .venv/bin/activatepip install -r requirements.txtCreate a .env file with the following:
OPENAI_API_KEY=your_openai_key
GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/google/credentials.jsonEndpoint Method Description /upload_receipt POST Upload a photo of a receipt /upload_csv POST Upload a bank CSV file /add_expense POST Add an expense manually (JSON) /transactions GET List all transactions /transactions/ DELETE Delete a transaction by ID / GET View summary report (basic HTML)
Run the following script to generate a GPT-powered monthly spending report (e.g. cron job):
python rag_query.py├── app.py # Main Flask app
├── utils/
│ └── openai_util.py # OCR + OpenAI parsing
├── scripts/
│ └── load_db_format_chunks.py # Format transactions for vector DB
├── rag_query.py # Monthly summary via GPT
├── templates/
│ └── report.html # Jinja template (optional)
├── requirements.txt
├── .envFeel free to fork, star, or yell at me on Twitter.
Pull requests welcome!