How nihar8262/expense-tracker works
Expense Tracker is a full-stack personal finance app. A user signs in, works with expenses, budgets, wallets, loans, and reminders in the React client, and receives results through authenticated API calls backed by PostgreSQL. The graph follows the documented client/API/storage flow and preserves major product branches, including the assistant, receipt scanning, and MCP integrations. Some capability implementations are represented by their enclosing directories because their source was not sampled; edges without direct evidence are omitted.
Main entry points: http.ts Request handlers · app.ts Express application · App.tsx React application · pages Finance workspaces
Components 22
Web client
- React application
frontend/src/App.tsx - Sign-in and session
frontend/src/hooks/useAuth.ts - Finance workspaces
frontend/src/pages - API client
frontend/src/services/api.ts
Application API
- Express application
backend/src/app.ts - Request handlers
backend/src/http.ts - Server authentication
backend/src/auth.ts
Finance capabilities
- Personal expenses
backend/src/http.ts - Budgets
backend/src/http.ts - Shared wallets
backend/src/http.ts - Peer loans
backend/src/http.ts - Notifications and bills
backend/src/http.ts
Assistant integrations
- Finance assistant
backend/src/assistant/assistantService.ts - Assistant tools
backend/src/assistant/tools.ts - Receipt scanning
backend/src/mcp/geminiOcr.ts - MCP server
backend/src/mcp/server.ts - Personal access tokens
backend/src/mcp/tokenStore.ts - Semantic search embeddings
backend/src/mcp/embeddingsHelper.ts
Persistence
- PostgreSQL store
backend/src/store/postgres.ts - PostgreSQL
Other components
- Finance user
- Gemini embeddings API
Connections 22
- Finance user → React application: uses
- React application → Sign-in and session: authenticates
frontend/src/App.tsx - React application → Finance workspaces: renders
- Finance workspaces → API client: requests data
frontend/src/services/api.ts - API client → Express application: calls API
- Express application → Server authentication: authenticates requests
backend/src/app.ts - Express application → Request handlers: dispatches
backend/src/app.ts - Request handlers → Personal expenses: handles
- Request handlers → Budgets: handles
backend/src/app.ts - Request handlers → Shared wallets: handles
backend/src/app.ts - Request handlers → Peer loans: handles
backend/src/app.ts - Request handlers → Notifications and bills: handles
backend/src/app.ts - Request handlers → PostgreSQL store: reads and writes
- PostgreSQL store → PostgreSQL: persists data
- Express application → Finance assistant: routes requests
backend/src/app.ts - Finance assistant → Assistant tools: executes tools
backend/src/assistant/assistantService.ts - MCP server → Assistant tools: dispatches tools
backend/src/mcp/server.ts - MCP server → Personal access tokens: authenticates tokens
backend/src/mcp/server.ts - PostgreSQL store → Semantic search embeddings: saves embeddings
backend/src/store/postgres.ts - Semantic search embeddings → Gemini embeddings API: requests vectors
- Finance workspaces → Receipt scanning: scans receipts
- Finance user → MCP server: connects external tools