How codedbankai/expenditure-analyzer works
Expenditure Analyzer accepts bank and UPI statements, normalizes and cleans transactions, categorizes spending, then serves analysis and recommendations in a dashboard. Users can upload multiple files, complete manual column mapping when detection is uncertain, revise uncategorized vendor categories, and clear session data. Upload, analysis, and session routes coordinate the processing modules and an in-memory, expiring session store. The README documents additional dashboard views; those are represented by the analysis response and client renderer. Edges reflect the excerpts and README; unsampled template behavior is not inferred.
Main entry points: upload.py Upload handler · session_store.py In-memory sessions · analysis.py Analysis endpoint · session.py Session actions
Components 14
Statement ingestion
- Upload handler
app/routes/upload.py
Transaction processing
- Format parsing
app/core/parsing.py - Transaction cleaning
app/core/cleaning.py - Transaction categories
app/core/categorize.py - Category keywords
app/config/categories.yaml - Spending analysis
app/core/analysis.py
Sessions and API
- Analysis endpoint
app/routes/analysis.py - Session actions
app/routes/session.py - In-memory sessions
app/core/session_store.py - App and cleanup
app/main.py
Dashboard experience
- Upload interface
app/static/js/upload.js - Dashboard views
app/static/js/dashboard.js
Other components
- User
- Browser
Connections 17
- User → Upload interface: selects statements
app/static/js/upload.js - Upload interface → Upload handler: uploads files
app/static/js/upload.js - Upload interface → Upload handler: submits mapping
app/static/js/upload.js - Upload handler → Format parsing: parses and maps
app/routes/upload.py - Upload handler → Transaction cleaning: cleans rows
app/routes/upload.py - Upload handler → Transaction categories: categorizes rows
app/routes/upload.py - Transaction categories → Category keywords: loads keywords
app/core/categorize.py - Upload handler → In-memory sessions: creates session
app/routes/upload.py - Upload handler → In-memory sessions: stores transactions
app/routes/upload.py - App and cleanup → In-memory sessions: purges expired
app/main.py - Browser → Dashboard views: views dashboard
README.md - Dashboard views → Analysis endpoint: requests analysis
app/static/js/dashboard.js - Analysis endpoint → In-memory sessions: reads session
app/routes/analysis.py - Analysis endpoint → Spending analysis: computes metrics
app/routes/analysis.py - Dashboard views → Session actions: manages categories and data
app/static/js/dashboard.js - Session actions → In-memory sessions: reads and deletes
app/routes/session.py - Session actions → Transaction categories: updates categories
app/routes/session.py