How national-digital-twin/iris-visualisation works
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: shell.component.ts Shell · spatial-query.service.ts Data services · layer-factory.service.ts Layer factory · Dockerfile Transparent proxy
Components 22
UI shell
Angular route containers and reusable presentation components.
- Shell · Top-level app frame and layout host.
src/app/containers/shell/shell.component.ts - Main filters · Primary search and filter entry point.
src/app/containers/main-filters/main-filters.component.ts - Filter panel · Filter orchestration and filter UI state.
src/app/containers/filter-panel/filter-panel.component.ts - Results panel · Lists matched buildings and areas.
src/app/containers/results-panel/results-panel.component.ts - Info panel · Selected-place information and supporting content.
src/app/containers/info-panel/info-panel.component.ts - Map · Main spatial interaction surface.
src/app/components/map/map.component.ts - Minimap · Secondary overview map.
src/app/components/minimap/minimap.component.ts - Dashboard · Analytics page and chart host.
src/app/containers/dashboard/dashboard-page.component.ts - Result cards · Result summaries and expandable card views.
src/app/components/results-card/results-card.component.ts - Details panel · Deep inspection of a selected building or area.
src/app/components/details-panel/details-panel.component.ts - Download modal · Downloadable output and warning flow.
src/app/components/downloadable-content-modal/downloadable-content-modal.ts - Dashboard charts · 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 · Building, area, map, results, and runtime state types.
src/app/core/models/building.model.ts - State services · Filter, UI state, settings, map, and utilities.
src/app/core/services/ui-state.service.ts - Data services · Search, spatial query, EPC, climate, demographics, and downloads.
src/app/core/services/spatial-query.service.ts - Layer factory · Builds thematic map layers for the active view.
src/app/core/services/layers/layer-factory.service.ts - Theme 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 · Environment config, tokens, and startup configuration values.
src/configurations/dev/config.json - Transparent proxy · Separate HTTP boundary for protected backend access.
transparent-proxy/Dockerfile - Kubernetes · Visualiser, proxy, bootstrap, and mesh resources.
k8s/visualiser/base/deployment.yaml - CI/CD · Build, test, release, and image publishing pipelines.
.github/workflows/frontend-ci-pr.yml
Quality
End-to-end, performance, and browser testing workspace.
- QA suite · Playwright, Cucumber, Lighthouse, and JMeter checks.
qa/src/test/features/searchView.feature
Connections 25
- 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.