# sriram36/wirematch architecture

> Architecture diagram of the GitHub repository sriram36/wirematch, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sriram36/wirematch
- Repository: https://github.com/sriram36/wirematch

## Overview

WireMatch is a tenant-scoped bank-reconciliation application for capital calls. A general partner selects an organization, imports a bank CSV, reviews suggested matches and transaction status, and approves, rejects, or ignores payments; approval updates funded amounts. The graph follows the shown frontend-to-service and service-to-model calls. The API-to-view and model-to-database links are documented or architecturally indicated, but their concrete runtime wiring is not shown in the excerpts, so those links are dashed.

Main entry points: [`frontend/src/App.jsx`](https://github.com/sriram36/wirematch/blob/main/frontend/src/App.jsx) (Dashboard state), [`backend/recon/views.py`](https://github.com/sriram36/wirematch/blob/main/backend/recon/views.py) (REST endpoints), [`backend/recon/importer.py`](https://github.com/sriram36/wirematch/blob/main/backend/recon/importer.py) (Statement importer), [`backend/recon/models.py`](https://github.com/sriram36/wirematch/blob/main/backend/recon/models.py) (Reconciliation records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Review dashboard"]
  node_app["Dashboard state<br/>[App.jsx]"]
  node_orgswitch["Organization switcher<br/>[OrgSwitcher.jsx]"]
  node_importpanel["CSV upload panel<br/>[ImportPanel.jsx]"]
  node_transactions["Transaction review"]
  node_lineitems["Capital call panel<br/>[LineItemPanel.jsx]"]
  node_statusbadge["Status badge<br/>[StatusBadge.jsx]"]
  node_format["Display formatting<br/>[format.js]"]
end

subgraph group_api["API boundary"]
  node_clientapi["HTTP API client<br/>[api.js]"]
  node_apiviews["REST endpoints<br/>[views.py]"]
  node_serializers["Response serializers<br/>[serializers.py]"]
end

subgraph group_domain["Import and reconciliation"]
  node_csv["CSV validation<br/>[csv_parsing.py]"]
  node_importer["Statement importer<br/>[importer.py]"]
  node_matcher["Payment matching<br/>[matching.py]"]
  node_normalizer["Reference normalization<br/>[normalization.py]"]
  node_reconcile["Match decisions<br/>[reconciliation.py]"]
  node_selectors["Tenant queries<br/>[selectors.py]"]
end

subgraph group_data["Tenant data"]
  node_records["Reconciliation records<br/>[models.py]"]
  node_database[("PostgreSQL")]
end

node_gp(("General partner"))

node_gp -->|"uses"| node_app
node_app -->|"requests data"| node_clientapi
node_app -->|"renders"| node_orgswitch
node_app -->|"renders"| node_importpanel
node_app -->|"renders"| node_transactions
node_app -->|"renders"| node_lineitems
node_transactions -->|"renders"| node_statusbadge
node_transactions -->|"formats values"| node_format
node_lineitems -->|"renders"| node_statusbadge
node_statusbadge -->|"formats status"| node_format
node_importpanel -->|"uploads CSV"| node_clientapi
node_clientapi -.->|"calls API"| node_apiviews
node_apiviews -->|"imports statement"| node_importer
node_apiviews -->|"handles decisions"| node_reconcile
node_apiviews -->|"queries tenant data"| node_selectors
node_apiviews -->|"serializes responses"| node_serializers
node_importer -->|"parses statement"| node_csv
node_importer -->|"matches credits"| node_matcher
node_importer -->|"loads open items"| node_selectors
node_importer -->|"saves transactions"| node_records
node_matcher -->|"normalizes references"| node_normalizer
node_reconcile -->|"updates funding"| node_records
node_selectors -->|"reads records"| node_records
node_records -.->|"persists records"| node_database

click node_app "https://github.com/sriram36/wirematch/blob/main/frontend/src/App.jsx"
click node_orgswitch "https://github.com/sriram36/wirematch/blob/main/frontend/src/components/OrgSwitcher.jsx"
click node_importpanel "https://github.com/sriram36/wirematch/blob/main/frontend/src/components/ImportPanel.jsx"
click node_transactions "https://github.com/sriram36/wirematch/blob/main/frontend/src/components/TransactionTable.jsx"
click node_lineitems "https://github.com/sriram36/wirematch/blob/main/frontend/src/components/LineItemPanel.jsx"
click node_statusbadge "https://github.com/sriram36/wirematch/blob/main/frontend/src/components/StatusBadge.jsx"
click node_format "https://github.com/sriram36/wirematch/blob/main/frontend/src/format.js"
click node_clientapi "https://github.com/sriram36/wirematch/blob/main/frontend/src/api.js"
click node_apiviews "https://github.com/sriram36/wirematch/blob/main/backend/recon/views.py"
click node_serializers "https://github.com/sriram36/wirematch/blob/main/backend/recon/serializers.py"
click node_csv "https://github.com/sriram36/wirematch/blob/main/backend/recon/csv_parsing.py"
click node_importer "https://github.com/sriram36/wirematch/blob/main/backend/recon/importer.py"
click node_matcher "https://github.com/sriram36/wirematch/blob/main/backend/recon/matching.py"
click node_normalizer "https://github.com/sriram36/wirematch/blob/main/backend/recon/normalization.py"
click node_reconcile "https://github.com/sriram36/wirematch/blob/main/backend/recon/reconciliation.py"
click node_selectors "https://github.com/sriram36/wirematch/blob/main/backend/recon/selectors.py"
click node_records "https://github.com/sriram36/wirematch/blob/main/backend/recon/models.py"

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_app,node_orgswitch,node_importpanel,node_transactions,node_lineitems,node_statusbadge,node_format toneBlue
class node_clientapi,node_apiviews,node_serializers toneAmber
class node_csv,node_importer,node_matcher,node_normalizer,node_reconcile,node_selectors toneMint
class node_records,node_database toneRose
class node_gp toneIndigo
```

## Components

### Review dashboard

- [Dashboard state](https://github.com/sriram36/wirematch/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Organization switcher](https://github.com/sriram36/wirematch/blob/main/frontend/src/components/OrgSwitcher.jsx): `frontend/src/components/OrgSwitcher.jsx`
- [CSV upload panel](https://github.com/sriram36/wirematch/blob/main/frontend/src/components/ImportPanel.jsx): `frontend/src/components/ImportPanel.jsx`
- [Transaction review](https://github.com/sriram36/wirematch/blob/main/frontend/src/components/TransactionTable.jsx): `frontend/src/components/TransactionTable.jsx`
- [Capital call panel](https://github.com/sriram36/wirematch/blob/main/frontend/src/components/LineItemPanel.jsx): `frontend/src/components/LineItemPanel.jsx`
- [Status badge](https://github.com/sriram36/wirematch/blob/main/frontend/src/components/StatusBadge.jsx): `frontend/src/components/StatusBadge.jsx`
- [Display formatting](https://github.com/sriram36/wirematch/blob/main/frontend/src/format.js): `frontend/src/format.js`

### API boundary

- [HTTP API client](https://github.com/sriram36/wirematch/blob/main/frontend/src/api.js): `frontend/src/api.js`
- [REST endpoints](https://github.com/sriram36/wirematch/blob/main/backend/recon/views.py): `backend/recon/views.py`
- [Response serializers](https://github.com/sriram36/wirematch/blob/main/backend/recon/serializers.py): `backend/recon/serializers.py`

### Import and reconciliation

- [CSV validation](https://github.com/sriram36/wirematch/blob/main/backend/recon/csv_parsing.py): `backend/recon/csv_parsing.py`
- [Statement importer](https://github.com/sriram36/wirematch/blob/main/backend/recon/importer.py): `backend/recon/importer.py`
- [Payment matching](https://github.com/sriram36/wirematch/blob/main/backend/recon/matching.py): `backend/recon/matching.py`
- [Reference normalization](https://github.com/sriram36/wirematch/blob/main/backend/recon/normalization.py): `backend/recon/normalization.py`
- [Match decisions](https://github.com/sriram36/wirematch/blob/main/backend/recon/reconciliation.py): `backend/recon/reconciliation.py`
- [Tenant queries](https://github.com/sriram36/wirematch/blob/main/backend/recon/selectors.py): `backend/recon/selectors.py`

### Tenant data

- [Reconciliation records](https://github.com/sriram36/wirematch/blob/main/backend/recon/models.py): `backend/recon/models.py`
- **PostgreSQL**

### Other components

- **General partner**

## Connections

- General partner → Dashboard state: uses (evidence: `README.md`)
- Dashboard state → HTTP API client: requests data (evidence: `frontend/src/App.jsx`)
- Dashboard state → Organization switcher: renders (evidence: `frontend/src/App.jsx`)
- Dashboard state → CSV upload panel: renders (evidence: `frontend/src/App.jsx`)
- Dashboard state → Transaction review: renders (evidence: `frontend/src/App.jsx`)
- Dashboard state → Capital call panel: renders (evidence: `frontend/src/App.jsx`)
- Transaction review → Status badge: renders (evidence: `frontend/src/components/TransactionTable.jsx`)
- Transaction review → Display formatting: formats values (evidence: `frontend/src/components/TransactionTable.jsx`)
- Capital call panel → Status badge: renders (evidence: `frontend/src/components/LineItemPanel.jsx`)
- Status badge → Display formatting: formats status (evidence: `frontend/src/components/StatusBadge.jsx`)
- CSV upload panel → HTTP API client: uploads CSV (evidence: `frontend/src/components/ImportPanel.jsx`)
- HTTP API client → REST endpoints: calls API
- REST endpoints → Statement importer: imports statement (evidence: `backend/recon/views.py`)
- REST endpoints → Match decisions: handles decisions (evidence: `backend/recon/views.py`)
- REST endpoints → Tenant queries: queries tenant data (evidence: `backend/recon/views.py`)
- REST endpoints → Response serializers: serializes responses (evidence: `backend/recon/views.py`)
- Statement importer → CSV validation: parses statement (evidence: `backend/recon/importer.py`)
- Statement importer → Payment matching: matches credits (evidence: `backend/recon/importer.py`)
- Statement importer → Tenant queries: loads open items (evidence: `backend/recon/importer.py`)
- Statement importer → Reconciliation records: saves transactions (evidence: `backend/recon/importer.py`)
- Payment matching → Reference normalization: normalizes references (evidence: `backend/recon/matching.py`)
- Match decisions → Reconciliation records: updates funding (evidence: `backend/recon/reconciliation.py`)
- Tenant queries → Reconciliation records: reads records (evidence: `backend/recon/selectors.py`)
- Reconciliation records → PostgreSQL: persists records (evidence: `README.md`)
