LoanWise — Intelligent Student Debt Optimizer
Inspiration
Student loan debt in the US has crossed $1.7 trillion, affecting over 45 million borrowers. Most graduates default to the Standard 10-year repayment plan without realizing they could save thousands by switching to an Income-Driven Repayment (IDR) plan or qualifying for Public Service Loan Forgiveness (PSLF). The problem isn't a lack of options — it's a lack of clarity. Existing tools are either buried behind paywalls, overwhelmed with jargon, or require hours of manual spreadsheet work.
We built LoanWise because we believe every borrower deserves a clear, instant answer to one question: "What's the smartest way to pay off my loans?" — without needing a financial advisor or a finance degree to understand it.
What it does
LoanWise is a real-time student loan repayment optimizer that takes a borrower's financial profile and instantly compares every available repayment strategy side by side.
- Smart Calculator — Input your loan balance, interest rate, income, household size, and employment type. LoanWise runs full amortization simulations across Standard, Extended, IDR (SAVE/REPAYE), and PSLF plans in real-time.
- AI Recommendation Engine — Automatically identifies the plan that minimizes total cost and highlights projected savings with a clear verdict.
- Visual Dashboards — Interactive Chart.js visualizations show balance burn-down curves and principal-vs-interest breakdowns so borrowers can see the difference between plans.
- Forgiveness Eligibility Checker — Automated screening against PSLF, IDR Forgiveness, Teacher Loan Forgiveness, and Borrower Defense programs with pass/fail criteria.
- Finley — AI Finance Advisor — A Groq-powered chatbot (Llama 3.3 70B) that answers student loan questions in plain English with short, actionable advice and a built-in disclaimer.
- Personalized AI Insights — After every analysis, Groq generates 4 tailored savings tips specific to the borrower's exact numbers.
- User Accounts & Saved Plans — Firebase Auth (Google, Email, Phone OTP, Anonymous) with Firestore persistence lets users save and revisit their analyses over time.
How we built it
| Layer | Technology |
|---|---|
| Frontend | Vanilla HTML, CSS, JavaScript — no frameworks, fully hand-crafted |
| Design System | Custom CSS tokens inspired by Stripe/Linear — Inter + JetBrains Mono typography, slate/indigo palette |
| Calculation Engine | calculations.js — pure JS implementing federal amortization formulas, IDR discretionary income logic, and PSLF simulation |
| Data Visualization | Chart.js 4.4 — line charts for balance trajectories, doughnut charts for cost breakdown |
| AI Layer | Groq API (Llama 3.3 70B Versatile) — powers both the Finley chatbot and post-analysis savings tips |
| Authentication | Firebase Auth — Google Sign-In, Email/Password, Phone OTP with reCAPTCHA, Anonymous |
| Database | Cloud Firestore — stores saved analyses per user (uid-scoped collections) |
| Analytics | Firebase Analytics — tracks sign-ups, logins, analysis runs, saves, and page views |
| Icons | Phosphor Icons (via CDN) |
The architecture is intentionally zero-build — no bundler, no Node server, no npm install. Just open index.html in a browser and it works. This makes it deployable anywhere (Netlify, Vercel, GitHub Pages, or even a USB drive).
Challenges we ran into
- Amortization accuracy — Federal IDR plans use complex discretionary income calculations tied to the Federal Poverty Level, which varies by household size. Getting the math right required cross-referencing official DOE documentation and testing edge cases (zero income, very high balances, etc.).
- Auth gating UX — We wanted the calculator to require sign-in without feeling hostile. The solution was letting users freely adjust sliders and see the live preview, but gating the "Run Analysis" action — which opens a smooth login modal with 4 options instead of a hard redirect.
- Groq response quality — Getting the chatbot to stay concise and on-topic required careful prompt engineering. Early iterations returned 500-word essays. We solved this with strict system instructions (
max 3-5 sentences,always end with disclaimer,decline unrelated topics),max_tokens: 300, andtemperature: 0.5. - Phone OTP flow — Firebase Phone Auth requires invisible reCAPTCHA, which has quirks around re-initialization after errors. We had to handle verifier reset and edge cases where the popup was blocked.
- Performance without a framework — Building a responsive, interactive app with raw DOM manipulation meant writing clean, modular code from scratch. No React state management — just careful
querySelectorwiring and event delegation.
Accomplishments that we're proud of
- The entire app is a single HTML page with no build step, no dependencies to install, and no server required. It's genuinely portable.
- Finley (the chatbot) actually gives good advice. The prompt engineering keeps responses short, specific, and always accompanied by a disclaimer. It refuses off-topic questions gracefully.
- The live preview sidebar updates DTI ratios and monthly payments as you drag sliders — it feels like a real fintech product, not a hackathon prototype.
- 4 auth methods in one clean modal — Google, Email, Phone OTP, and Anonymous guest access, all with friendly error messages and smooth transitions.
- The amortization table alongside visual charts gives users both the "feel" and the "facts" — you can see the curve and verify the exact numbers.
- Professional design without Tailwind or any CSS framework — a fully custom design system that looks like it belongs on a Y Combinator demo day.
What we learned
- Amortization math is deceptively hard. The Standard plan formula is straightforward, but IDR plans involve poverty guidelines, family size multipliers, discretionary income caps, and 20-year forgiveness horizons with potential tax implications. We gained deep respect for anyone building actual loan servicer software.
- Prompt engineering is a real skill. The difference between a chatbot that rambles and one that gives crisp, useful answers comes down to 10 lines of system instructions. Constraints like "max 3-5 sentences" and "always end with disclaimer" made Finley dramatically more useful.
- Firebase Auth covers more ground than expected. Supporting 4 login methods (including phone OTP with reCAPTCHA) in a static site with zero backend was surprisingly smooth. The compat SDK just works.
- You don't need React. For a focused, single-page tool like this, vanilla JS with clean DOM management is faster to build, faster to load, and easier to debug than any framework would have been.
What's next for LoanWise
- PDF Export — Let users download their full analysis (charts, table, recommendation, forgiveness results) as a branded PDF report they can share with a financial advisor.
- Amortization Schedule Drill-Down — Interactive month-by-month table showing principal, interest, and remaining balance for any selected plan.
- What-If Scenarios — "What if I pay $100 extra per month?" or "What if my income increases 5% yearly?" — side-by-side scenario comparison.
- Loan Refinancing Comparison — Connect real-time rate data to compare federal vs. private refinancing options.
- Multi-Loan Support — Handle borrowers with multiple loans at different rates (Stafford, PLUS, Perkins) and optimize across the portfolio.
- Mobile App — Wrap the existing codebase in a PWA or React Native shell for native mobile experience with push notifications for payment reminders.
- Finley Memory — Let the chatbot remember the user's last analysis so it can give hyper-specific advice like "Based on your $50K balance at 5.5%, here's what I'd suggest..."


Log in or sign up for Devpost to join the conversation.