Institutional Real Estate Underwriting, 30-Year Amortization Schedule Solver, Cap Rate Analysis, and DSCR Loan Structure Engine.
MamaBroker is a standalone, client-side institutional mortgage underwriting and commercial/residential real estate yield modeling engine. Written with zero external framework bloat in pure vanilla HTML5/CSS3/ES6+, it computes exact multi-decade loan repayment trajectories, cash-on-cash returns, debt service coverage ratios (DSCR), and internal rate of return (IRR) models in real time.
graph TD
A[Property Acquisition Inputs: Price, Downpayment %, Interest Rate, Term] --> B[Annuity Amortization Solver]
B --> C[Monthly P&I Debt Service Trajectory]
A --> D[Operating Income & OPEX Modeling]
D --> E[Net Operating Income NOI]
C & E --> F[Debt Service Coverage Ratio DSCR = NOI / Annual Debt Service]
E & A --> G[Capitalization Rate: Cap Rate = NOI / Asset Value]
F & G --> H[Risk Rating & Underwriting Viability Matrix]
The exact monthly mortgage payment
For each period
-
Interest Portion:
$I_k = ext{Balance}_{k-1} \cdot r$ -
Principal Portion:
$C_k = M - I_k$ - Remaining Balance: $ ext{Balance}k = ext{Balance}{k-1} - C_k$
| Metric | Formula | Institutional Benchmark | Risk Interpretation |
|---|---|---|---|
| Cap Rate | $ ext{NOI} / ext{Property Price} imes 100%$ | Higher = Higher yield / higher market risk | |
| DSCR | $ ext{NOI} / ext{Annual Debt Service}$ |
|
|
| Cash-on-Cash ROI | $ ext{Net Annual Cashflow} / ext{Total Cash Invested}$ | Direct equity yield after debt service | |
| Gross Rent Multiplier (GRM) | $ ext{Purchase Price} / ext{Gross Annual Scheduled Rent}$ | Lower GRM indicates faster capital recovery |
// High-Precision Real Estate Underwriting Computation Kernel
export function calculateDealMetrics({
purchasePrice,
downPaymentPercent,
annualInterestRate,
loanTermYears,
monthlyRent,
vacancyRatePercent = 5.0,
propertyTaxRate = 1.2,
insuranceAnnual = 1200,
maintenancePercent = 8.0,
managementFeePercent = 8.0
}) {
const downPayment = purchasePrice * (downPaymentPercent / 100);
const loanPrincipal = purchasePrice - downPayment;
const monthlyRate = (annualInterestRate / 100) / 12;
const totalPayments = loanTermYears * 12;
// Monthly Debt Service (P&I)
const monthlyPI = loanPrincipal *
(monthlyRate * Math.pow(1 + monthlyRate, totalPayments)) /
(Math.pow(1 + monthlyRate, totalPayments) - 1);
// Gross Operating Income
const grossScheduledIncome = monthlyRent * 12;
const effectiveGrossIncome = grossScheduledIncome * (1 - vacancyRatePercent / 100);
// Operating Expenses (OPEX)
const annualPropertyTax = purchasePrice * (propertyTaxRate / 100);
const annualMaintenance = effectiveGrossIncome * (maintenancePercent / 100);
const annualManagement = effectiveGrossIncome * (managementFeePercent / 100);
const totalOpex = annualPropertyTax + insuranceAnnual + annualMaintenance + annualManagement;
// Net Operating Income (NOI)
const noi = effectiveGrossIncome - totalOpex;
const annualDebtService = monthlyPI * 12;
const netAnnualCashflow = noi - annualDebtService;
return {
loanPrincipal,
monthlyDebtService: monthlyPI,
annualDebtService,
noi,
capRate: (noi / purchasePrice) * 100,
dscr: noi / annualDebtService,
cashOnCashReturn: (netAnnualCashflow / downPayment) * 100,
grm: purchasePrice / grossScheduledIncome
};
}# Clone the repository
git clone https://github.com/marko1olo/mamabroker.git
cd mamabroker
# Run zero-dependency local static server
npx serve .
# Or Python built-in server
python -m http.server 8080MamaBroker is configured to run out of the box with zero build steps on GitHub Pages:
- Open Settings $ o$ Pages.
- Select Source:
Deploy from a branch$ o$main// (root). - Access live deployment at https://marko1olo.github.io/mamabroker/.
Part of the Адольф Петушков (Adolf Petushkov) open-source engineering ecosystem:
| Project | Domain | Live Demo & Description |
|---|---|---|
| 🦷 DENTE CRM | Clinical AI | Live Demo — Enterprise FDI odontogram, ICD-10 diagnostics & 3D DICOM |
| 🏢 MamaBroker | FinTech / PropTech | Live Demo — Institutional real estate yield matrix & DSCR amortization solver |
| 📊 Token Audit | Dev Tools | Live Demo — Real-time LLM token cost waterfall & cyberpunk chronicles |
| 🌊 Hecton-8 | Game Engine | Live Demo — NASA-punk deep sea noir submarine engine on Unity 6000 (0B GC) |
| 🏢 Gigahrush | Game Engine | Live Demo — 2.5D DDA raycasting, cellular gas physics & Samosbor Web CLI |
| 🌌 Starcluster | Deep Tech | Live Demo — 10,000-star N-body gravitational simulation & Keplerian economy |
Адольф Петушков (Adolf Petushkov) — Quantitative Real Estate Analytics, High-Performance Zero-GC Web Systems.
GitHub: @marko1olo
Разработано и поддерживается Жирняком и Адольфом Петушковым.