How hunter547/max-payout-calculator works
Max Payout Calculator is a React app that guides a trader through account setup and payout-cycle inputs, then calculates a payout plan and presents it on a dashboard. The README documents two distinct data-entry paths—point-in-time figures and a day-by-day P&L ledger—plus firm-specific rules, payout schedules, account switching, and chart interactions. The graph uses documented behavior and sampled imports; wiring for unsampled modules is shown only where the README supports it.
Main entry points: App.tsx App orchestrator · Walkthrough.tsx Setup walkthrough · setup.ts Setup model · PnlChart.tsx P&L chart
Components 18
Setup and accounts
- Setup walkthrough
src/components/Walkthrough.tsx - Setup model
src/lib/setup.ts - Firm templates
src/lib/accounts.ts - Payout schedule
src/components/ScheduleControls.tsx - Plan controls
src/components/CuratedControls.tsx
Payout calculation
- Ledger utilities
src/lib/ledger.ts - Payout calculator
src/lib/calc.ts - Chart window math
src/lib/plotView.ts
Dashboard
- Day ledger UI
src/components/Ledger.tsx - P&L chart
src/components/PnlChart.tsx - Account panel
src/components/AccountPanel.tsx - Account switcher
src/components/AccountSwitcher.tsx - Payout flow
src/components/PayoutFlow.tsx
Application state
- React entry
src/main.tsx - App orchestrator
src/App.tsx - Account state
src/lib/portfolio.ts
Other components
- Trader
- Browser storage
Connections 22
- React entry → App orchestrator: renders
- Trader → Setup walkthrough: enters setup
- App orchestrator → Setup walkthrough: shows setup
- Setup walkthrough → Firm templates: gets firm rules
- Setup walkthrough → Setup model: builds setup
- Setup model → Firm templates: looks up templates
- Setup walkthrough → Day ledger UI: collects daily entries
- Setup walkthrough → Payout schedule: collects schedule
- Setup walkthrough → Plan controls: collects strategy
- App orchestrator → Setup model: prepares inputs
- Setup model → Ledger utilities: summarizes ledger
- App orchestrator → Ledger utilities: summarizes days
- App orchestrator → Payout calculator: calculates plan
- App orchestrator → Account state: manages account state
- Account state → Browser storage: persists state
- App orchestrator → P&L chart: supplies plan and days
- P&L chart → Chart window math: clamps chart window
- App orchestrator → Day ledger UI: shows ledger
- App orchestrator → Account panel: shows account rules
- App orchestrator → Account switcher: shows account choices
- App orchestrator → Payout flow: shows payout status
- Trader → App orchestrator: reviews dashboard