import React, { useState } from 'react'; const FundingStackModel = () => { const [selectedPhase, setSelectedPhase] = useState(1); const [showDetail, setShowDetail] = useState(null); const phases = { 1: { name: "Land & Foundation", timeline: "2026-2027", total: 1850000, sources: [ { name: "FSA Farm Ownership Loan", amount: 600000, type: "debt", rate: "3.25%", term: "40 years", agency: "USDA FSA" }, { name: "FSA Beginning Farmer Down Payment", amount: 300000, type: "grant-loan", rate: "1.5%", term: "20 years", agency: "USDA FSA" }, { name: "UAIP Planning Grant", amount: 100000, type: "grant", agency: "USDA NIFA" }, { name: "SARE Farmer Grant", amount: 30000, type: "grant", agency: "USDA SARE" }, { name: "EQIP Conservation", amount: 75000, type: "cost-share", match: "10%", agency: "USDA NRCS" }, { name: "State Ag Development Grant", amount: 50000, type: "grant", agency: "MA DAR" }, { name: "Owner Equity / Seed Capital", amount: 150000, type: "equity" }, { name: "FSA Operating Loan", amount: 400000, type: "debt", rate: "4.5%", term: "7 years", agency: "USDA FSA" }, { name: "Microloan Reserve", amount: 50000, type: "debt", rate: "5%", agency: "USDA FSA" }, { name: "Additional Working Capital", amount: 95000, type: "debt" }, ], uses: [ { name: "Land Acquisition (45 acres)", amount: 900000 }, { name: "Site Development & Infrastructure", amount: 250000 }, { name: "Aquaponics Containers (7)", amount: 350000 }, { name: "Solar Array (850 kW)", amount: 200000 }, { name: "Working Capital & Reserves", amount: 150000 }, ] }, 2: { name: "Housing Development", timeline: "2027-2028", total: 5750000, sources: [ { name: "USDA Community Facilities Loan", amount: 3500000, type: "debt", rate: "3.5%", term: "40 years", agency: "USDA RD" }, { name: "USDA Community Facilities Grant", amount: 750000, type: "grant", agency: "USDA RD" }, { name: "MassHousing Affordable Loan", amount: 500000, type: "debt", rate: "4%", agency: "MassHousing" }, { name: "REAP Solar/Energy Grant", amount: 250000, type: "grant", agency: "USDA RD" }, { name: "UAIP Implementation Grant", amount: 400000, type: "grant", agency: "USDA NIFA" }, { name: "CDBG Housing", amount: 200000, type: "grant", agency: "HUD via MA" }, { name: "Developer Fee / Retained", amount: 150000, type: "equity" }, ], uses: [ { name: "50 Triple Trio Units", amount: 4250000 }, { name: "Community Hub Building", amount: 500000 }, { name: "Site Infrastructure (roads, utilities)", amount: 400000 }, { name: "Permaculture & Food Forest Install", amount: 150000 }, { name: "Contingency & Soft Costs", amount: 450000 }, ] }, 3: { name: "Amenities & Revenue", timeline: "2028-2029", total: 1400000, sources: [ { name: "NMTC Allocation (effective subsidy)", amount: 400000, type: "tax-credit", agency: "Treasury/CDE" }, { name: "Corporate Sponsorship Package", amount: 250000, type: "sponsorship", notes: "Naming rights, signage" }, { name: "Foundation Grants (ag education)", amount: 150000, type: "grant" }, { name: "Capital Campaign / Community", amount: 200000, type: "donations" }, { name: "Pre-sales / Member Deposits", amount: 250000, type: "pre-revenue" }, { name: "Additional CF Loan Draw", amount: 150000, type: "debt" }, ], uses: [ { name: "Community Kitchen / Processing", amount: 350000 }, { name: "Event & Education Spaces", amount: 300000 }, { name: "Trail System & Recreation", amount: 150000 }, { name: "Equipment & Operations Setup", amount: 200000 }, { name: "Marketing & Lease-up Costs", amount: 150000 }, { name: "Operating Reserve Fund", amount: 250000 }, ] } }; const getTotalByType = (sources, type) => { return sources.filter(s => s.type === type).reduce((sum, s) => sum + s.amount, 0); }; const getTypeColor = (type) => { switch(type) { case 'grant': return '#22c55e'; case 'grant-loan': return '#84cc16'; case 'debt': return '#3b82f6'; case 'equity': return '#f59e0b'; case 'cost-share': return '#10b981'; case 'tax-credit': return '#8b5cf6'; case 'sponsorship': return '#ec4899'; case 'donations': return '#f97316'; case 'pre-revenue': return '#06b6d4'; default: return '#64748b'; } }; const formatCurrency = (amount) => { return new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumFractionDigits: 0 }).format(amount); }; const grandTotal = Object.values(phases).reduce((sum, p) => sum + p.total, 0); // Calculate totals across all phases const allSources = Object.values(phases).flatMap(p => p.sources); const totalGrants = allSources.filter(s => ['grant', 'cost-share', 'tax-credit'].includes(s.type)).reduce((sum, s) => sum + s.amount, 0); const totalDebt = allSources.filter(s => s.type === 'debt' || s.type === 'grant-loan').reduce((sum, s) => sum + s.amount, 0); const totalEquity = allSources.filter(s => ['equity', 'sponsorship', 'donations', 'pre-revenue'].includes(s.type)).reduce((sum, s) => sum + s.amount, 0); return (
{/* Header */}

Funding Stack: Town Woods Regenerative Village

50 Units • {formatCurrency(grandTotal)} Total Development • 3-Year Phased Approach

{/* Grand Summary */}
{formatCurrency(grandTotal)}
Total Project Cost
{formatCurrency(totalGrants)}
Grants & Tax Credits
{((totalGrants/grandTotal)*100).toFixed(0)}% of total
{formatCurrency(totalDebt)}
Low-Interest Debt
{((totalDebt/grandTotal)*100).toFixed(0)}% of total
{formatCurrency(totalEquity)}
Equity & Other
{((totalEquity/grandTotal)*100).toFixed(0)}% of total
{/* Phase Tabs */}
{[1, 2, 3].map(phase => ( ))}
{/* Phase Detail */}
{/* Sources of Funds */}

Sources of Funds

{phases[selectedPhase].sources.map((source, idx) => (
setShowDetail(showDetail === idx ? null : idx)} className="cursor-pointer" >
{source.name} {formatCurrency(source.amount)}
{/* Progress bar */}
{/* Expanded detail */} {showDetail === idx && (
Type {source.type.replace('-', ' ')}
{source.agency && (
Agency {source.agency}
)} {source.rate && (
Interest Rate {source.rate}
)} {source.term && (
Term {source.term}
)} {source.match && (
Match Required {source.match}
)} {source.notes && (
Notes {source.notes}
)}
)}
))}
{/* Phase totals by type */}
{formatCurrency(getTotalByType(phases[selectedPhase].sources, 'grant') + getTotalByType(phases[selectedPhase].sources, 'cost-share'))}
Grants
{formatCurrency(getTotalByType(phases[selectedPhase].sources, 'debt') + getTotalByType(phases[selectedPhase].sources, 'grant-loan'))}
Debt
{formatCurrency(getTotalByType(phases[selectedPhase].sources, 'equity') + getTotalByType(phases[selectedPhase].sources, 'sponsorship') + getTotalByType(phases[selectedPhase].sources, 'donations') + getTotalByType(phases[selectedPhase].sources, 'pre-revenue'))}
Equity/Other
{/* Uses of Funds */}

Uses of Funds

{phases[selectedPhase].uses.map((use, idx) => (
{use.name} {formatCurrency(use.amount)}
))}
{/* Total check */}
Phase {selectedPhase} Total {formatCurrency(phases[selectedPhase].total)}
{/* Capital Stack Visualization */}

Capital Stack Visualization

{[1, 2, 3].map(phase => { const p = phases[phase]; const grants = p.sources.filter(s => ['grant', 'cost-share', 'tax-credit'].includes(s.type)).reduce((sum, s) => sum + s.amount, 0); const debt = p.sources.filter(s => s.type === 'debt' || s.type === 'grant-loan').reduce((sum, s) => sum + s.amount, 0); const equity = p.sources.filter(s => ['equity', 'sponsorship', 'donations', 'pre-revenue'].includes(s.type)).reduce((sum, s) => sum + s.amount, 0); const maxHeight = 240; const scale = maxHeight / Math.max(...Object.values(phases).map(ph => ph.total)); return (
setSelectedPhase(phase)} > {/* Grants layer */}
{grants > 200000 && {formatCurrency(grants)}}
{/* Debt layer */}
{debt > 200000 && {formatCurrency(debt)}}
{/* Equity layer */}
{equity > 200000 && {formatCurrency(equity)}}
Phase {phase}
{p.timeline}
); })}
{/* Legend */}
Grants & Tax Credits
Low-Interest Debt
Equity & Other
{/* Key Programs Reference */}

Key Funding Programs

USDA FSA Loans
  • • Farm Ownership: Up to $600K
  • • Beginning Farmer Down Payment
  • • Operating Loans: Up to $400K
  • • Contact: Carroll County FSA
USDA Grants
  • • UAIP: Up to $500K implementation
  • • SARE: Up to $30K farmer research
  • • VAPG: Up to $250K value-added
  • • REAP: Up to $500K renewable energy
Community Facilities
  • • Loans: Up to 100% of project
  • • Grants: Up to 75% (low-income areas)
  • • 40-year terms, ~3.5% rate
  • • Contact: USDA RD NH/VT Office
Tax Credits
  • • NMTC: ~20% effective subsidy
  • • ITC: 30% solar investment credit
  • • LIHTC: If affordable housing
  • • Contact: NH Community Loan Fund
State Programs
  • • MassHousing loans
  • • MassDevelopment incentives
  • • CDBG via state allocation
  • • MA DAR agricultural grants
Private Capital
  • • Corporate sponsorships
  • • Foundation grants (ag education)
  • • Community capital campaign
  • • Pre-sales & member deposits

Click funding sources for details • Capital Stack Model v1

); }; export default FundingStackModel;