Skip to content

Repository files navigation

🏢 MamaBroker — Real Estate Mortgage & Investment Yield Matrix

License: MIT Live Demo HTML5 Vanilla JS Architecture: Zero-GC

Institutional Real Estate Underwriting, 30-Year Amortization Schedule Solver, Cap Rate Analysis, and DSCR Loan Structure Engine.

MamaBroker Institutional Real Estate Trading & Analytics Command Center

🌟 Overview & Institutional Capabilities

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]
Loading

📊 Core Financial Engines & Mathematical Formulations

1. Annuity Amortization Trajectory

The exact monthly mortgage payment $M$ for principal $P$, monthly interest rate $r = rac{ ext{Annual Rate}}{12}$, and total payments $n = ext{Years} imes 12$:

$$M = P \cdot rac{r(1 + r)^n}{(1 + r)^n - 1}$$

For each period $k \in [1, n]$:

  • 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$

2. Commercial Real Estate Yield Metrics

Metric Formula Institutional Benchmark Risk Interpretation
Cap Rate $ ext{NOI} / ext{Property Price} imes 100%$ $6.5% - 9.5%$ Higher = Higher yield / higher market risk
DSCR $ ext{NOI} / ext{Annual Debt Service}$ $\ge 1.25 imes$ $< 1.0 imes$ indicates negative cashflow default risk
Cash-on-Cash ROI $ ext{Net Annual Cashflow} / ext{Total Cash Invested}$ $8.0% - 15.0%$ Direct equity yield after debt service
Gross Rent Multiplier (GRM) $ ext{Purchase Price} / ext{Gross Annual Scheduled Rent}$ $6.0 - 10.0$ Lower GRM indicates faster capital recovery

💻 Zero-Dependency High-Performance JS Architecture

// 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
    };
}

🚀 Deployment & Local Execution

Local Development

# 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 8080

GitHub Pages Setup

MamaBroker is configured to run out of the box with zero build steps on GitHub Pages:

  1. Open Settings $ o$ Pages.
  2. Select Source: Deploy from a branch $ o$ main / / (root).
  3. Access live deployment at https://marko1olo.github.io/mamabroker/.

🌐 Connected Ecosystem & Sister Projects

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

👨‍💻 Author & Lead Architect

Адольф Петушков (Adolf Petushkov) — Quantitative Real Estate Analytics, High-Performance Zero-GC Web Systems.
GitHub: @marko1olo


👥 Синдикат Разработки

Разработано и поддерживается Жирняком и Адольфом Петушковым.

About

Institutional Real Estate Mortgage Brokerage & Yield Engine — 30-year annuity amortization solver, Cap Rate, DSCR & cashflow ROI modeling.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages