# daman-upadhya/dlr_portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/daman-upadhya/dlr_portfolio
- Repository: https://github.com/daman-upadhya/dlr_portfolio

## Overview

DLR Portfolio turns VisiLean project feeds into self-contained, offline-capable project dashboards and a portfolio landing page. The principal workflow is project configuration → feed acquisition → KPI calculation → HTML assembly → published pages. In the browser, users filter the embedded facts, explore Performance and Constraints views, inspect matching detail lists, and export PPC reviews. The README documents the build relationships; sampled source confirms the calculation-to-filtering flow and chart/detail capabilities. Build internals and some template wiring were not sampled, so those documented links cite the README.

Main entry points: [`build/build.py`](https://github.com/daman-upadhya/dlr_portfolio/blob/main/build/build.py) (Build runner), [`Template/calculation.py`](https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/calculation.py) (KPI calculation), [`build/inject.py`](https://github.com/daman-upadhya/dlr_portfolio/blob/main/build/inject.py) (Page assembly), [`build/fetch.py`](https://github.com/daman-upadhya/dlr_portfolio/blob/main/build/fetch.py) (Feed fetcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_build["Build and data"]
  node_project_config["Project settings<br/>[project.json]"]
  node_build_runner["Build runner<br/>[build.py]"]
  node_feed_fetcher["Feed fetcher<br/>[fetch.py]"]
  node_project_defaults["Project defaults"]
  node_page_assembler["Page assembly<br/>[inject.py]"]
end

subgraph group_model["KPI model"]
  node_calc_logic["KPI calculation<br/>[calculation.py]"]
  node_extra_calc["Optional calculations"]
end

subgraph group_dashboard["Project dashboard"]
  node_dashboard_template["Dashboard template<br/>[Dashboard.html]"]
  node_dashboard_data["Report settings"]
  node_filter_aggregation["Filter aggregation<br/>[aggregate.js]"]
  node_page_app["Dashboard interaction<br/>[app.js]"]
  node_chart_renderers["Chart renderers<br/>[charts.js]"]
end

subgraph group_portfolio["Portfolio view"]
  node_landing_template["Landing template<br/>[Landing.html]"]
  node_landing_app["Portfolio dashboard<br/>[app.js]"]
end

node_maintainer(("Report maintainer"))
node_visilean["VisiLean API"]
node_viewer(("Dashboard viewer"))
node_pages["GitHub Pages"]

node_maintainer -->|"configures"| node_project_config
node_build_runner -->|"reads"| node_project_config
node_build_runner -->|"loads defaults"| node_project_defaults
node_build_runner -->|"invokes"| node_feed_fetcher
node_feed_fetcher -->|"fetches feeds"| node_visilean
node_feed_fetcher -->|"supplies feeds"| node_calc_logic
node_build_runner -->|"runs"| node_calc_logic
node_build_runner -->|"optionally extends"| node_extra_calc
node_calc_logic -->|"provides metrics"| node_page_assembler
node_dashboard_data -->|"configures"| node_calc_logic
node_page_assembler -->|"injects into"| node_dashboard_template
node_page_assembler -->|"embeds"| node_dashboard_data
node_build_runner -->|"invokes"| node_page_assembler
node_calc_logic -->|"embeds facts for"| node_filter_aggregation
node_page_app -->|"filters through"| node_filter_aggregation
node_page_app -.->|"renders with"| node_chart_renderers
node_viewer -.->|"uses"| node_page_app
node_viewer -.->|"uses"| node_landing_app
node_landing_app -.->|"renders"| node_landing_template
node_build_runner -->|"assembles landing"| node_landing_template
node_maintainer -->|"publishes pages"| node_pages
node_pages -->|"serves dashboards"| node_viewer

click node_project_config "https://github.com/daman-upadhya/dlr_portfolio/blob/main/PAR14/project.json"
click node_build_runner "https://github.com/daman-upadhya/dlr_portfolio/blob/main/build/build.py"
click node_feed_fetcher "https://github.com/daman-upadhya/dlr_portfolio/blob/main/build/fetch.py"
click node_project_defaults "https://github.com/daman-upadhya/dlr_portfolio/blob/main/build/project_defaults.json"
click node_calc_logic "https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/calculation.py"
click node_extra_calc "https://github.com/daman-upadhya/dlr_portfolio/tree/main/build"
click node_dashboard_template "https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/Dashboard.html"
click node_dashboard_data "https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/dashboard_data.json"
click node_page_assembler "https://github.com/daman-upadhya/dlr_portfolio/blob/main/build/inject.py"
click node_filter_aggregation "https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/scripts/aggregate.js"
click node_page_app "https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/scripts/app.js"
click node_chart_renderers "https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/scripts/charts.js"
click node_landing_template "https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/Landing.html"
click node_landing_app "https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/scripts/app.js"

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_project_config,node_build_runner,node_feed_fetcher,node_project_defaults,node_page_assembler,node_viewer toneBlue
class node_calc_logic,node_extra_calc toneAmber
class node_dashboard_template,node_dashboard_data,node_filter_aggregation,node_page_app,node_chart_renderers,node_visilean toneMint
class node_landing_template,node_landing_app toneRose
class node_maintainer,node_pages toneIndigo
```

## Components

### Build and data

- [Project settings](https://github.com/daman-upadhya/dlr_portfolio/blob/main/PAR14/project.json): `PAR14/project.json`
- [Build runner](https://github.com/daman-upadhya/dlr_portfolio/blob/main/build/build.py): `build/build.py`
- [Feed fetcher](https://github.com/daman-upadhya/dlr_portfolio/blob/main/build/fetch.py): `build/fetch.py`
- [Project defaults](https://github.com/daman-upadhya/dlr_portfolio/blob/main/build/project_defaults.json): `build/project_defaults.json`
- [Page assembly](https://github.com/daman-upadhya/dlr_portfolio/blob/main/build/inject.py): `build/inject.py`

### KPI model

- [KPI calculation](https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/calculation.py): `Template/calculation.py`
- [Optional calculations](https://github.com/daman-upadhya/dlr_portfolio/tree/main/build): `build`

### Project dashboard

- [Dashboard template](https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/Dashboard.html): `Template/Dashboard.html`
- [Report settings](https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/dashboard_data.json): `Template/dashboard_data.json`
- [Filter aggregation](https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/scripts/aggregate.js): `Template/scripts/aggregate.js`
- [Dashboard interaction](https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/scripts/app.js): `Template/scripts/app.js`
- [Chart renderers](https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/scripts/charts.js): `Template/scripts/charts.js`

### Portfolio view

- [Landing template](https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/Landing.html): `Template/Landing.html`
- [Portfolio dashboard](https://github.com/daman-upadhya/dlr_portfolio/blob/main/Template/scripts/app.js): `Template/scripts/app.js`

### Other components

- **Report maintainer**
- **VisiLean API**
- **Dashboard viewer**
- **GitHub Pages**

## Connections

- Report maintainer → Project settings: configures (evidence: `README.md`)
- Build runner → Project settings: reads (evidence: `README.md`)
- Build runner → Project defaults: loads defaults (evidence: `README.md`)
- Build runner → Feed fetcher: invokes (evidence: `README.md`)
- Feed fetcher → VisiLean API: fetches feeds (evidence: `README.md`)
- Feed fetcher → KPI calculation: supplies feeds (evidence: `README.md`)
- Build runner → KPI calculation: runs (evidence: `README.md`)
- Build runner → Optional calculations: optionally extends (evidence: `README.md`)
- KPI calculation → Page assembly: provides metrics (evidence: `README.md`)
- Report settings → KPI calculation: configures (evidence: `README.md`)
- Page assembly → Dashboard template: injects into (evidence: `README.md`)
- Page assembly → Report settings: embeds (evidence: `README.md`)
- Build runner → Page assembly: invokes (evidence: `README.md`)
- KPI calculation → Filter aggregation: embeds facts for (evidence: `Template/scripts/aggregate.js`)
- Dashboard interaction → Filter aggregation: filters through (evidence: `Template/scripts/app.js`)
- Dashboard interaction → Chart renderers: renders with
- Dashboard viewer → Dashboard interaction: uses
- Dashboard viewer → Portfolio dashboard: uses
- Portfolio dashboard → Landing template: renders
- Build runner → Landing template: assembles landing (evidence: `README.md`)
- Report maintainer → GitHub Pages: publishes pages (evidence: `README.md`)
- GitHub Pages → Dashboard viewer: serves dashboards (evidence: `README.md`)
