How pennypenny135-coder/mpf-comparison works
This is a browser-based MPF fund-return analyzer. Users load the sample workbook or upload an Excel file, review parsed data, choose return periods and filters, then compare fund returns and trustee rankings or export CSVs. The main page owns dataset loading, persistence and composition of the analysis controls; a separate statistics page presents trustee-oriented analysis. The graph reflects the sampled calls and documented page behavior; several listed UI components and the database files were not sampled, so their runtime connections are omitted.
Main entry points: app/page.tsx Fund analysis · returns.ts Return calculations · stats/page.tsx Trustee statistics · fund-table.tsx Fund results
Components 18
Application pages
- Fund analysis
src/app/page.tsx - Trustee statistics
src/app/stats/page.tsx - About page
src/app/about/page.tsx
Analysis interface
- Workbook upload
src/components/upload-panel.tsx - Fund filters
src/components/filter-panel.tsx - Period controls
src/components/period-controls.tsx - Fund results
src/components/fund-table.tsx - Trustee results
src/components/trustee-stats.tsx - Plan distribution
src/components/plan-distribution-table.tsx - Sample download
src/components/sample-download.tsx - Theme toggle
src/components/theme-toggle.tsx
Parsing and returns
- Excel parser
src/lib/excel-parser.ts - Return calculations
src/lib/returns.ts - MPF data model
src/types/mpf.ts
Data and export
- Browser dataset storage
src/lib/storage.ts - CSV export
src/lib/csv-export.ts
Other components
- Analyst
- Sample workbook
public/Sample/Fund_Information_Table_result-2.xlsx
Connections 21
- Analyst → Fund analysis: analyzes funds
- Fund analysis → Excel parser: parses sample
src/app/page.tsx - Fund analysis → Browser dataset storage: loads and saves
src/app/page.tsx - Fund analysis → Return calculations: generates periods
src/app/page.tsx - Fund analysis → Workbook upload: renders upload
src/app/page.tsx - Fund analysis → Fund filters: renders filters
src/app/page.tsx - Fund analysis → Period controls: renders controls
src/app/page.tsx - Fund analysis → Fund results: renders results
src/app/page.tsx - Fund analysis → Trustee results: renders statistics
src/app/page.tsx - Fund analysis → Sample workbook: fetches workbook
src/app/page.tsx - Workbook upload → Excel parser: parses uploads
src/components/upload-panel.tsx - Trustee statistics → Browser dataset storage: loads dataset
src/app/stats/page.tsx - Trustee statistics → Excel parser: parses sample
src/app/stats/page.tsx - Trustee statistics → Sample workbook: fetches workbook
src/app/stats/page.tsx - Trustee statistics → Return calculations: gets fund categories
src/app/stats/page.tsx - Period controls → Return calculations: builds periods
src/components/period-controls.tsx - Fund results → CSV export: exports fund rows
src/components/fund-table.tsx - Fund results → Return calculations: uses period keys
src/components/fund-table.tsx - Trustee results → Return calculations: computes rankings
src/components/trustee-stats.tsx - Trustee results → CSV export: exports statistics
src/components/trustee-stats.tsx - CSV export → Return calculations: uses period keys
src/lib/csv-export.ts