import React, { useState, useMemo, useEffect } from 'react'; import { LineChart, Line, BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer, ComposedChart, Area, Cell } from 'recharts'; import { TrendingUp, Wallet, PieChart, Calendar, Info, Calculator, DollarSign, ChevronRight, Settings, Users, ShieldCheck, Landmark, Receipt, Briefcase, HelpCircle, Layers, MousePointer2, Printer, ChevronUp, ChevronDown, Sparkles, Cloud, CloudOff, Save, RefreshCw } from 'lucide-react'; // --- AWS CONFIGURATION (FOR ATLAS DEPLOYMENT) --- // Note: In a production AWS build, these are usually injected via environment variables. const AWS_CONFIG = { region: "us-east-1", // Update to your region userPoolId: "us-east-1_XXXXX", userPoolClientId: "XXXXX", dynamoDbTable: "EquityBriefings" }; const App = () => { // --- STATE & CALCULATIONS --- const [valuationMultiple, setValuationMultiple] = useState(12); const [selectedYear, setSelectedYear] = useState('Series B'); const [showSettings, setShowSettings] = useState(false); const [isSummaryExpanded, setIsSummaryExpanded] = useState(false); const [isSyncing, setIsSyncing] = useState(false); const [lastSynced, setLastSynced] = useState(null); // Inputs const [employeeName, setEmployeeName] = useState('Sarah Jenkins'); const [jobTitle, setJobTitle] = useState('Chief Design Officer'); const [initialShares, setInitialShares] = useState(150000); const [newGrantShares, setNewGrantShares] = useState(350000); const [strikePrice, setStrikePrice] = useState(0.01); const [taxRate, setTaxRate] = useState(25); const [totalPool, setTotalPool] = useState(10000000); const totalSharesForEmployee = Number(initialShares) + Number(newGrantShares); const scenarios = [ { stage: 'Current', year: '2025', arr: 0, valuation: 1000000, totalShares: totalPool, sharePrice: 0.10, newVestedPercent: 0 }, { stage: 'Seed', year: '2026', arr: 500000, valuation: 25000000, totalShares: totalPool * 1.25, sharePrice: 2.00, newVestedPercent: 30 }, { stage: 'Series A', year: '2027', arr: 2500000, valuation: 50000000, totalShares: totalPool * 1.56, sharePrice: 3.20, newVestedPercent: 60 }, { stage: 'Series B', year: '2028', arr: 7500000, valuation: 125000000, totalShares: totalPool * 1.95, sharePrice: 6.40, newVestedPercent: 100 } ]; const chartData = useMemo(() => { return scenarios.map(s => { const dynamicValuation = s.arr > 0 ? s.arr * valuationMultiple : s.valuation; const dynamicSharePrice = dynamicValuation / s.totalShares; const ownershipPercent = (totalSharesForEmployee / s.totalShares) * 100; const grossValue = totalSharesForEmployee * dynamicSharePrice; const exerciseCost = totalSharesForEmployee * strikePrice; const netPreTax = Math.max(0, grossValue - exerciseCost); const taxLiability = netPreTax * (taxRate / 100); const netPostTax = netPreTax - taxLiability; return { ...s, ownershipPercent: ownershipPercent.toFixed(3), grossValue, exerciseCost, netPreTax, taxLiability, netPostTax, displayValue: (netPostTax / 1000000).toFixed(2) }; }); }, [valuationMultiple, initialShares, newGrantShares, totalPool, strikePrice, taxRate]); const selectedData = chartData.find(d => d.stage === selectedYear); const initialPercent = ((initialShares / totalPool) * 100).toFixed(2); const newGrantPercent = ((newGrantShares / totalPool) * 100).toFixed(2); const totalCombinedPercent = ((totalSharesForEmployee / totalPool) * 100).toFixed(2); const formatCurrency = (val) => new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumFractionDigits: 0 }).format(val); const formatCompact = (val) => new Intl.NumberFormat('en-US', { notation: "compact", compactDisplay: "short" }).format(val); // Persistence Logic (Stubs for AWS Amplify/AppSync) const handleSaveToCloud = async () => { setIsSyncing(true); // Real logic would be: await DataStore.save(new Briefing({...})) setTimeout(() => { setIsSyncing(false); setLastSynced(new Date().toLocaleTimeString()); }, 1500); }; const LaymanTooltip = ({ title, text }) => (

{title}

{text}

); return (
{/* HEADER SECTION */}
Confidential Equity Briefing

{employeeName}

{jobTitle}

{/* ARR INTERACTIVE SLIDER */}
Market Multiplier
{valuationMultiple}x
setValuationMultiple(parseInt(e.target.value))} className="w-full h-2 bg-slate-100 rounded-full appearance-none cursor-pointer accent-indigo-600" />
{/* SETTINGS PANEL */} {showSettings && (

Administrative (AWS Sync)

AWS Storage

{lastSynced ? <> Last Synced {lastSynced} : <> Offline Mode}

setEmployeeName(e.target.value)} className="w-full p-4 bg-slate-50 border border-slate-200 rounded-2xl focus:ring-4 focus:ring-indigo-100 outline-none font-bold text-sm transition-all" />
setJobTitle(e.target.value)} className="w-full p-4 bg-slate-50 border border-slate-200 rounded-2xl focus:ring-4 focus:ring-indigo-100 outline-none font-bold text-sm transition-all" />
setInitialShares(Number(e.target.value))} className="w-full p-4 bg-slate-50 border border-slate-200 rounded-2xl focus:ring-4 focus:ring-indigo-100 outline-none font-bold text-sm transition-all" />
setNewGrantShares(Number(e.target.value))} className="w-full p-4 bg-indigo-50/50 border border-indigo-200 rounded-2xl focus:ring-4 focus:ring-indigo-100 outline-none font-bold text-sm transition-all" />
setTaxRate(Number(e.target.value))} className="w-32 p-4 bg-slate-50 border border-slate-200 rounded-2xl focus:ring-4 focus:ring-indigo-100 outline-none font-bold text-sm transition-all" />
setStrikePrice(Number(e.target.value))} className="w-32 p-4 bg-slate-50 border border-slate-200 rounded-2xl focus:ring-4 focus:ring-indigo-100 outline-none font-bold text-sm transition-all" />
)}
{/* SUMMARY CARDS */}

Allocation Summary

Vested Baseline {initialShares.toLocaleString()}
Performance Grant +{newGrantShares.toLocaleString()}
Target Shares

{totalSharesForEmployee.toLocaleString()}

Ownership Stake

Pre-Round % {initialPercent}%
Equity Boost +{newGrantPercent}%
Total Target

{totalCombinedPercent}%

Capital Multiple

{(selectedData.netPostTax / (Math.max(1, initialShares * 0.10))).toFixed(0)}X

Projected Appreciation

Scenario: {selectedYear}

Stage Payout (Net)

{formatCompact(selectedData.netPostTax)}

Post-Tax Outcome for {selectedData.stage}

Calculated with {taxRate}% tax
{/* FINANCIAL DETAIL */}

Pro Forma Calculation

{formatCompact(selectedData.netPostTax)}

Stage: {selectedYear}

Gross Value {formatCurrency(selectedData.grossValue)}
Exercise Cost -{formatCurrency(selectedData.exerciseCost)}
Net Cash Potential {formatCurrency(selectedData.netPostTax)}
{/* Vesting */}

Vesting Progress

{[ { label: 'Baseline', shares: initialShares, progress: 100, color: 'bg-emerald-400' }, { label: 'Year 1: 30%', shares: Math.round(newGrantShares * 0.3), progress: selectedData.newVestedPercent >= 30 ? 100 : 0, color: 'bg-indigo-400' }, { label: 'Year 2: 30%', shares: Math.round(newGrantShares * 0.3), progress: selectedData.newVestedPercent >= 60 ? 100 : 0, color: 'bg-indigo-500' }, { label: 'Year 3: 40%', shares: Math.round(newGrantShares * 0.4), progress: selectedData.newVestedPercent >= 100 ? 100 : 0, color: 'bg-indigo-600' }, ].map((item, i) => (
{item.label} {item.shares.toLocaleString()}
))}
{/* CHARTS */}

The Growth Narrative

Value Growth vs. Round Dilution

{scenarios.map(s => ( ))}
{chartData.map((entry, index) => ( ))}
{/* TABLE */}

Full Round Modeling

{chartData.map((d, i) => ( ))}
Funding Round Valuation Price Net Cash
{d.stage} ({d.year}) {formatCompact(d.arr > 0 ? d.arr * valuationMultiple : d.valuation)} {formatCurrency(d.sharePrice)} {formatCompact(d.netPostTax)}
{/* BOTTOM TAB */}
setIsSummaryExpanded(!isSummaryExpanded)} className="w-full flex justify-center mb-0 cursor-pointer group">
Quick Summary {isSummaryExpanded ? : }

Growth Briefing Summary

Our strategic roadmap targets a net post-tax outcome of {formatCompact(chartData[3].netPostTax)} at Series B scale.

Maximum Liquidity

{formatCompact(chartData[3].netPostTax)}

); }; export default App;