How anguschenn/senior-capstone works
SmartSpend is a personal-finance application whose visible runtime here is its Flask backend; the Flutter UI and database schema are named in the README but absent from this tree. The main workflow is authenticated API access to link bank accounts, sync Plaid transactions into Supabase, and return account or transaction data; sync changes also trigger post-sync processing. Other documented branches cover budgets, subscription detection, forecasts, and an AI finance assistant with deterministic query handling and LLM responses. The excerpts establish route and webhook dispatch, but do not expose all service internals, so uncertain internal wiring is omitted.
Main entry points: plaid_routes.py Plaid Routes · plaid_sync.py Plaid Sync · ai_routes.py Chat API · sync_jobs.py Sync Jobs
Components 25
API and Identity
- Flask API Routes
python/routes - App Factory
python/app_factory.py - Authentication
python/auth.py
Banking Data
- Plaid Routes
python/routes/plaid_routes.py - Webhook Receiver
python/routes/webhook_routes.py - Webhook Verification
python/plaid_webhook.py - Sync Jobs
python/sync_jobs.py - Plaid Sync
python/plaid_sync.py - Supabase Repository
python/supabase_repo.py - Supabase
- Plaid API
Finance Insights
- Subscription Detection
python/subscription_detector.py - Financial Snapshots
python/ai/snapshot_service.py - Budget API
python/routes/budget_routes.py - Budget Progress
python/budget_progress.py
AI Assistant
- Prediction API
python/routes/ai_routes.py - Prediction Service
python/ai/predict_service.py - Chat API
python/routes/ai_routes.py - Chat Service
python/ai/chat_service.py - Intent Router
python/ai/intent_router.py - Query Parser
python/ai/query_parser_v2.py - Query Planner
python/ai/query_planner_v2.py - Query Executors
python/ai/query_executors_v2.py
Other components
- App User
- LLM Provider
Connections 24
- App User → Flask API Routes: requests
- Flask API Routes → App Factory: served by
- Plaid Routes → Authentication: requires identity
- Budget API → Authentication: requires identity
- Chat API → Authentication: requires identity
- Plaid Routes → Plaid API: calls
- Plaid Routes → Supabase: reads and writes
- Plaid Routes → Plaid Sync: syncs transactions
- Plaid Routes → Subscription Detection: triggers post-sync
- Plaid Routes → Financial Snapshots: passes snapshot service
- Webhook Receiver → Webhook Verification: verifies payload
- Webhook Verification → Plaid API: fetches verification key
- Webhook Receiver → Sync Jobs: dispatches sync
- Sync Jobs → Plaid Sync: syncs item
- Sync Jobs → Financial Snapshots: passes snapshot service
- Plaid Sync → Plaid API: fetches transactions
- Plaid Sync → Supabase Repository: stores transactions
- Supabase Repository → Supabase: reads and writes
- Budget API → Budget Progress: computes progress
- Budget Progress → Supabase: reads budget data
- Prediction API → Prediction Service: requests forecast
- Chat API → Chat Service: handles chat
- Chat Service → LLM Provider: generates replies
- Chat API → Chat Service: suggests category