How muju3013/loan-tracker works
Personal Loan & EMI Tracker: users authenticate, manage loans and payments, and review schedules, reminders, and outstanding balances. The main runtime is React routes backed by an app-store context; loan calculations and schedule updates are handled in a domain service, with user data synchronized through Firestore. The README documents the core tracking workflow, while sampled source also shows notification and financial-advice services. Some page-to-service wiring is not shown in the excerpts, so uncertain links are omitted.
Main entry points: App.tsx Routes and providers · useAppStore.tsx App store · DashboardPage.tsx Dashboard · LoansPage.tsx Loan pages
Components 22
App and pages
- Routes and providers
src/App.tsx - Sign-in page
src/pages/AuthPage.tsx - Dashboard
src/pages/DashboardPage.tsx - Loan pages
src/pages/LoansPage.tsx - Loan form
src/components/LoanForm.tsx - Holiday settings
src/pages/HolidaysPage.tsx - Notifications page
src/pages/NotificationsPage.tsx
Loan domain
- Loan operations
src/services/loanService.ts - EMI calculator
src/utils/emiCalculator.ts - Due-date engine
src/utils/dueDateEngine.ts - Upcoming EMI selection
src/utils/nextReminder.ts
User data
- App store
src/hooks/useAppStore.tsx - Firestore sync
src/services/firestoreService.ts
Account and reminders
- Auth context
src/hooks/useAuth.tsx - Firebase auth operations
src/utils/firebaseAuth.ts - Reminder service
src/services/notificationService.ts - Loan advice
src/services/aiAdvisorService.ts - Data export
src/services/exportService.ts
Other components
- User
- Cloud Firestore
- Firebase Authentication
- System notifications
Connections 26
- User → Routes and providers: uses
- Routes and providers → Auth context: provides auth
- Routes and providers → App store: provides data
- Routes and providers → Sign-in page: routes to
- Routes and providers → Dashboard: routes to
- Routes and providers → Loan pages: routes to
- Routes and providers → Holiday settings: routes to
- Routes and providers → Notifications page: routes to
- Sign-in page → Auth context: uses
- Auth context → Firebase auth operations: calls
- Firebase auth operations → Firebase Authentication: authenticates with
- Loan pages → Loan form: uses
- Loan form → App store: submits loan
- Holiday settings → App store: updates holidays
- Dashboard → App store: reads summary
- App store → Loan operations: updates loan data
- Loan operations → EMI calculator: calculates installments
- Loan operations → Due-date engine: resolves due dates
- App store → Upcoming EMI selection: selects upcoming EMIs
- App store → Firestore sync: subscribes and syncs
- Firestore sync → Cloud Firestore: reads and writes
- Notifications page → Reminder service: manages reminders
- Reminder service → Cloud Firestore: reads and writes
- Reminder service → System notifications: dispatches
- Dashboard → Loan advice: advice capability
- Loan pages → Data export: export capability