# nhsuk/nhsapp-frontend architecture

> Architecture diagram of the GitHub repository nhsuk/nhsapp-frontend, 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/nhsuk/nhsapp-frontend
- Repository: https://github.com/nhsuk/nhsapp-frontend

## Overview

NHS App Frontend is a CSS library layered on NHSUK Frontend, with reusable NHS App-specific styles and templates. Service teams use its components and design guidance to build NHS App experiences; the documentation also covers patterns and iOS design. The graph groups the library’s visible component families and documented guidance. Source excerpts were limited to package and build files, so internal runtime relationships are not asserted; README-documented relationships are cited where shown.

Main entry points: [`src/all.scss`](https://github.com/nhsuk/nhsapp-frontend/blob/main/src/all.scss) (NHS App styles), [`docs/components/index.md`](https://github.com/nhsuk/nhsapp-frontend/blob/main/docs/components/index.md) (Component guidance), [`docs/patterns/index.md`](https://github.com/nhsuk/nhsapp-frontend/blob/main/docs/patterns/index.md) (Service patterns), [`docs/ios/index.md`](https://github.com/nhsuk/nhsapp-frontend/blob/main/docs/ios/index.md) (iOS guidance)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_library["Frontend library"]
  node_nhsapp_frontend["NHS App styles<br/>[all.scss]"]
  node_nhsuk_frontend["NHSUK Frontend"]
  node_colours["Colour settings<br/>[_colours.scss]"]
  node_utilities["Style utilities<br/>[_display.scss]"]
  node_icons["Icons<br/>[macro.njk]"]
end

subgraph group_webcomponents["Web components"]
  node_badges["Badges<br/>[macro.njk]"]
  node_buttons["Buttons<br/>[_index.scss]"]
  node_cards["Cards<br/>[macro.njk]"]
  node_details["Details<br/>[_index.scss]"]
  node_summary_list["Summary list<br/>[_index.scss]"]
  node_tags["Tags<br/>[macro.njk]"]
  node_timeline["Timeline<br/>[macro.njk]"]
end

subgraph group_guidance["Design guidance"]
  node_component_docs["Component guidance<br/>[index.md]"]
  node_patterns["Service patterns<br/>[index.md]"]
  node_integration["Integration guidance<br/>[index.md]"]
end

subgraph group_ios["iOS guidance"]
  node_ios_docs["iOS guidance<br/>[index.md]"]
end

node_service_author(("Service team"))

node_service_author -->|"uses styles"| node_nhsapp_frontend
node_nhsapp_frontend -->|"builds on"| node_nhsuk_frontend
node_service_author -->|"consults guidance"| node_component_docs
node_service_author -->|"consults guidance"| node_patterns
node_service_author -.->|"consults guidance"| node_ios_docs

click node_nhsapp_frontend "https://github.com/nhsuk/nhsapp-frontend/blob/main/src/all.scss"
click node_colours "https://github.com/nhsuk/nhsapp-frontend/blob/main/src/settings/_colours.scss"
click node_utilities "https://github.com/nhsuk/nhsapp-frontend/blob/main/src/utilities/_display.scss"
click node_icons "https://github.com/nhsuk/nhsapp-frontend/blob/main/src/styles/icon/macro.njk"
click node_badges "https://github.com/nhsuk/nhsapp-frontend/blob/main/src/components/badge/large/macro.njk"
click node_buttons "https://github.com/nhsuk/nhsapp-frontend/blob/main/src/components/button/_index.scss"
click node_cards "https://github.com/nhsuk/nhsapp-frontend/blob/main/src/components/card/macro.njk"
click node_details "https://github.com/nhsuk/nhsapp-frontend/blob/main/src/components/details/_index.scss"
click node_summary_list "https://github.com/nhsuk/nhsapp-frontend/blob/main/src/components/summary-list/_index.scss"
click node_tags "https://github.com/nhsuk/nhsapp-frontend/blob/main/src/components/tag/macro.njk"
click node_timeline "https://github.com/nhsuk/nhsapp-frontend/blob/main/src/components/timeline/macro.njk"
click node_component_docs "https://github.com/nhsuk/nhsapp-frontend/blob/main/docs/components/index.md"
click node_patterns "https://github.com/nhsuk/nhsapp-frontend/blob/main/docs/patterns/index.md"
click node_integration "https://github.com/nhsuk/nhsapp-frontend/blob/main/docs/patterns/integrating-services/index.md"
click node_ios_docs "https://github.com/nhsuk/nhsapp-frontend/blob/main/docs/ios/index.md"

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_nhsapp_frontend,node_nhsuk_frontend,node_colours,node_utilities,node_icons toneBlue
class node_badges,node_buttons,node_cards,node_details,node_summary_list,node_tags,node_timeline toneAmber
class node_component_docs,node_patterns,node_integration toneMint
class node_ios_docs toneRose
class node_service_author toneIndigo
```

## Components

### Frontend library

- [NHS App styles](https://github.com/nhsuk/nhsapp-frontend/blob/main/src/all.scss): `src/all.scss`
- **NHSUK Frontend**
- [Colour settings](https://github.com/nhsuk/nhsapp-frontend/blob/main/src/settings/_colours.scss): `src/settings/_colours.scss`
- [Style utilities](https://github.com/nhsuk/nhsapp-frontend/blob/main/src/utilities/_display.scss): `src/utilities/_display.scss`
- [Icons](https://github.com/nhsuk/nhsapp-frontend/blob/main/src/styles/icon/macro.njk): `src/styles/icon/macro.njk`

### Web components

- [Badges](https://github.com/nhsuk/nhsapp-frontend/blob/main/src/components/badge/large/macro.njk): `src/components/badge/large/macro.njk`
- [Buttons](https://github.com/nhsuk/nhsapp-frontend/blob/main/src/components/button/_index.scss): `src/components/button/_index.scss`
- [Cards](https://github.com/nhsuk/nhsapp-frontend/blob/main/src/components/card/macro.njk): `src/components/card/macro.njk`
- [Details](https://github.com/nhsuk/nhsapp-frontend/blob/main/src/components/details/_index.scss): `src/components/details/_index.scss`
- [Summary list](https://github.com/nhsuk/nhsapp-frontend/blob/main/src/components/summary-list/_index.scss): `src/components/summary-list/_index.scss`
- [Tags](https://github.com/nhsuk/nhsapp-frontend/blob/main/src/components/tag/macro.njk): `src/components/tag/macro.njk`
- [Timeline](https://github.com/nhsuk/nhsapp-frontend/blob/main/src/components/timeline/macro.njk): `src/components/timeline/macro.njk`

### Design guidance

- [Component guidance](https://github.com/nhsuk/nhsapp-frontend/blob/main/docs/components/index.md): `docs/components/index.md`
- [Service patterns](https://github.com/nhsuk/nhsapp-frontend/blob/main/docs/patterns/index.md): `docs/patterns/index.md`
- [Integration guidance](https://github.com/nhsuk/nhsapp-frontend/blob/main/docs/patterns/integrating-services/index.md): `docs/patterns/integrating-services/index.md`

### iOS guidance

- [iOS guidance](https://github.com/nhsuk/nhsapp-frontend/blob/main/docs/ios/index.md): `docs/ios/index.md`

### Other components

- **Service team**

## Connections

- Service team → NHS App styles: uses styles (evidence: `README.md`)
- NHS App styles → NHSUK Frontend: builds on (evidence: `README.md`)
- Service team → Component guidance: consults guidance (evidence: `README.md`)
- Service team → Service patterns: consults guidance (evidence: `README.md`)
- Service team → iOS guidance: consults guidance
