How lochan87/spenza works
Spenza is a personal expense-tracking PWA. A signed-in user enters or imports expenses, then reviews spending through dashboard, budgets, trips, recurring items, and insights; feature services persist and retrieve user-scoped data in Firebase. The graph preserves the distinct transaction, import, recurring, budgeting, trip, and analysis areas. The excerpts confirm app routing, dashboard fetching, recurring confirmation, and import calls; other feature-to-service links reflect documented capabilities and module structure, not inspected call sites.
Main entry points: firestore.ts Firestore data store · App.tsx App routes · useRecurringCheck.ts Due-item prompts · transactions.ts Transaction services
Components 24
App and access
- App routes
src/App.tsx - Authentication state
src/hooks/useAuth.tsx - Google sign-in
src/pages/LoginPage.tsx - Protected app shell
src/components/layout/AppLayout.tsx
Expense tracking
- Dashboard
src/features/dashboard/DashboardPage.tsx - Dashboard data
src/features/dashboard/useDashboardData.ts - Transactions and categories
src/features/transactions/TransactionsPage.tsx - Bulk import
src/features/import/ImportPage.tsx - Trip tracking
src/features/trips/TripsPage.tsx
Planning and analysis
- Recurring expenses
src/features/recurring/RecurringPage.tsx - Due-item prompts
src/features/recurring/useRecurringCheck.ts - Monthly budgets
src/features/budgets/BudgetPage.tsx - Spending insights
src/features/insights/InsightsPage.tsx - CSV export
src/services/exportCsv.ts
Data services
- Onboarding seeds
src/services/seed.ts - Transaction services
src/services/transactions.ts - Import processing
src/services/importExcel.ts - Trip services
src/services/trips.ts - Recurring services
src/services/recurring.ts - Budget services
src/services/budgets.ts - Insight computation
src/services/insights.ts - Firestore data store
src/firebase/firestore.ts
Other components
- User
- Firebase Auth
Connections 33
- User → Google sign-in: signs in
- Google sign-in → Firebase Auth: authenticates
- App routes → Authentication state: provides auth
- App routes → Google sign-in: routes to
- App routes → Protected app shell: wraps protected pages
- App routes → Onboarding seeds: runs on login
- App routes → Due-item prompts: checks due items
- User → Dashboard: reviews spending
- Dashboard → Dashboard data: requests data
- Dashboard data → Transaction services: fetches transactions
- Dashboard data → Firestore data store: reads data
- User → Transactions and categories: records expenses
- Transactions and categories → Transaction services: manages transactions
- User → Bulk import: uploads spreadsheet
- Bulk import → Import processing: parses and imports
- Import processing → Firestore data store: writes transactions
- User → Trip tracking: tracks trip spend
- Trip tracking → Trip services: manages trips
- User → Recurring expenses: manages recurring items
- App routes → Due-item prompts: mounts prompt check
- Due-item prompts → Recurring services: loads and advances items
- Due-item prompts → Transaction services: logs confirmed expense
- User → Monthly budgets: sets budgets
- Monthly budgets → Budget services: manages budgets
- User → Spending insights: reviews insights
- Spending insights → Insight computation: requests analysis
- User → CSV export: exports transactions
- Onboarding seeds → Firestore data store: seeds user data
- Transaction services → Firestore data store: reads and writes
- Trip services → Firestore data store: reads and writes
- Recurring services → Firestore data store: reads and writes
- Budget services → Firestore data store: reads and writes
- Insight computation → Firestore data store: reads and caches