# Build brief — a focused alternative to Mortgage Coach

> **Verdict:** Partly, if you narrow it · **Buildability:** 38/100 · **Category:** Finance Accounting
> **Source:** https://www.canitbevibecoded.com/mortgage-coach
> Independent editorial assessment from Can It Be Vibe Coded? Not affiliated with, endorsed by, or derived from Mortgage Coach. Verify current pricing and capabilities before acting.

## Context

**Mortgage Coach** — Loan officer tool that builds side-by-side loan comparison presentations (Total Cost Analysis) to show borrowers the long-term cost of each option.

The math here is not exotic: amortization schedules, PMI drop-off, points breakeven, net cost after N years, rent versus buy. An agent can build a clean side-by-side scenario comparator with charts and a printable one-pager in a single session, and for a person modeling their own refinance that is genuinely enough. What you cannot one-shot is the part that makes it a business tool: pulling live loan scenarios out of the LOS or pricing engine, compliance-reviewable output your employer will actually let you send to a borrower, and the delivery layer that tracks whether the client opened the presentation. If you are a licensed originator, your DIY version is a scratchpad, not something you put in front of a client. If you are the borrower trying to sanity check what your lender sent you, the DIY version is arguably better because you control the assumptions.

This brief describes a focused, single-operator replacement for the part of Mortgage Coach that is genuinely reproducible. It is deliberately narrower than the product it replaces, and it says so in writing. Build the useful core; do not pretend to have rebuilt the rest.

## What you are building

Enter two to four loan scenarios, get amortization schedules, breakeven points and total-cost-over-time charts side by side, then print a one-page summary.

- Model a narrow bookkeeping workflow with explicit review and export steps.
- A responsive interface with real empty, loading, success, and error states.

## Requirements

### Functional

- Node 20+.
- A browser.

### Data and integrations

- Nothing else: no accounts, no API keys, all math runs locally.

Each of these needs a real account, credential, or quota. Set them up before writing feature code.

### Non-functional

- Accessibility: semantic markup, labelled controls, visible focus, and reduced-motion support.
- Security: server-side secrets, validated input, and no credentials in the client bundle.
- Reliability: retries with backoff on external calls, and a clear failure state when a provider is down.
- Portability: the operator can export their data and leave without losing it.

## Implementation brief

Build a local, single-page loan comparison tool called "Loan Compare". No backend, no accounts, no telemetry, no external API calls.

Stack, non-negotiable:
- Vite + React + TypeScript
- Tailwind CSS for styling
- Recharts for charts
- Zod for input validation
- Vitest for the math tests
- State persisted to localStorage, no server

Core data model: a Scenario has name, loan amount, home price, down payment, interest rate, term in months, loan type (fixed or ARM), optional ARM fields (initial fixed period, adjustment cap, lifetime cap, assumed adjusted rate), points paid, lender fees, property tax annual, homeowners insurance annual, HOA monthly, mortgage insurance monthly plus the LTV at which it drops off, and extra monthly principal payment.

Build these features:
1. Add, duplicate, rename and delete scenarios. Support 2 to 4 side by side.
2. A pure TypeScript amortization engine in src/lib/amortize.ts that returns a month by month schedule: payment, interest, principal, balance, MI charged, cumulative interest, cumulative cost. Handle extra principal, MI drop-off at the configured LTV using the original home price, and ARM rate steps after the fixed period.
3. A comparison table: monthly payment now, monthly payment after MI drops, total interest, total cost at 3, 5, 7, 10 years and full term, remaining balance at each of those horizons, and net cost after subtracting principal paid down.
4. Charts: cumulative cost over time per scenario, balance over time, and a breakeven chart showing where a higher-points scenario overtakes a lower one.
5. A "what changed" panel that plainly states which scenario wins at each horizon and by how much.
6. A print stylesheet so Cmd+P produces a clean one page summary with the table and the cumulative cost chart. No PDF library.
7. Share by encoding all scenarios into the URL hash, so a link reproduces the comparison with no server.
8. Vitest tests for the engine: a known 30 year fixed schedule, MI drop-off timing, extra principal shortening the term, and an ARM step.

Explicitly out of scope: live rate feeds, credit pulls, loan origination system or CRM integrations, e-signature, borrower open tracking, user accounts, any compliance or disclosure language. Put a visible footer: "Estimates only. Not a loan disclosure or an offer of credit."

If you ever add anything needing a secret, read it from .env and commit .env.example only. Ship a README with run and test commands and a one paragraph explanation of the amortization assumptions.

## Delivery standard

- Inspect the repository first, then write a short implementation plan before writing code.
- Deliver the smallest complete end-to-end workflow first; every primary control must work against persisted data.
- Use real validation and storage; never substitute fake dashboards, decorative controls, hard-coded success states, or mock integrations.
- Include responsive layouts plus genuine empty, loading, success, validation, and failure states.
- Keep secrets server-side in environment variables, provide .env.example, and never commit credentials or user data.
- Add structured logs around every external call and return actionable errors without leaking sensitive details.
- Write unit tests for the core logic and one automated test of the main user journey.
- Finish with a README covering setup, architecture, data location, backups, tests, deployment, and known limitations.

## Acceptance criteria

- [ ] A clean install starts the app using only the README and .env.example.
- [ ] The primary journey works from first visit through saved result, reload, edit, export, and deletion where applicable.
- [ ] Invalid input, missing configuration, provider failure, and an empty database each have a usable state.
- [ ] The interface works at 390px and 1440px, is keyboard navigable, and shows visible focus on every control.
- [ ] Tests, type checking, linting, and a production build all pass with no ignored failures.
- [ ] No part of the interface implies a live integration, security guarantee, or scale capability that was not actually built and verified.

## Non-goals

Do not build these, and do not claim to have replaced them:

- Integrations with loan origination systems, pricing engines and CRMs, so every scenario is typed in by hand.
- Compliance-vetted presentation output and audit trail, which is the entire reason a regulated lender licenses this instead of using a spreadsheet.
- Borrower engagement tracking: who opened the presentation, how long they looked, which option they clicked.
- Polished branded video and mobile presentation formats that agents and borrowers are used to receiving.
- Someone else maintaining the edge cases: ARMs, buydowns, MI structures, state-specific cost lines.

## What you still own after launch

- Secure credentials, rotate secrets, and handle provider rate limits.
- Run migrations, backups, restores, and dependency updates.
- Test the critical journey after every model, API, or hosting change.
- Monitor failures and fix the edge cases a first prompt will miss.
- Maintain every third-party integration as APIs and OAuth rules change.

## Risk

**High consequence.** Use this as a prototype or personal aid. Keep a qualified human and an established provider in the loop for consequential decisions.

Editorial confidence in this assessment: medium. No reviewed project implementation is linked yet.

---

Generated by [Can It Be Vibe Coded?](https://www.canitbevibecoded.com) · Full report: https://www.canitbevibecoded.com/mortgage-coach
