# ds279-lab/fastspot-settlement-receipt-manager architecture

> Architecture diagram of the GitHub repository ds279-lab/fastspot-settlement-receipt-manager, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ds279-lab/fastspot-settlement-receipt-manager
- Repository: https://github.com/ds279-lab/fastspot-settlement-receipt-manager

## Overview

Fastspot is a browser-based receipt, settlement, and money-lent manager. The user works through the dashboard and navigation to review or upload transaction receipts, calculate rates, record loans, and settle principal or commissions; the app maintains the working records in browser storage. The README provides little product detail, so the capability map also relies on component names and visible UI excerpts. Some component wiring is not shown beyond the source index; those edges cite the referencing file without claiming unshown internals.

Main entry points: [`src/App.tsx`](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/App.tsx) (Application shell), [`src/utils/financialCalculations.ts`](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/utils/financialCalculations.ts) (Financial calculations), [`src/components/ReceiptsTable.tsx`](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/ReceiptsTable.tsx) (Receipt ledger), [`src/components/HomeDashboard.tsx`](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/HomeDashboard.tsx) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Receipt workflow"]
  node_receipt_list["Receipt ledger<br/>[ReceiptsTable.tsx]"]
  node_receipt_upload["Receipt upload<br/>[UploadModal.tsx]"]
  node_receipt_detail["Receipt details"]
  node_printing["Table printing<br/>[printTable.ts]"]
end

subgraph group_settlement["Settlement and overview"]
  node_metrics["Summary metrics<br/>[SummaryMetrics.tsx]"]
  node_dashboard["Dashboard<br/>[HomeDashboard.tsx]"]
  node_settlement_modal["Settlement execution"]
  node_settlement_history["Settlement history"]
end

subgraph group_lending["Loans and rates"]
  node_rates["Rates calculator"]
  node_loans["Money lent<br/>[MoneyLentView.tsx]"]
  node_loan_calc["Loan calculations"]
end

subgraph group_core["Application core"]
  node_app["Application shell<br/>[App.tsx]"]
  node_nav["Navigation<br/>[Navbar.tsx]"]
  node_settings["Commission settings<br/>[SettingsModal.tsx]"]
  node_financial["Financial calculations"]
  node_fee_tiers["Manual fee tiers"]
  node_seed_data["Initial records<br/>[initialData.ts]"]
  node_entry["React entry point<br/>[main.tsx]"]
end

node_user(("Operator"))
node_browser_storage[("Browser local storage")]

node_user -.->|"opens app"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_nav
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_receipt_list
node_app -->|"renders"| node_receipt_upload
node_app -->|"renders"| node_receipt_detail
node_app -->|"renders"| node_settlement_modal
node_app -->|"renders"| node_settlement_history
node_app -->|"renders"| node_settings
node_app -->|"renders"| node_rates
node_app -->|"renders"| node_loans
node_dashboard -->|"renders"| node_metrics
node_app -->|"uses calculations"| node_financial
node_dashboard -->|"uses calculations"| node_financial
node_receipt_upload -->|"uses calculations"| node_financial
node_receipt_list -->|"uses calculations"| node_financial
node_settlement_modal -->|"formats amounts"| node_financial
node_app -->|"merges loans"| node_loan_calc
node_loans -->|"uses calculations"| node_loan_calc
node_app -->|"loads tiers"| node_fee_tiers
node_app -->|"loads defaults"| node_seed_data
node_seed_data -->|"creates receipts"| node_financial
node_app -->|"reads and writes"| node_browser_storage
node_receipt_list -->|"prints table"| node_printing
node_loans -->|"prints table"| node_printing

click node_app "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/App.tsx"
click node_nav "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/Navbar.tsx"
click node_receipt_list "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/ReceiptsTable.tsx"
click node_receipt_upload "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/UploadModal.tsx"
click node_receipt_detail "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/ReceiptDetailModal.tsx"
click node_metrics "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/SummaryMetrics.tsx"
click node_dashboard "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/HomeDashboard.tsx"
click node_settlement_modal "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/SettlementModal.tsx"
click node_settlement_history "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/SettlementHistoryLedger.tsx"
click node_settings "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/SettingsModal.tsx"
click node_rates "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/RatesCalculatorView.tsx"
click node_loans "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/MoneyLentView.tsx"
click node_financial "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/utils/financialCalculations.ts"
click node_loan_calc "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/utils/loanCalculations.ts"
click node_fee_tiers "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/utils/manualSendFeeTiers.ts"
click node_seed_data "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/utils/initialData.ts"
click node_printing "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/utils/printTable.ts"
click node_entry "https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/main.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_receipt_list,node_receipt_upload,node_receipt_detail,node_printing toneBlue
class node_metrics,node_dashboard,node_settlement_modal,node_settlement_history,node_browser_storage toneAmber
class node_rates,node_loans,node_loan_calc toneMint
class node_app,node_nav,node_settings,node_financial,node_fee_tiers,node_seed_data,node_entry toneRose
class node_user toneIndigo
```

## Components

### Receipt workflow

- [Receipt ledger](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/ReceiptsTable.tsx): `src/components/ReceiptsTable.tsx`
- [Receipt upload](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/UploadModal.tsx): `src/components/UploadModal.tsx`
- [Receipt details](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/ReceiptDetailModal.tsx): `src/components/ReceiptDetailModal.tsx`
- [Table printing](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/utils/printTable.ts): `src/utils/printTable.ts`

### Settlement and overview

- [Summary metrics](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/SummaryMetrics.tsx): `src/components/SummaryMetrics.tsx`
- [Dashboard](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/HomeDashboard.tsx): `src/components/HomeDashboard.tsx`
- [Settlement execution](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/SettlementModal.tsx): `src/components/SettlementModal.tsx`
- [Settlement history](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/SettlementHistoryLedger.tsx): `src/components/SettlementHistoryLedger.tsx`

### Loans and rates

- [Rates calculator](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/RatesCalculatorView.tsx): `src/components/RatesCalculatorView.tsx`
- [Money lent](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/MoneyLentView.tsx): `src/components/MoneyLentView.tsx`
- [Loan calculations](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/utils/loanCalculations.ts): `src/utils/loanCalculations.ts`

### Application core

- [Application shell](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/App.tsx): `src/App.tsx`
- [Navigation](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`
- [Commission settings](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/components/SettingsModal.tsx): `src/components/SettingsModal.tsx`
- [Financial calculations](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/utils/financialCalculations.ts): `src/utils/financialCalculations.ts`
- [Manual fee tiers](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/utils/manualSendFeeTiers.ts): `src/utils/manualSendFeeTiers.ts`
- [Initial records](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/utils/initialData.ts): `src/utils/initialData.ts`
- [React entry point](https://github.com/ds279-lab/fastspot-settlement-receipt-manager/blob/main/src/main.tsx): `src/main.tsx`

### Other components

- **Operator**
- **Browser local storage**

## Connections

- Operator → React entry point: opens app
- React entry point → Application shell: renders (evidence: `src/main.tsx`)
- Application shell → Navigation: renders (evidence: `src/App.tsx`)
- Application shell → Dashboard: renders (evidence: `src/App.tsx`)
- Application shell → Receipt ledger: renders (evidence: `src/App.tsx`)
- Application shell → Receipt upload: renders (evidence: `src/App.tsx`)
- Application shell → Receipt details: renders (evidence: `src/App.tsx`)
- Application shell → Settlement execution: renders (evidence: `src/App.tsx`)
- Application shell → Settlement history: renders (evidence: `src/App.tsx`)
- Application shell → Commission settings: renders (evidence: `src/App.tsx`)
- Application shell → Rates calculator: renders (evidence: `src/App.tsx`)
- Application shell → Money lent: renders (evidence: `src/App.tsx`)
- Dashboard → Summary metrics: renders (evidence: `src/components/HomeDashboard.tsx`)
- Application shell → Financial calculations: uses calculations (evidence: `src/App.tsx`)
- Dashboard → Financial calculations: uses calculations (evidence: `src/components/HomeDashboard.tsx`)
- Receipt upload → Financial calculations: uses calculations (evidence: `src/components/UploadModal.tsx`)
- Receipt ledger → Financial calculations: uses calculations (evidence: `src/components/ReceiptsTable.tsx`)
- Settlement execution → Financial calculations: formats amounts (evidence: `src/components/SettlementModal.tsx`)
- Application shell → Loan calculations: merges loans (evidence: `src/App.tsx`)
- Money lent → Loan calculations: uses calculations (evidence: `src/components/MoneyLentView.tsx`)
- Application shell → Manual fee tiers: loads tiers (evidence: `src/App.tsx`)
- Application shell → Initial records: loads defaults (evidence: `src/App.tsx`)
- Initial records → Financial calculations: creates receipts (evidence: `src/utils/initialData.ts`)
- Application shell → Browser local storage: reads and writes (evidence: `src/App.tsx`)
- Receipt ledger → Table printing: prints table (evidence: `src/components/ReceiptsTable.tsx`)
- Money lent → Table printing: prints table (evidence: `src/components/MoneyLentView.tsx`)
