How sumit-chame/paisapal-money-tracker works
PaisaPal is an offline-first personal finance PWA. Users record expenses, income, or transfers, then review daily safe-to-spend guidance, budgets, and spending insights; settings support categories, accounts, data ownership, and optional cloud accounts. The local Dexie database is the main persistence layer, with Zustand coordinating UI state. The README documents goals, subscriptions, expense splitting, voice entry, and backups, but their implementations are not all sampled; those links are therefore limited to documented capabilities rather than inferred call chains. The optional authentication service is separate from local finance data.
Main entry points: AddSheet.tsx Transaction entry · db.ts IndexedDB finance store · AppShell.tsx App navigation · api.ts Authentication API client
Components 31
App experience
- App navigation
src/components/AppShell.tsx - Home and activity
src/screens/HomeScreen.tsx - Settings and backups
src/screens/MeScreen.tsx
Money tracking
- Transaction entry
src/components/AddSheet.tsx - Natural language parser
src/lib/parser.ts - Currency conversion
src/lib/currency.ts - Category management
src/components/CategoryManagerSheet.tsx - Category editor
src/components/AddCategorySheet.tsx - Account editor
src/components/AddAccountModal.tsx - Friend editor
src/components/AddFriendModal.tsx
Planning and insights
- Budgets and subscriptions
src/screens/BudgetsScreen.tsx - Spending insights
src/screens/InsightsScreen.tsx - Goals and renewals
src/screens/BudgetsScreen.tsx - Trends and money leaks
src/screens/InsightsScreen.tsx - Safe-to-spend calculation
src/lib/safeToSpend.ts
Local data and state
- IndexedDB finance store
src/lib/db.ts - UI and settings state
src/store/index.ts - Local data initialization
src/lib/init.ts - Default categories and data
src/lib/seeds.ts
Optional accounts
- Account screens
src/screens/auth/AccountScreen.tsx - Authentication state
src/lib/auth/store.ts - Authentication API client
src/lib/auth/api.ts - Login and registration
api/auth/login.ts - Registration endpoint
api/auth/register.ts - Account endpoint
api/auth/me.ts - Logout endpoint
api/auth/logout.ts - Tokens and password security
api/_lib/auth.ts - Cloud user database
api/_lib/mongodb.ts - Local auth fallback
api/_lib/localStore.ts
Other components
- User
- Browser and local storage
Connections 44
- User → App navigation: uses
src/components/AppShell.tsx - App navigation → Home and activity: shows
src/components/AppShell.tsx - App navigation → Budgets and subscriptions: shows
src/components/AppShell.tsx - App navigation → Spending insights: shows
src/components/AppShell.tsx - App navigation → Settings and backups: shows
src/components/AppShell.tsx - App navigation → Transaction entry: opens
src/components/AppShell.tsx - User → Transaction entry: records transaction
src/components/AddSheet.tsx - Transaction entry → Natural language parser: parses text
src/components/AddSheet.tsx - Transaction entry → Currency conversion: converts amount
src/components/AddSheet.tsx - Transaction entry → IndexedDB finance store: writes transaction
src/components/AddSheet.tsx - Transaction entry → Category editor: opens
src/components/AddSheet.tsx - Transaction entry → Account editor: opens
src/components/AddSheet.tsx - Transaction entry → Friend editor: opens
src/components/AddSheet.tsx - Home and activity → IndexedDB finance store: reads activity
src/screens/HomeScreen.tsx - Home and activity → Safe-to-spend calculation: calculates allowance
src/screens/HomeScreen.tsx - Home and activity → UI and settings state: opens entry
src/screens/HomeScreen.tsx - Budgets and subscriptions → IndexedDB finance store: reads budgets
src/screens/BudgetsScreen.tsx - Budgets and subscriptions → Goals and renewals: tracks goals and renewals
README.md - Spending insights → IndexedDB finance store: reads transactions
src/screens/InsightsScreen.tsx - Spending insights → Trends and money leaks: presents trends
README.md - Settings and backups → IndexedDB finance store: manages local data
src/screens/MeScreen.tsx - Settings and backups → Category management: opens
src/screens/MeScreen.tsx - Category management → IndexedDB finance store: manages categories
src/components/CategoryManagerSheet.tsx - Category management → Category editor: opens
src/components/CategoryManagerSheet.tsx - Local data initialization → IndexedDB finance store: initializes
src/lib/init.ts - Local data initialization → Default categories and data: loads defaults
src/lib/init.ts - UI and settings state → IndexedDB finance store: reads and updates settings
src/store/index.ts - User → Account screens: manages account
- Account screens → Authentication state: requests account actions
src/screens/auth/AccountScreen.tsx - Authentication state → Authentication API client: calls
src/lib/auth/store.ts - Authentication API client → Login and registration: requests login
README.md - Authentication API client → Registration endpoint: requests registration
README.md - Authentication API client → Account endpoint: checks account
README.md - Authentication API client → Logout endpoint: requests logout
README.md - Login and registration → Tokens and password security: verifies credentials
api/auth/login.ts - Registration endpoint → Tokens and password security: hashes password
api/auth/register.ts - Account endpoint → Tokens and password security: verifies token
api/auth/me.ts - Logout endpoint → Tokens and password security: clears cookie
api/auth/logout.ts - Login and registration → Cloud user database: loads user data
api/auth/login.ts - Registration endpoint → Cloud user database: stores user
api/auth/register.ts - Account endpoint → Cloud user database: reads user
api/auth/me.ts - Cloud user database → Local auth fallback: falls back to
api/_lib/mongodb.ts - Browser and local storage → IndexedDB finance store: stores offline data
README.md - Browser and local storage → User: offers installable PWA
README.md