How rohan28107/home-loan-calculator works
Home Loan Tracker combines an interactive loan dashboard with an Express API. Users enter loan terms, floating-rate changes, and prepayments; the frontend requests EMI, amortisation, and prepayment-impact results, then presents schedule and summary views. Optional JWT accounts restore and save a user’s loan. Groups and edges reflect documented capabilities and the shown imports/calls; unsampled UI and server wiring are represented only where the README or SOURCE INDEX supports them.
Main entry points: App.jsx Dashboard shell · loan.js Loan routes · loanController.js Loan handlers · authController.js Auth handlers
Components 22
Loan dashboard
- Dashboard shell
frontend/src/App.jsx - Loan state
frontend/src/hooks/useLoan.js - EMI calculator
frontend/src/components/CalculatorTab.jsx - Rate history
frontend/src/components/RateChangesTab.jsx - Prepayment log
frontend/src/components/PrepaymentsTab.jsx - Schedule view
frontend/src/components/ScheduleTab.jsx - Loan summary
frontend/src/components/SummaryTab.jsx
Loan API
- Loan API client
frontend/src/api/loanApi.js - HTTP client
frontend/src/api/client.js - Loan routes
backend/routes/loan.js - Loan handlers
backend/controllers/loanController.js
Calculation engine
- EMI and schedule engine
backend/utils/loanCalculator.js - Saved loan
backend/models/Loan.js
Accounts
- Account controls
frontend/src/components/AuthModal.jsx - Session state
frontend/src/hooks/useAuth.js - Auth API client
frontend/src/api/authApi.js - Auth routes
backend/routes/auth.js - Auth handlers
backend/controllers/authController.js - Token guard
backend/middleware/requireAuth.js - Token utilities
backend/utils/auth.js - User records
backend/models/User.js
Other components
- Borrower
Connections 23
- Borrower → Dashboard shell: uses
README.md - Dashboard shell → Loan state: manages
frontend/src/App.jsx - Dashboard shell → EMI calculator: renders
frontend/src/App.jsx - Dashboard shell → Rate history: renders
frontend/src/App.jsx - Dashboard shell → Prepayment log: renders
frontend/src/App.jsx - Dashboard shell → Schedule view: renders
frontend/src/App.jsx - Dashboard shell → Loan summary: renders
frontend/src/App.jsx - Loan state → Loan API client: requests results
frontend/src/hooks/useLoan.js - Loan API client → HTTP client: sends requests
frontend/src/api/loanApi.js - HTTP client → Loan routes: calls API
README.md - Loan routes → Loan handlers: dispatches
backend/routes/loan.js - Loan handlers → EMI and schedule engine: calculates
backend/controllers/loanController.js - Loan handlers → Saved loan: reads and writes
backend/controllers/loanController.js - Dashboard shell → Account controls: renders
frontend/src/App.jsx - Dashboard shell → Session state: uses
frontend/src/App.jsx - Session state → Auth API client: requests session
frontend/src/hooks/useAuth.js - Auth API client → HTTP client: sends requests
frontend/src/api/authApi.js - Auth routes → Auth handlers: dispatches
backend/routes/auth.js - Auth routes → Token guard: guards profile
backend/routes/auth.js - Loan routes → Token guard: guards saved loan
backend/routes/loan.js - Auth handlers → Token utilities: hashes and signs
backend/controllers/authController.js - Token guard → Token utilities: verifies token
backend/middleware/requireAuth.js - Auth handlers → User records: reads and creates
backend/controllers/authController.js