# platinum-relations/interview-project architecture

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

- Interactive diagram: https://gitdiagram.com/platinum-relations/interview-project
- Repository: https://github.com/platinum-relations/interview-project

## Overview

This repository is an exercise specification and sample-data package, not an implemented application: no runtime source files are present. The documented workflow is to import a CSV ledger and JSON settlement file, reconcile records using fee-aware matching, persist results, and report a summary with break-level detail. The README also specifies malformed-row quarantine and distinct mismatch categories, though its excerpt ends during the fee-discrepancy rule. Workflow links below are documented requirements, not inspected code calls.

Main entry points: [`data/internal_transactions.csv`](https://github.com/platinum-relations/interview-project/blob/main/data/internal_transactions.csv) (Internal ledger), [`data/processor_settlement.json`](https://github.com/platinum-relations/interview-project/blob/main/data/processor_settlement.json) (Settlement records), [`fee_schedule.json`](https://github.com/platinum-relations/interview-project/blob/main/fee_schedule.json) (Fee schedule)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Reconciliation inputs"]
  node_ledger["Internal ledger"]
  node_settlement["Settlement records"]
  node_fees["Fee schedule<br/>[fee_schedule.json]"]
end

subgraph group_processing["Reconciliation workflow"]
  node_import["File import"]
  node_quarantine["Malformed rows"]
  node_matching["Transaction matching"]
  node_fee_math["Fee calculation"]
  node_classification["Break classification"]
end

subgraph group_results["Results"]
  node_persistence[("Result persistence")]
  node_report["Summary and drill-down"]
end

node_operator(("User"))

node_operator -->|"provides files"| node_import
node_ledger -->|"imports CSV"| node_import
node_settlement -->|"imports JSON"| node_import
node_import -->|"quarantines malformed rows"| node_quarantine
node_import -->|"supplies records"| node_matching
node_fees -->|"sets fee rules"| node_fee_math
node_fee_math -->|"supports fee-aware matching"| node_matching
node_matching -->|"identifies breaks"| node_classification
node_fee_math -->|"supports fee checks"| node_classification
node_classification -->|"persists results"| node_persistence
node_persistence -->|"provides results"| node_report
node_operator -->|"reviews results"| node_report

click node_ledger "https://github.com/platinum-relations/interview-project/blob/main/data/internal_transactions.csv"
click node_settlement "https://github.com/platinum-relations/interview-project/blob/main/data/processor_settlement.json"
click node_fees "https://github.com/platinum-relations/interview-project/blob/main/fee_schedule.json"

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_ledger,node_settlement,node_fees,node_operator toneBlue
class node_import,node_quarantine,node_matching,node_fee_math,node_classification toneAmber
class node_persistence,node_report toneMint
```

## Components

### Reconciliation inputs

- [Internal ledger](https://github.com/platinum-relations/interview-project/blob/main/data/internal_transactions.csv): `data/internal_transactions.csv`
- [Settlement records](https://github.com/platinum-relations/interview-project/blob/main/data/processor_settlement.json): `data/processor_settlement.json`
- [Fee schedule](https://github.com/platinum-relations/interview-project/blob/main/fee_schedule.json): `fee_schedule.json`

### Reconciliation workflow

- **File import**
- **Malformed rows**
- **Transaction matching**
- **Fee calculation**
- **Break classification**

### Results

- **Result persistence**
- **Summary and drill-down**

### Other components

- **User**

## Connections

- User → File import: provides files (evidence: `README.md`)
- Internal ledger → File import: imports CSV (evidence: `README.md`)
- Settlement records → File import: imports JSON (evidence: `README.md`)
- File import → Malformed rows: quarantines malformed rows (evidence: `README.md`)
- File import → Transaction matching: supplies records (evidence: `README.md`)
- Fee schedule → Fee calculation: sets fee rules (evidence: `README.md`)
- Fee calculation → Transaction matching: supports fee-aware matching (evidence: `README.md`)
- Transaction matching → Break classification: identifies breaks (evidence: `README.md`)
- Fee calculation → Break classification: supports fee checks (evidence: `README.md`)
- Break classification → Result persistence: persists results (evidence: `README.md`)
- Result persistence → Summary and drill-down: provides results (evidence: `README.md`)
- User → Summary and drill-down: reviews results (evidence: `README.md`)
