# hmrc/mobile-help-to-save-frontend architecture

> Architecture diagram of the GitHub repository hmrc/mobile-help-to-save-frontend, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hmrc/mobile-help-to-save-frontend
- Repository: https://github.com/hmrc/mobile-help-to-save-frontend

## Overview

This is a small Play frontend whose runtime purpose is to redirect mobile Help to Save requests to configured destination URLs. The controller exposes access-account, pay-in, and information redirects; Guice binds the three URL settings that the controller receives. The README describes an affinityGroup workaround, but the sampled controller only redirects and does not show session mutation or authentication. Routes and application configuration were not sampled, so wiring from incoming requests and URL settings is not fully evidenced.

Main entry points: [`app/uk/gov/hmrc/mobilehelptosavefrontend/controllers/SsoWorkaroundController.scala`](https://github.com/hmrc/mobile-help-to-save-frontend/blob/main/app/uk/gov/hmrc/mobilehelptosavefrontend/controllers/SsoWorkaroundController.scala) (SSO redirects), [`app/uk/gov/hmrc/mobilehelptosavefrontend/config/GuiceModule.scala`](https://github.com/hmrc/mobile-help-to-save-frontend/blob/main/app/uk/gov/hmrc/mobilehelptosavefrontend/config/GuiceModule.scala) (URL bindings)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_mobile_user(("Mobile user"))
node_sso_controller["SSO redirects"]
node_url_bindings["URL bindings<br/>[GuiceModule.scala]"]
node_help_to_save["Help to Save destinations"]

node_mobile_user -.->|"requests endpoint"| node_sso_controller
node_url_bindings -.->|"injects URLs"| node_sso_controller
node_sso_controller -->|"redirects to"| node_help_to_save

click node_sso_controller "https://github.com/hmrc/mobile-help-to-save-frontend/blob/main/app/uk/gov/hmrc/mobilehelptosavefrontend/controllers/SsoWorkaroundController.scala"
click node_url_bindings "https://github.com/hmrc/mobile-help-to-save-frontend/blob/main/app/uk/gov/hmrc/mobilehelptosavefrontend/config/GuiceModule.scala"

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_mobile_user toneBlue
class node_sso_controller,node_url_bindings toneTeal
class node_help_to_save toneIndigo
```

## Components

### Other components

- **Mobile user**
- [SSO redirects](https://github.com/hmrc/mobile-help-to-save-frontend/blob/main/app/uk/gov/hmrc/mobilehelptosavefrontend/controllers/SsoWorkaroundController.scala): `app/uk/gov/hmrc/mobilehelptosavefrontend/controllers/SsoWorkaroundController.scala`
- [URL bindings](https://github.com/hmrc/mobile-help-to-save-frontend/blob/main/app/uk/gov/hmrc/mobilehelptosavefrontend/config/GuiceModule.scala): `app/uk/gov/hmrc/mobilehelptosavefrontend/config/GuiceModule.scala`
- **Help to Save destinations**

## Connections

- Mobile user → SSO redirects: requests endpoint
- URL bindings → SSO redirects: injects URLs
- SSO redirects → Help to Save destinations: redirects to (evidence: `app/uk/gov/hmrc/mobilehelptosavefrontend/controllers/SsoWorkaroundController.scala`)
