How cedzzzzzzzzz/budget-tracker works
Budget Tracker is a full-stack personal-finance app. Users authenticate, configure weekly allowances and categories, record expenses manually or by scanning receipts, then review spending and savings analytics or export reports. The React pages call the Flask API; route handlers own backend operations and use database and domain services. The README documents major capabilities not fully visible in the excerpts; those are included, with edges omitted where implementation wiring was not shown.
Main entry points: routes.py API routes · api.js API client · App.jsx React routes · Dashboard.jsx Dashboard
Components 25
Web client
- React routes
frontend/src/App.jsx - API client
frontend/src/api.js - Dashboard
frontend/src/pages/Dashboard.jsx - Budget setup
frontend/src/pages/BudgetSetup.jsx - Savings view
frontend/src/pages/Savings.jsx - Admin dashboard
frontend/src/pages/AdminDashboard.jsx - Reports view
frontend/src/pages/Reports.jsx - Category context
frontend/src/components/CategoriesContext.jsx - Receipt scanner
frontend/src/components/ReceiptScanner.jsx
API and identity
- Flask app
app.py - API routes
api/routes.py - Authentication and security
api/security.py - Email service
api/email_service.py
Budget and spending
- User and expense store
database.py - Category services
api/category_service.py - Category rules
api/categorize.py
Receipt processing
- Receipt extraction
api/receipt_service.py - Gemini OCR provider
api/receipt_providers/gemini.py - Receipt normalization
api/receipt_schema.py
Insights and exports
- Spending insights
api/insights.py - Spending anomalies
api/anomalies.py - PDF reports
api/pdf_report.py - Account export
api/account_export.py
Other components
- Budget user
- Gemini API
Connections 33
- Budget user → React routes: uses
- React routes → Dashboard: routes to
frontend/src/App.jsx - React routes → Budget setup: routes to
frontend/src/App.jsx - React routes → Savings view: routes to
frontend/src/App.jsx - React routes → Admin dashboard: routes to
frontend/src/App.jsx - React routes → Reports view: routes to
frontend/src/App.jsx - Dashboard → API client: requests through
frontend/src/pages/Dashboard.jsx - Budget setup → API client: requests through
frontend/src/pages/BudgetSetup.jsx - Savings view → API client: requests through
frontend/src/pages/Savings.jsx - Admin dashboard → API client: requests through
frontend/src/pages/AdminDashboard.jsx - Reports view → API client: requests through
- Category context → API client: fetches categories
frontend/src/components/CategoriesContext.jsx - Dashboard → Receipt scanner: opens scanner
frontend/src/pages/Dashboard.jsx - Receipt scanner → API client: uploads receipt
frontend/src/components/ReceiptScanner.jsx - API client → API routes: HTTP requests
frontend/src/api.js - Flask app → API routes: registers blueprint
app.py - Flask app → User and expense store: initializes
app.py - API routes → User and expense store: reads and writes
api/routes.py - API routes → Category services: resolves categories
api/routes.py - Category services → Category rules: uses category rules
api/category_service.py - API routes → Receipt extraction: extracts receipts
api/routes.py - Receipt extraction → Gemini OCR provider: requests extraction
api/receipt_service.py - Receipt extraction → Receipt normalization: normalizes result
api/receipt_service.py - Gemini OCR provider → Receipt normalization: uses receipt schema
api/receipt_providers/gemini.py - Gemini OCR provider → Gemini API: calls OCR
- API routes → Spending insights: builds insights
api/routes.py - API routes → Spending anomalies: checks anomalies
api/routes.py - API routes → PDF reports: generates reports
api/routes.py - API routes → Account export: exports account
api/routes.py - API routes → Email service: sends account email
api/routes.py - API routes → Authentication and security: enforces security
api/routes.py - Spending insights → Gemini API: summarizes spending
- PDF reports → Gemini API: optional analysis