# national-digital-twin/iris-visualisation architecture

> Architecture diagram of the GitHub repository national-digital-twin/iris-visualisation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/national-digital-twin/iris-visualisation
- Repository: https://github.com/national-digital-twin/iris-visualisation

## Overview

1. **What this repo is**
   - `IRIS-visualisation` is the browser-based client for IRIS. It is an Angular application that lets users search for places, filter housing stock, inspect map layers, and explore EPC, climate, and demographic summaries.

2. **Top-level UI structure**
   - The app is organized around route-level containers under `src/app/containers` and reusable components under `src/app/components`.
   - The main UI flow is: shell/layout → filter/search controls → results panel/map/dashboard → detail panels and modal dialogs.

3. **Primary user-facing subsystems**
   - **Map experience:** `map`, `minimap`, map state guard, and layer components render spatial data and allow geographic interaction.
   - **Search and filtering:** `main-filters`, `filter-panel`, `area-filter-panel`, `multi-button-filter`, and selection dialogs drive the query state.
   - **Results and detail inspection:** `results-panel`, `results-card`, `details-panel`, and `downloadable-content-modal` present selected buildings/areas and downloadable outputs.
   - **Dashboard analytics:** `containers/dashboard` hosts chart components for EPC, SAP, deprivation, extreme weather, and other summary views.

4. **Core domain and state layer**
   - `src/app/core` contains the non-visual application logic: models, enums, pipes, helpers, guards, interceptors, tokens, and services.
   - This is where the app’s domain state lives: buildings, areas, runtime configuration, URL state, UI state, settings, and filtering criteria.

5. **Data access and backend integration**
   - The service layer includes `address-search`, `spatial-query`, `data`, `filterable-building`, `epc-data`, `climate-data`, `demographics-data`, `dashboard`, and `data-download`.
   - These services are the main boundary to backend APIs and data sources. The UI does not appear to talk directly to raw datasets; it consumes structured API responses and transforms them into map, chart, and results models.

6. **Map/layer architecture**
   - Map overlays are built through a dedicated layer subsystem under `core/services/layers`.
   - There are specialized layers for EPC, deprivation, climate, hot summer days, icing days, sunlight hours, wind-driven rain, and demo data, with a `layer-factory` creating the right layer for the current view.
   - This suggests the map is a compositional rendering surface, with each thematic dataset attached as an independent layer.

7. **Runtime configuration and environment separation**
   - The app supports environment-specific configuration via `src/configurations/dev|prod` and `src/environments`.
   - Tokens such as `backend-endpoint`, `search-endpoint`, `runtime-configuration`, and storage-related tokens indicate the app reads runtime values at startup and persists some preferences in browser storage.

8. **Assets and client-side presentation**
   - Static assets include PDFs, icons, images, GeoJSON, and small JavaScript helpers for map popups.
   - Styling is split across global theme/map/table SCSS files and component-level styles, reinforcing a rich client-side presentation layer rather than server-rendered pages.

9. **Transparent proxy boundary**
   - `transparent-proxy/` is a separate deployable component, and there are matching Kubernetes manifests under `k8s/transparent-proxy`.
   - Its config templates and service account/Istio/Vault setup indicate it acts as an HTTP boundary between the browser app and protected backend services, likely simplifying same-origin access and secret handling.
   - The visualiser itself is deployed separately under `k8s/visualiser`, so the runtime topology is at least two front-end-facing workloads: the UI and the proxy.

10. **Deployment and environment model**
   - The repository includes Dockerfiles, build scripts, Nginx config, and Kubernetes overlays for dev/staging/prod.
   - Istio resources (`gateway`, `virtualService`, `request-authentication`, `peer-authentication`, `authorizationpolicy`) show the app is expected to run in a service-mesh-controlled cluster with authenticated ingress.

11. **Testing and quality gates**
   - Unit tests live alongside components and services, with Jest configured at the repo level.
   - The `qa/` workspace adds end-to-end and performance testing via Playwright/Cucumber, Lighthouse, and JMeter, which means the repo validates both UI behavior and user-facing performance.

12. **Delivery pipeline**
   - GitHub Actions workflows cover CI, CD, release publishing, and deployment to ECR for both the visualiser and transparent proxy.
   - This repo is therefore not just source code; it includes the build, packaging, test, and deployment path for the client application and its proxy companion.

Main entry points: [`src/app/containers/shell/shell.component.ts`](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/containers/shell/shell.component.ts) (Shell), [`src/app/core/services/spatial-query.service.ts`](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/core/services/spatial-query.service.ts) (Data services), [`src/app/core/services/layers/layer-factory.service.ts`](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/core/services/layers/layer-factory.service.ts) (Layer factory), [`transparent-proxy/Dockerfile`](https://github.com/national-digital-twin/iris-visualisation/tree/main/transparent-proxy/Dockerfile) (Transparent proxy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_grp_ui["UI shell"]
  node_node_shell["Shell<br/>route container<br/>[shell.component.ts]"]
  node_node_main_filters["Main filters<br/>route container"]
  node_node_filter_panel["Filter panel<br/>container"]
  node_node_results_panel["Results panel<br/>route container"]
  node_node_info_panel["Info panel<br/>route container"]
  node_node_map(("Map<br/>visual component<br/>[map.component.ts]"))
  node_node_minimap(("Minimap<br/>visual component"))
  node_node_dashboard["Dashboard<br/>route container"]
  node_node_results_cards["Result cards<br/>visual components"]
  node_node_details["Details panel<br/>visual component"]
  node_node_download_modal["Download modal<br/>dialog"]
  node_node_dashboard_charts["Dashboard charts<br/>chart suite"]
end

subgraph group_grp_core["Core logic"]
  node_node_domain_models["Domain models<br/>core models<br/>[building.model.ts]"]
  node_node_state_services["State services<br/>core services"]
  node_node_data_services["Data services<br/>api services"]
  node_node_layer_factory{{"Layer factory<br/>map layers"}}
  node_node_map_layers{{"Theme layers<br/>map layers<br/>[epc.layer.ts]"}}
end

subgraph group_grp_deploy["Delivery"]
  node_node_runtime_config["Runtime config<br/>config boundary<br/>[config.json]"]
  node_node_proxy["Transparent proxy<br/>deployable proxy"]
  node_node_k8s["Kubernetes<br/>deployment manifests<br/>[deployment.yaml]"]
  node_node_ci_cd["CI/CD<br/>github workflows<br/>[frontend-ci-pr.yml]"]
end

subgraph group_grp_qa["Quality"]
  node_node_qa["QA suite<br/>test workspace<br/>[searchView.feature]"]
end

node_node_shell -->|"hosts"| node_node_main_filters
node_node_shell -->|"hosts"| node_node_results_panel
node_node_shell -->|"hosts"| node_node_info_panel
node_node_shell -->|"renders"| node_node_map
node_node_shell -->|"renders"| node_node_minimap
node_node_main_filters -->|"uses"| node_node_filter_panel
node_node_filter_panel -->|"queries"| node_node_data_services
node_node_results_panel -->|"shows"| node_node_results_cards
node_node_results_cards -->|"opens"| node_node_details
node_node_details -->|"offers"| node_node_download_modal
node_node_info_panel -->|"opens"| node_node_download_modal
node_node_map -->|"requests"| node_node_layer_factory
node_node_minimap -->|"shares"| node_node_layer_factory
node_node_layer_factory -->|"creates"| node_node_map_layers
node_node_map_layers -->|"feeds"| node_node_data_services
node_node_dashboard -->|"hosts"| node_node_dashboard_charts
node_node_dashboard_charts -->|"reads"| node_node_data_services
node_node_data_services -->|"updates"| node_node_state_services
node_node_state_services -->|"stores"| node_node_domain_models
node_node_runtime_config -->|"configures"| node_node_data_services
node_node_runtime_config -->|"targets"| node_node_proxy
node_node_proxy -->|"deployed by"| node_node_k8s
node_node_shell -.->|"validated by"| node_node_qa
node_node_ci_cd -->|"deploys"| node_node_k8s
node_node_ci_cd -->|"builds"| node_node_proxy

click node_node_shell "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/containers/shell/shell.component.ts"
click node_node_main_filters "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/containers/main-filters/main-filters.component.ts"
click node_node_filter_panel "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/containers/filter-panel/filter-panel.component.ts"
click node_node_results_panel "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/containers/results-panel/results-panel.component.ts"
click node_node_info_panel "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/containers/info-panel/info-panel.component.ts"
click node_node_map "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/components/map/map.component.ts"
click node_node_minimap "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/components/minimap/minimap.component.ts"
click node_node_dashboard "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/containers/dashboard/dashboard-page.component.ts"
click node_node_results_cards "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/components/results-card/results-card.component.ts"
click node_node_details "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/components/details-panel/details-panel.component.ts"
click node_node_download_modal "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/components/downloadable-content-modal/downloadable-content-modal.ts"
click node_node_dashboard_charts "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/containers/dashboard/charts/overall-epc-chart/overall-epc-chart.component.ts"
click node_node_domain_models "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/core/models/building.model.ts"
click node_node_state_services "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/core/services/ui-state.service.ts"
click node_node_data_services "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/core/services/spatial-query.service.ts"
click node_node_layer_factory "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/core/services/layers/layer-factory.service.ts"
click node_node_map_layers "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/core/services/layers/epc.layer.ts"
click node_node_runtime_config "https://github.com/national-digital-twin/iris-visualisation/blob/main/src/configurations/dev/config.json"
click node_node_proxy "https://github.com/national-digital-twin/iris-visualisation/tree/main/transparent-proxy/Dockerfile"
click node_node_k8s "https://github.com/national-digital-twin/iris-visualisation/blob/main/k8s/visualiser/base/deployment.yaml"
click node_node_ci_cd "https://github.com/national-digital-twin/iris-visualisation/blob/main/.github/workflows/frontend-ci-pr.yml"
click node_node_qa "https://github.com/national-digital-twin/iris-visualisation/blob/main/qa/src/test/features/searchView.feature"

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_node_shell,node_node_main_filters,node_node_filter_panel,node_node_results_panel,node_node_info_panel,node_node_map,node_node_minimap,node_node_dashboard,node_node_results_cards,node_node_details,node_node_download_modal,node_node_dashboard_charts toneBlue
class node_node_domain_models,node_node_state_services,node_node_data_services,node_node_layer_factory,node_node_map_layers toneAmber
class node_node_runtime_config,node_node_proxy,node_node_k8s,node_node_ci_cd toneMint
class node_node_qa toneRose
```

## Components

### UI shell

Angular route containers and reusable presentation components.

- [Shell](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/containers/shell/shell.component.ts): route container · Top-level app frame and layout host. · `src/app/containers/shell/shell.component.ts`
- [Main filters](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/containers/main-filters/main-filters.component.ts): route container · Primary search and filter entry point. · `src/app/containers/main-filters/main-filters.component.ts`
- [Filter panel](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/containers/filter-panel/filter-panel.component.ts): container · Filter orchestration and filter UI state. · `src/app/containers/filter-panel/filter-panel.component.ts`
- [Results panel](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/containers/results-panel/results-panel.component.ts): route container · Lists matched buildings and areas. · `src/app/containers/results-panel/results-panel.component.ts`
- [Info panel](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/containers/info-panel/info-panel.component.ts): route container · Selected-place information and supporting content. · `src/app/containers/info-panel/info-panel.component.ts`
- [Map](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/components/map/map.component.ts): visual component · Main spatial interaction surface. · `src/app/components/map/map.component.ts`
- [Minimap](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/components/minimap/minimap.component.ts): visual component · Secondary overview map. · `src/app/components/minimap/minimap.component.ts`
- [Dashboard](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/containers/dashboard/dashboard-page.component.ts): route container · Analytics page and chart host. · `src/app/containers/dashboard/dashboard-page.component.ts`
- [Result cards](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/components/results-card/results-card.component.ts): visual components · Result summaries and expandable card views. · `src/app/components/results-card/results-card.component.ts`
- [Details panel](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/components/details-panel/details-panel.component.ts): visual component · Deep inspection of a selected building or area. · `src/app/components/details-panel/details-panel.component.ts`
- [Download modal](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/components/downloadable-content-modal/downloadable-content-modal.ts): dialog · Downloadable output and warning flow. · `src/app/components/downloadable-content-modal/downloadable-content-modal.ts`
- [Dashboard charts](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/containers/dashboard/charts/overall-epc-chart/overall-epc-chart.component.ts): chart suite · EPC, SAP, deprivation, and weather summary charts. · `src/app/containers/dashboard/charts/overall-epc-chart/overall-epc-chart.component.ts`

### Core logic

Domain models, services, guards, tokens, and map layer logic.

- [Domain models](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/core/models/building.model.ts): core models · Building, area, map, results, and runtime state types. · `src/app/core/models/building.model.ts`
- [State services](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/core/services/ui-state.service.ts): core services · Filter, UI state, settings, map, and utilities. · `src/app/core/services/ui-state.service.ts`
- [Data services](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/core/services/spatial-query.service.ts): api services · Search, spatial query, EPC, climate, demographics, and downloads. · `src/app/core/services/spatial-query.service.ts`
- [Layer factory](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/core/services/layers/layer-factory.service.ts): map layers · Builds thematic map layers for the active view. · `src/app/core/services/layers/layer-factory.service.ts`
- [Theme layers](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/app/core/services/layers/epc.layer.ts): map layers · EPC, deprivation, climate, and weather overlay implementations. · `src/app/core/services/layers/epc.layer.ts`

### Delivery

Runtime configuration, proxy, Kubernetes, and CI/CD assets.

- [Runtime config](https://github.com/national-digital-twin/iris-visualisation/blob/main/src/configurations/dev/config.json): config boundary · Environment config, tokens, and startup configuration values. · `src/configurations/dev/config.json`
- [Transparent proxy](https://github.com/national-digital-twin/iris-visualisation/tree/main/transparent-proxy/Dockerfile): deployable proxy · Separate HTTP boundary for protected backend access. · `transparent-proxy/Dockerfile`
- [Kubernetes](https://github.com/national-digital-twin/iris-visualisation/blob/main/k8s/visualiser/base/deployment.yaml): deployment manifests · Visualiser, proxy, bootstrap, and mesh resources. · `k8s/visualiser/base/deployment.yaml`
- [CI/CD](https://github.com/national-digital-twin/iris-visualisation/blob/main/.github/workflows/frontend-ci-pr.yml): github workflows · Build, test, release, and image publishing pipelines. · `.github/workflows/frontend-ci-pr.yml`

### Quality

End-to-end, performance, and browser testing workspace.

- [QA suite](https://github.com/national-digital-twin/iris-visualisation/blob/main/qa/src/test/features/searchView.feature): test workspace · Playwright, Cucumber, Lighthouse, and JMeter checks. · `qa/src/test/features/searchView.feature`

## Connections

- Shell → Main filters: hosts · Shell provides the main search and filter experience.
- Shell → Results panel: hosts · Shell composes the results experience.
- Shell → Info panel: hosts · Shell composes detail and info views.
- Shell → Map: renders · Shell includes the primary map surface.
- Shell → Minimap: renders · Shell includes the overview map.
- Main filters → Filter panel: uses · Main filters delegates control state to the filter panel.
- Filter panel → Data services: queries · Filter state drives backend search and spatial queries.
- Results panel → Result cards: shows · Results panel renders result cards and expansions.
- Result cards → Details panel: opens · A result can expand into richer detail inspection.
- Details panel → Download modal: offers · Detail views expose downloadable outputs and warnings.
- Info panel → Download modal: opens · Info content can surface downloads.
- Map → Layer factory: requests · Map asks for the appropriate thematic layer set.
- Minimap → Layer factory: shares · Minimap uses the same layer composition logic.
- Layer factory → Theme layers: creates · Factory instantiates specific overlay implementations.
- Theme layers → Data services: feeds · Layer data is sourced through backend-facing services.
- Dashboard → Dashboard charts: hosts · Dashboard page aggregates chart components.
- Dashboard charts → Data services: reads · Charts consume structured analytics data.
- Data services → State services: updates · Service results flow into application state and settings.
- State services → Domain models: stores · State services operate on shared domain types.
- Runtime config → Data services: configures · Runtime values set endpoints and storage keys.
- Runtime config → Transparent proxy: targets · Client traffic is expected to pass through the proxy boundary.
- Transparent proxy → Kubernetes: deployed by · Proxy runtime is defined by Kubernetes manifests.
- Shell → QA suite: validated by · UI flows are covered by browser and performance tests.
- CI/CD → Kubernetes: deploys · Workflows publish images and apply deployment manifests.
- CI/CD → Transparent proxy: builds · Separate pipelines build the proxy artifact.
