How platypus12345/allowanceai works
AllowanceAI is a student personal-finance assistant, currently rebuilding its core on PostgreSQL and pgvector. The main journey is account setup and allowance entry, transaction capture by hand, Android SMS, or Setu Account Aggregator, duplicate-aware persistence, a safe-to-spend dashboard, then plain-English questions answered with transaction citations and SQL-grounded totals. The map also preserves reporting, live updates, and hybrid retrieval. Relationships across unsampled routes and mobile screens rely on README documentation; source excerpts confirm ingestion and dashboard internals, but not every UI-to-API call.
Main entry points: ingest.js Ingestion routes · api.py RAG API · App.jsx Web app routes · dashboardService.js Dashboard aggregates
Components 26
Web experience
- Web app routes
client/src/App.jsx - Authentication
client/src/context/AuthContext.jsx - Dashboard UI
client/src/pages/DashboardV2Page.jsx - Monthly reports
client/src/pages/MonthReportPage.jsx
Finance API
- Express API
server/index.js - Auth routes
server/routes/auth.js - Ingestion routes
server/routes/ingest.js - Parse and deduplicate
server/services/ingestService.js - Dashboard aggregates
server/services/dashboardService.js - Safe-to-spend health
server/utils/financialHealth.js - Live updates
server/services/realtime.js - Assistant bridge
server/services/assistantClient.js
Grounded assistant
- RAG API
ai-service/rag/api.py - Transaction indexing
ai-service/rag/indexer.py - Local embeddings
ai-service/rag/embeddings.py - Hybrid retrieval
ai-service/rag/retrieval.py - Answer workflow
ai-service/rag/graph.py - LLM provider
ai-service/rag/llm.py
Mobile ingestion
- Mobile screens
mobile/app/(tabs)/index.tsx - SMS capture
mobile/src/services/smsParser.ts - Ingest client
mobile/src/api/ingestClient.ts
Shared state
- Transaction records
server/models/Expense.js - PostgreSQL + pgvector
Other components
- Student
- Bank SMS
- Setu Account Aggregator
Connections 32
- Student → Web app routes: opens app
client/src/App.jsx - Web app routes → Authentication: provides auth
client/src/App.jsx - Web app routes → Dashboard UI: routes to
client/src/App.jsx - Web app routes → Monthly reports: routes to
client/src/App.jsx - Student → Mobile screens: uses
README.md - Bank SMS → SMS capture: provides messages
README.md - SMS capture → Ingest client: submits parsed data
- Ingest client → Ingestion routes: sends transactions
README.md - Setu Account Aggregator → Ingestion routes: supplies bank data
README.md - Student → Ingestion routes: enters transactions
README.md - Express API → Auth routes: mounts routes
server/index.js - Express API → Ingestion routes: mounts routes
server/index.js - Ingestion routes → Parse and deduplicate: delegates ingestion
server/routes/ingest.js - Parse and deduplicate → Transaction records: writes deduplicated rows
server/services/ingestService.js - Transaction records → PostgreSQL + pgvector: stored in
README.md - Ingestion routes → Dashboard aggregates: invalidates summary
server/routes/ingest.js - Ingestion routes → Live updates: publishes update
server/routes/ingest.js - Ingestion routes → Assistant bridge: requests indexing
server/routes/ingest.js - Dashboard UI → Dashboard aggregates: loads summary
README.md - Dashboard aggregates → Safe-to-spend health: uses health logic
server/services/dashboardService.js - Dashboard aggregates → PostgreSQL + pgvector: aggregates transactions
server/services/dashboardService.js - Live updates → Dashboard UI: pushes updates
README.md - Assistant bridge → RAG API: calls assistant
README.md - RAG API → Transaction indexing: indexes transactions
ai-service/rag/api.py - Transaction indexing → Local embeddings: embeds records
- RAG API → Hybrid retrieval: retrieves evidence
ai-service/rag/api.py - Hybrid retrieval → Local embeddings: embeds queries
ai-service/rag/retrieval.py - Hybrid retrieval → PostgreSQL + pgvector: searches vectors and text
README.md - RAG API → Answer workflow: runs answer workflow
ai-service/rag/api.py - Answer workflow → LLM provider: generates answer
- RAG API → Student: returns cited answer
README.md - Monthly reports → Student: shows report