Refi Calculator
Refi Calculator is a multi-interface toolkit that helps homeowners and finance professionals evaluate refinancing decisions. The package blends a full-featured Tkinter GUI with a Streamlit placeholder for future web delivery, a CLI entry point, and a core analytics library so every interface relies on consistent calculations.
Key Capabilities
- Side-by-side loan comparisons for current vs. proposed mortgages covering nominal payments, after-tax analysis, and amortization.
- Decision support such as breakeven and holding-period tables, plus accelerated payoff scenarios that keep target payments constant.
- Insightful visualizations via the Tkinter tabbed UI: refreshed cumulative savings chart, loan balance comparison, and the amortization table that highlights cumulative interest deltas.
- Market intelligence when the
FRED_API_KEYis provided: historical 30-year fixed rates, live default refinance estimates, and dual-tenor comparison tables. - Export-ready data for every tab so downstream tools or reports can consume precise CSV exports.
Quick Links & Navigation
| Destination | Description |
|---|---|
| User Guide | Guides for installing, configuring, and using the GUI or web experience. |
| API Reference | Auto-generated reference for the core analytics library under reference/. |
| Codebase Overview | Key modules live under src/refi_calculator/, including core/, gui/, and web/. |
| Automation/Entry Points | Entry scripts under bin/ for CLI launches and PowerShell wrappers. |
Use the navigation pane (Home, User Guide, API Reference) to jump into each document or explore the generated reference
pages from docs/gen_ref_pages.py.
Environment & Entry Points
- Runtime requirements: Python 3.13+, Poetry-managed dependencies, and an optional
.venv/for isolation. - GUI launch:
poetry run refi-calculator(the console script wires intorefi_calculator.gui.app:main). - Hosted Streamlit experience: Visit https://refi-calculator.streamlit.app/ for the hosted preview powered by the Streamlit placeholder layers.
- Web placeholder: enable
[web]extras and runpoetry run refi-calculator-webto startstreamlit run src/refi_calculator/web/app.pyand continue iterating toward the future web UI. - CLI scaffolding:
src/refi_calculator/cli.pyandbin/refi-calculator.pyshare logging and configuration plumbing for command-line workflows.
Development & Quality
- Testing:
poetry run pytest(tests live undertests/followingtest_*.py). - Pre-commit checks:
poetry run pre-commit run --all-fileskeeps formatting (Black, Ruff, isort) and linting in sync. - Documentation generation:
mkdocspowers static sites with plugins for search, literate navigation, and mkdocstrings referencingsrc/. - Versioning and releases: use conventional commits (
feat,fix,docs, etc.) and keep changelog entries inCHANGELOG.mdaligned with PyPI releases.
Contribution Guidance
- Update docs (
docs/guide.mdanddocs/index.md) whenever behavior changes or new capabilities are added. - Keep feature branches focused; run targeted tests locally and ensure all relevant hooks pass before opening a pull request.
- For automation updates (PowerShell scripts, bin scripts), preserve the structure outlined in
AGENTS.mdand mirror logging/transcript behavior. - Refer to
AGENTS.mdfor standards on module headers, docstrings, logging, and error handling so every Python module stays consistent.
Next Steps
- Dive into the User Guide to see detailed workflows for using the GUI, enabling the market tab, and contributing safely.
- Browse API Reference for individual plot builders, calculators, and models exposed under
src/refi_calculator/core/. - Run
docs/gen_ref_pages.pywhen you add new modules so the reference site stays current.