How shivang1244/ai-financial-sms-expenses-tracker-app- works
This repository is the Python backend for an AI financial-SMS expense tracker; the Android client is described in the README but is not present in the tree. The main workflow is Android-submitted SMS and coordinates → transaction filtering → location enrichment and LLM-based field extraction → persistence, with a separate transaction-history API. The graph distinguishes the predictor’s helper layers, MySQL access, and external geocoding/LLM services. Relationships are based on the excerpts and README; unsampled client implementation is not represented.
Main entry points: app.py FastAPI endpoints · predictor.py SMS predictor · transaction_repository.py Transaction repository · geo_utils.py Reverse geocoder
Components 13
API and orchestration
- FastAPI endpoints
app.py - Memory fallback
app.py
Transaction processing
- SMS predictor
predictor.py - SMS filtering
utils.py - LLM extraction
predictor.py
External enrichment
- Reverse geocoder
geo_utils.py - LLM request client
llm_models.py
Persistence
- Transaction repository
transaction_repository.py - MySQL connector
db.py
Other components
- Android app
- OpenRouter API
- OpenStreetMap geocoder
- MySQL database
Connections 14
- Android app → FastAPI endpoints: submits SMS
README.md - FastAPI endpoints → SMS predictor: processes SMS
app.py - SMS predictor → SMS filtering: checks transaction
predictor.py - SMS predictor → Reverse geocoder: geocodes coordinates
predictor.py - Reverse geocoder → OpenStreetMap geocoder: reverse geocodes
geo_utils.py - SMS predictor → LLM extraction: extracts fields
predictor.py - LLM extraction → LLM request client: requests prediction
predictor.py - LLM request client → OpenRouter API: sends prompt
llm_models.py - FastAPI endpoints → Transaction repository: saves transaction
app.py - FastAPI endpoints → Transaction repository: fetches history
app.py - Transaction repository → MySQL connector: opens connection
transaction_repository.py - MySQL connector → MySQL database: connects
db.py - FastAPI endpoints → Memory fallback: stores fallback
app.py - FastAPI endpoints → Android app: returns results
README.md