How rapatinitishkumarreddy/spv-commitment-tracker works
SPV Commitment Tracker is a browser-based app for importing commitment CSVs, reviewing row-level outcomes, and tracking funding by SPV. The main flow is upload → parse and validate → save the successful raw CSV in browser storage → revalidate it for the SPV list and detail views. The views surface target conflicts, over-subscription, accepted commitments, and rows needing review. The README documents the browser-only storage model; implementation edges below are limited to relationships visible in excerpts or the source index.
Main entry points: SpvDetailView.tsx SPV detail view · importCommitments.ts Import validation · CsvImportForm.tsx CSV upload form · SpvList.tsx SPV list
Components 23
CSV Import
- CSV upload form
app/import/_components/CsvImportForm.tsx - Import results
app/import/_components/ImportResults.tsx - Row issue tables
app/import/_components/RowIssuesTable.tsx - Accepted rows table
app/import/_components/AcceptedRowsTable.tsx
Commitment Domain
- CSV parser
lib/csv/parseCsv.ts - Import validation
lib/commitments/importCommitments.ts - Header validation
lib/commitments/headers.ts - Amount normalization
lib/commitments/normalizeAmount.ts - Email normalization
lib/commitments/normalizeEmail.ts - Target conflict detection
lib/commitments/detectSpvTargetConflicts.ts - SPV summaries
lib/commitments/summarizeSpvs.ts - SPV detail lookup
lib/commitments/getSpvDetail.ts
Browser Persistence
- Import store
lib/commitments/importStore.ts - Imported data hook
app/_lib/useImportedData.ts - Browser localStorage
SPV Views
- SPV list
app/_components/SpvList.tsx - SPV summary table
app/_components/SpvSummaryTable.tsx - SPV detail view
app/spvs/[slug]/_components/SpvDetailView.tsx - Investor commitments
app/spvs/[slug]/_components/InvestorCommitmentsTable.tsx - Needs-review table
app/spvs/[slug]/_components/NeedsReviewTable.tsx
Shared UI
- Target conflict alert
app/_components/SpvConflictAlert.tsx - Over-subscription alert
app/_components/OverSubscriptionAlert.tsx
Other components
- CSV user
Connections 26
- CSV user → CSV upload form: uploads CSV
README.md - CSV upload form → Import validation: validates CSV
app/import/_components/CsvImportForm.tsx - Import validation → CSV parser: parses text
lib/commitments/importCommitments.ts - Import validation → Header validation: checks headers
lib/commitments/importCommitments.ts - Import validation → Amount normalization: normalizes amounts
lib/commitments/importCommitments.ts - Import validation → Email normalization: normalizes email
lib/commitments/importCommitments.ts - Import validation → Target conflict detection: detects conflicts
lib/commitments/importCommitments.ts - CSV upload form → Import store: saves successful import
app/import/_components/CsvImportForm.tsx - Import store → Browser localStorage: reads and writes
README.md - CSV upload form → Import results: renders outcomes
app/import/_components/CsvImportForm.tsx - Import results → Row issue tables: renders issues
app/import/_components/ImportResults.tsx - Import results → Accepted rows table: renders accepted rows
app/import/_components/ImportResults.tsx - Imported data hook → Import store: reads saved import
app/_lib/useImportedData.ts - Imported data hook → Import validation: revalidates CSV
app/_lib/useImportedData.ts - SPV list → Imported data hook: loads imported data
app/_components/SpvList.tsx - SPV list → SPV summaries: summarizes accepted rows
app/_components/SpvList.tsx - SPV list → SPV summary table: renders SPV totals
app/_components/SpvList.tsx - SPV summary table → Target conflict alert: describes conflicts
app/_components/SpvSummaryTable.tsx - SPV detail view → Imported data hook: loads imported data
app/spvs/[slug]/_components/SpvDetailView.tsx - SPV detail view → SPV detail lookup: looks up SPV
app/spvs/[slug]/_components/SpvDetailView.tsx - SPV detail view → Investor commitments: renders commitments
app/spvs/[slug]/_components/SpvDetailView.tsx - SPV detail view → Needs-review table: renders review rows
app/spvs/[slug]/_components/SpvDetailView.tsx - SPV detail view → Target conflict alert: shows target warning
app/spvs/[slug]/_components/SpvDetailView.tsx - SPV detail view → Over-subscription alert: shows funding warning
app/spvs/[slug]/_components/SpvDetailView.tsx - CSV user → SPV list: views SPVs
README.md - CSV user → SPV detail view: opens SPV detail
README.md