# vishesh-modanwal/n100_financial_intelligence_platform architecture

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

- Interactive diagram: https://gitdiagram.com/vishesh-modanwal/n100_financial_intelligence_platform
- Repository: https://github.com/vishesh-modanwal/n100_financial_intelligence_platform

## Overview

The N100 Financial Intelligence Platform turns financial datasets into a SQLite warehouse, then exposes company analysis through analytics, screening, dashboards, reports, and an API. The documented data workflow is ingestion, standardization, validation, transformation, and warehouse loading; the principal user workflow is requesting company or screener results through an API route or dashboard. Source excerpts confirm selected calls and database access; several listed product capabilities are represented from the README or source index, so their internal connections are omitted where not evidenced.

Main entry points: [`src/api/main.py`](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/api/main.py) (REST API), [`src/screener/engine.py`](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/screener/engine.py) (Screener Engine), [`src/etl/loader.py`](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/etl/loader.py) (Dataset Ingestion), [`src/etl/normalizer.py`](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/etl/normalizer.py) (Data Standardization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data Pipeline"]
  node_ingestion["Dataset Ingestion<br/>[loader.py]"]
  node_standardization["Data Standardization<br/>[normalizer.py]"]
  node_transformation["ETL Transformation<br/>[transformer.py]"]
  node_warehouse[("SQLite Warehouse")]
end

subgraph group_analysis["Financial Analysis"]
  node_ratio["Ratio Engine<br/>[ratio_engine.py]"]
  node_kpi["KPI Analytics<br/>[kpi_engine.py]"]
  node_cashflow["Cash Flow KPIs<br/>[cashflow_kpis.py]"]
  node_scoring["Quality Scoring<br/>[scoring.py]"]
  node_clustering["Company Clustering<br/>[clustering.py]"]
  node_cluster_insights["Cluster Insights"]
  node_portfolio["Portfolio Analytics"]
  node_screener["Screener Engine<br/>[engine.py]"]
end

subgraph group_experience["User Interfaces"]
  node_api["REST API<br/>[main.py]"]
  node_company_routes["Company Routes<br/>[companies.py]"]
  node_screener_routes["Screener Route<br/>[screener.py]"]
  node_cluster_routes["Clustering Route<br/>[clustering.py]"]
  node_dashboard["Financial Dashboard<br/>[app.py]"]
  node_dashboard_data["Dashboard Data Access<br/>[db.py]"]
end

subgraph group_outputs["Reports and Exports"]
  node_reporting["Financial Reports<br/>[tearsheet.py]"]
  node_peer_reporting["Peer Reports<br/>[peer_report.py]"]
  node_excel["Excel Export<br/>[excel_export.py]"]
end

subgraph group_assurance["Quality and Audit"]
  node_validation["Data Validation<br/>[validator.py]"]
  node_audit["Warehouse Audit<br/>[audit_engine.py]"]
end

node_raw["Raw Financial Data"]
node_user(("Analyst"))

node_raw -->|"ingests"| node_ingestion
node_ingestion -->|"standardizes"| node_standardization
node_standardization -->|"validates"| node_validation
node_validation -->|"passes to"| node_transformation
node_transformation -->|"loads"| node_warehouse
node_ratio -->|"reads and writes"| node_warehouse
node_kpi -.->|"persists metrics"| node_warehouse
node_cashflow -.->|"stores KPIs"| node_warehouse
node_screener -->|"queries"| node_warehouse
node_screener -->|"uses scores"| node_scoring
node_clustering -.->|"informs"| node_cluster_insights
node_portfolio -.->|"analyzes holdings"| node_warehouse
node_user -->|"requests data"| node_api
node_api -->|"registers"| node_company_routes
node_api -->|"registers"| node_screener_routes
node_api -->|"registers"| node_cluster_routes
node_screener_routes -->|"runs"| node_screener
node_cluster_routes -->|"invokes"| node_clustering
node_user -.->|"opens"| node_dashboard
node_dashboard -.->|"retrieves data"| node_dashboard_data
node_dashboard_data -->|"queries"| node_warehouse
node_user -.->|"exports"| node_excel
node_excel -->|"runs presets"| node_screener
node_audit -->|"audits"| node_warehouse

click node_ingestion "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/etl/loader.py"
click node_standardization "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/etl/normalizer.py"
click node_validation "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/etl/validator.py"
click node_transformation "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/etl/transformer.py"
click node_ratio "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/analytics/ratio_engine.py"
click node_kpi "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/analytics/kpi_engine.py"
click node_cashflow "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/analytics/cashflow_kpis.py"
click node_scoring "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/analytics/scoring.py"
click node_clustering "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/analytics/clustering.py"
click node_cluster_insights "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/analytics/cluster_intelligence.py"
click node_portfolio "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/analytics/portfolio_allocation.py"
click node_screener "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/screener/engine.py"
click node_api "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/api/main.py"
click node_company_routes "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/api/routers/companies.py"
click node_screener_routes "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/api/routers/screener.py"
click node_cluster_routes "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/api/routers/clustering.py"
click node_dashboard "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/dashboard/app.py"
click node_dashboard_data "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/dashboard/utils/db.py"
click node_reporting "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/reporting/tearsheet.py"
click node_peer_reporting "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/reporting/peer_report.py"
click node_excel "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/export/excel_export.py"
click node_audit "https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/audit/audit_engine.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_ingestion,node_standardization,node_transformation,node_warehouse toneBlue
class node_ratio,node_kpi,node_cashflow,node_scoring,node_clustering,node_cluster_insights,node_portfolio,node_screener toneAmber
class node_api,node_company_routes,node_screener_routes,node_cluster_routes,node_dashboard,node_dashboard_data toneMint
class node_reporting,node_peer_reporting,node_excel toneRose
class node_validation,node_audit,node_raw,node_user toneIndigo
```

## Components

### Data Pipeline

- [Dataset Ingestion](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/etl/loader.py): `src/etl/loader.py`
- [Data Standardization](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/etl/normalizer.py): `src/etl/normalizer.py`
- [ETL Transformation](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/etl/transformer.py): `src/etl/transformer.py`
- **SQLite Warehouse**

### Financial Analysis

- [Ratio Engine](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/analytics/ratio_engine.py): `src/analytics/ratio_engine.py`
- [KPI Analytics](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/analytics/kpi_engine.py): `src/analytics/kpi_engine.py`
- [Cash Flow KPIs](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/analytics/cashflow_kpis.py): `src/analytics/cashflow_kpis.py`
- [Quality Scoring](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/analytics/scoring.py): `src/analytics/scoring.py`
- [Company Clustering](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/analytics/clustering.py): `src/analytics/clustering.py`
- [Cluster Insights](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/analytics/cluster_intelligence.py): `src/analytics/cluster_intelligence.py`
- [Portfolio Analytics](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/analytics/portfolio_allocation.py): `src/analytics/portfolio_allocation.py`
- [Screener Engine](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/screener/engine.py): `src/screener/engine.py`

### User Interfaces

- [REST API](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/api/main.py): `src/api/main.py`
- [Company Routes](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/api/routers/companies.py): `src/api/routers/companies.py`
- [Screener Route](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/api/routers/screener.py): `src/api/routers/screener.py`
- [Clustering Route](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/api/routers/clustering.py): `src/api/routers/clustering.py`
- [Financial Dashboard](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/dashboard/app.py): `src/dashboard/app.py`
- [Dashboard Data Access](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/dashboard/utils/db.py): `src/dashboard/utils/db.py`

### Reports and Exports

- [Financial Reports](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/reporting/tearsheet.py): `src/reporting/tearsheet.py`
- [Peer Reports](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/reporting/peer_report.py): `src/reporting/peer_report.py`
- [Excel Export](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/export/excel_export.py): `src/export/excel_export.py`

### Quality and Audit

- [Data Validation](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/etl/validator.py): `src/etl/validator.py`
- [Warehouse Audit](https://github.com/vishesh-modanwal/n100_financial_intelligence_platform/blob/main/src/audit/audit_engine.py): `src/audit/audit_engine.py`

### Other components

- **Raw Financial Data**
- **Analyst**

## Connections

- Raw Financial Data → Dataset Ingestion: ingests (evidence: `README.md`)
- Dataset Ingestion → Data Standardization: standardizes (evidence: `README.md`)
- Data Standardization → Data Validation: validates (evidence: `README.md`)
- Data Validation → ETL Transformation: passes to (evidence: `README.md`)
- ETL Transformation → SQLite Warehouse: loads (evidence: `README.md`)
- Ratio Engine → SQLite Warehouse: reads and writes (evidence: `src/analytics/ratio_engine.py`)
- KPI Analytics → SQLite Warehouse: persists metrics
- Cash Flow KPIs → SQLite Warehouse: stores KPIs
- Screener Engine → SQLite Warehouse: queries (evidence: `src/screener/engine.py`)
- Screener Engine → Quality Scoring: uses scores (evidence: `src/screener/engine.py`)
- Company Clustering → Cluster Insights: informs
- Portfolio Analytics → SQLite Warehouse: analyzes holdings
- Analyst → REST API: requests data (evidence: `src/api/main.py`)
- REST API → Company Routes: registers (evidence: `src/api/main.py`)
- REST API → Screener Route: registers (evidence: `src/api/main.py`)
- REST API → Clustering Route: registers (evidence: `src/api/main.py`)
- Screener Route → Screener Engine: runs (evidence: `src/api/routers/screener.py`)
- Clustering Route → Company Clustering: invokes (evidence: `src/api/routers/clustering.py`)
- Analyst → Financial Dashboard: opens
- Financial Dashboard → Dashboard Data Access: retrieves data
- Dashboard Data Access → SQLite Warehouse: queries (evidence: `src/dashboard/utils/db.py`)
- Analyst → Excel Export: exports
- Excel Export → Screener Engine: runs presets (evidence: `src/export/excel_export.py`)
- Warehouse Audit → SQLite Warehouse: audits (evidence: `src/audit/audit_engine.py`)
