8000
Skip to content

Repository files navigation

PagoMutuo logo

PagoMutuo

A fast, private Italian mortgage calculator.

Ammortamento alla francese, tasso fisso. No build step, runtime dependencies, or tracking.

Live demo Zero dependencies Vanilla JavaScript PWA Privacy


What it is

PagoMutuo answers the questions you actually ask before signing a mortgage: what is the monthly payment, how much interest will I really pay, can I afford it, is it smarter to buy or keep renting, and what happens if I pay some of it back early?

The core UI, styles, calculations, and hand-rolled SVG charts live in index.html; sw.js, the manifest, and icons add offline/PWA support. There is no build step, runtime dependency, tracking, backend, or third-party request. Your numbers never leave the browser.

Canonical live site: https://pagomutuo.netlify.app/ GitHub Pages mirror: https://montanarograziano.github.io/pagomutuo/

Features

Core calculator

  • One field is auto-derived from the other two: pick whether to compute importo finanziato, LTV, or costo immobile
  • Monthly payment (rata), total interest, average yearly interest, interest-to-principal ratio, montante, and effective annual rate (TAE)
  • Upfront outlay (anticipo) in euro and as a share of the property price

Affordability

  • Optional net monthly income input flags the rata against the usual bank thresholds (green under 30%, warning 30 to 35%, over-limit above 35%)

Piano di ammortamento

  • Stacked-area chart of quota capitale vs quota interessi, with month / quarter / semester / year granularity
  • Tap or hover to inspect any period; full breakdown table with per-period and total figures

Estinzione anticipata parziale

  • Model a recurring monthly extra and/or a one-off lump sum at a chosen year
  • See the new (shorter) duration, how much time you shave off, and the interest you save, plus a residual-debt comparison chart

Affitto vs Acquisto

  • Net-worth-at-horizon model comparing buying against renting-and-investing-the-difference
  • Buy-side assumptions are pre-filled from the main calculator but fully editable in isolation, so the main result never changes
  • Net-worth trajectory and a breakdown of where every euro goes over the horizon

Quality of life

  • Light / dark / auto themes
  • Inputs persisted per device
  • Shareable scenario links (encoded in the URL hash)
  • Collapsible analysis sections
  • Installable PWA that works offline

Accessory purchase costs (notary, taxes, agency) and the full TAEG are deliberately out of scope. For those, the page links to CasaNinja.

How to use it

  1. Open the live demo (or run it locally, see below).
  2. In Immobile e finanziamento, choose which field to auto-derive, then fill in the other two.
  3. Set the rate and term under Condizioni del mutuo. Add your net monthly income to unlock the affordability check.
  4. Read the headline rata and cost breakdown, then expand the analysis sections for amortization, early repayment, and rent-vs-buy.
  5. Hit Copia link simulazione to share the exact scenario, or Reimposta valori to start over.

Run locally

It is a static site with no build step.

python3 -m http.server 8000
# then open http://localhost:8000
# (or http://<your-mac-ip>:8000 from a phone on the same Wi-Fi)

Opening the file directly in a browser also works, but the service worker (offline support) only registers over http(s).

Verify

The dependency-free check covers the mortgage schedule invariants, static assets, manifest parsing, and the CSP hash:

node verify.mjs

GitHub Actions runs the same command on pushes and pull requests.

Deploy

Push to main. Netlify serves the repository root as-is (see netlify.toml), with no build command. The same commit also deploys a GitHub Pages mirror through .github/workflows/pages.yml.

Netlify remains canonical because it applies the security headers in _headers; GitHub Pages hosts the static mirror but does not interpret that Netlify-specific file.

Project structure

File Purpose
index.html The calculator UI, styles, and logic
sw.js Network-first service worker with offline fallback
manifest.webmanifest PWA manifest (standalone display, icons)
icon-192.png, icon-512.png, apple-touch-icon.png App icons
robots.txt, _headers Search-crawler policy and security headers
netlify.toml Publish root, no build step
verify.mjs, .github/workflows/verify.yml Dependency-free checks and CI
.github/workflows/pages.yml GitHub Pages mirror deployment
SECURITY.md Private vulnerability-reporting policy
LICENSE MIT license

Privacy

No analytics, cookies, third-party requests, or backend. Every calculation runs in your browser. Calculator inputs are persisted in localStorage on your device; Reimposta valori clears them. Shared scenarios are encoded in the URL hash, which browsers do not send to the server. Net monthly income is deliberately excluded from share links. The service worker caches only static app assets for offline use.

Security

Please report vulnerabilities privately as described in SECURITY.md. Security headers restrict scripts, framing, browser permissions, and cross-origin behavior.

License

MIT — see LICENSE.

Disclaimer

Estimates for personal use, not financial advice. The rent-vs-buy and early-repayment sections are assumption-driven models: the numbers are only as good as the assumptions you feed them. Always confirm figures with your bank before making a decision.

About

Fast, privacy-first Italian mortgage calculator with amortization, affordability, early repayment, and rent-vs-buy analysis.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0