# kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard architecture

> Architecture diagram of the GitHub repository kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard
- Repository: https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard

## Overview

This repository simulates front- and back-office trade data, reconciles the records into matched trades and operational exceptions, then presents results in a Streamlit dashboard. The main user workflow is to inspect trade-volume, STP and exception metrics, review aging and settlement-failure analyses, and examine actionable exception details. The generator and reconciliation source support the data flow shown; confirmation is mentioned as a lifecycle area in the README but is not implemented as a distinct stage in the sampled code. Excel export is documented but not visible in the sampled dashboard source.

Main entry points: [`app.py`](https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/app.py) (Streamlit dashboard), [`trade_data.db`](https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/trade_data.db) (Trade database), [`reconciliation.py`](https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/reconciliation.py) (Match and classify), [`generate_data.py`](https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/generate_data.py) (Trade simulator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_generation["Trade data"]
  node_generator["Trade simulator<br/>[generate_data.py]"]
  node_trade_db[("Trade database<br/>[trade_data.db]")]
end

subgraph group_reconciliation["Reconciliation"]
  node_recon_engine["Match and classify<br/>[reconciliation.py]"]
  node_aging["Exception aging<br/>[reconciliation.py]"]
end

subgraph group_dashboard["Operations dashboard"]
  node_dashboard_app["Streamlit dashboard<br/>[app.py]"]
  node_kpis["Lifecycle KPIs<br/>[app.py]"]
  node_exception_views["Exception analysis<br/>[app.py]"]
  node_detail_table["Actionable details<br/>[app.py]"]
  node_excel_reporting["Excel reporting<br/>[app.py]"]
end

node_operator(("Operations user"))

node_generator -->|"writes FO/BO trades"| node_trade_db
node_recon_engine -->|"reads FO/BO trades"| node_trade_db
node_recon_engine -->|"writes results"| node_trade_db
node_recon_engine -->|"calculates aging"| node_aging
node_operator -->|"opens dashboard"| node_dashboard_app
node_dashboard_app -->|"reads results"| node_trade_db
node_dashboard_app -->|"calculates metrics"| node_kpis
node_dashboard_app -->|"builds analyses"| node_exception_views
node_dashboard_app -->|"shows exceptions"| node_detail_table
node_dashboard_app -.->|"supports export"| node_excel_reporting

click node_generator "https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/generate_data.py"
click node_trade_db "https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/trade_data.db"
click node_recon_engine "https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/reconciliation.py"
click node_aging "https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/reconciliation.py"
click node_dashboard_app "https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/app.py"
click node_kpis "https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/app.py"
click node_exception_views "https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/app.py"
click node_detail_table "https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/app.py"
click node_excel_reporting "https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/app.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_generator,node_trade_db,node_operator toneBlue
class node_recon_engine,node_aging toneAmber
class node_dashboard_app,node_kpis,node_exception_views,node_detail_table,node_excel_reporting toneMint
```

## Components

### Trade data

- [Trade simulator](https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/generate_data.py): `generate_data.py`
- [Trade database](https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/trade_data.db): `trade_data.db`

### Reconciliation

- [Match and classify](https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/reconciliation.py): `reconciliation.py`
- [Exception aging](https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/reconciliation.py): `reconciliation.py`

### Operations dashboard

- [Streamlit dashboard](https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/app.py): `app.py`
- [Lifecycle KPIs](https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/app.py): `app.py`
- [Exception analysis](https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/app.py): `app.py`
- [Actionable details](https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/app.py): `app.py`
- [Excel reporting](https://github.com/kmuralikarthik/capital-markets-trade-lifecycle-analytics-reconciliation-dashboard/blob/main/app.py): `app.py`

### Other components

- **Operations user**

## Connections

- Trade simulator → Trade database: writes FO/BO trades
- Match and classify → Trade database: reads FO/BO trades
- Match and classify → Trade database: writes results
- Match and classify → Exception aging: calculates aging
- Operations user → Streamlit dashboard: opens dashboard
- Streamlit dashboard → Trade database: reads results
- Streamlit dashboard → Lifecycle KPIs: calculates metrics
- Streamlit dashboard → Exception analysis: builds analyses
- Streamlit dashboard → Actionable details: shows exceptions
- Streamlit dashboard → Excel reporting: supports export
