How hmrc/manage-pensions-frontend works
Manage Pensions Frontend is a Play/Scala service for pension scheme administrators (PSAs) and practitioners (PSPs). Users authenticate, choose a role or service, then manage schemes or complete invitation, removal and deauthorisation journeys; the frontend also redirects users to registration, scheme-editing and AFT services. Controllers and actions provide the request flow, while connectors call backend services and cache user answers. The graph combines sampled implementation references with README-documented capabilities and integrations; unsampled journey internals are represented only at their supported directory level.
Main entry points: DataRetrievalAction.scala Load answers · PsaSchemeDashboardService.scala Dashboard assembly · AuthAction.scala Authentication · ListOfSchemesConnector.scala Scheme lists
Components 30
Access and session
- Authentication
app/controllers/actions/AuthAction.scala - Load answers
app/controllers/actions/DataRetrievalAction.scala - Answer retrieval
app/controllers/Retrievals.scala - Session recovery
app/controllers/SessionExpiredController.scala - Data request
app/models/requests/DataRequest.scala - Require answers
app/controllers/actions/DataRequiredAction.scala - Scheme authorization
app/controllers/actions/PsaSchemeAuthAction.scala
Scheme management
- PSA dashboards
app/controllers/psa/PsaSchemeDashboardController.scala - PSP dashboards
app/controllers/psp/PspSchemeDashboardController.scala - Dashboard assembly
app/services/PsaSchemeDashboardService.scala - Scheme lists
app/connectors/scheme/ListOfSchemesConnector.scala - Scheme details
app/connectors/scheme/SchemeDetailsConnector.scala - Scheme list model
app/models/ListOfSchemes.scala - Scheme reference
app/models/SchemeReferenceNumber.scala
Pension journeys
- Service triage
app/controllers/triagev2 - Invitation journeys
app/controllers/invitations - PSA removal
app/controllers/psa/remove - PSP deauthorisation
app/controllers/psp/deauthorise - AFT journeys
app/connectors/PensionSchemeReturnConnector.scala - Email responses
app/controllers/EmailResponseController.scala
Integrations and state
- User answers
app/utils/UserAnswers.scala - Answers cache
app/connectors/UserAnswersCacheConnector.scala - Pensions Scheme
- Administrator details
app/connectors/admin/MinimalConnector.scala - Pension Administrator
- Registration and editing
- Audit events
app/audit/AuditService.scala - Service configuration
app/config/FrontendAppConfig.scala - Minimal user model
app/models/MinimalPSAPSP.scala
Other components
- PSA / PSP
Connections 33
- PSA / PSP → Authentication: authenticates
app/controllers/actions/AuthAction.scala - Authentication → Load answers: transforms request
app/controllers/actions/DataRetrievalAction.scala - Load answers → Answers cache: fetches answers
app/controllers/actions/DataRetrievalAction.scala - Load answers → User answers: wraps JSON
app/controllers/actions/DataRetrievalAction.scala - User answers → Answer retrieval: supplies answers
app/controllers/Retrievals.scala - Answer retrieval → Session recovery: redirects missing data
app/controllers/Retrievals.scala - Authentication → Answers cache: loads role choice
app/controllers/actions/AuthAction.scala - PSA / PSP → Service triage: selects service
app/controllers/triagev2/WhichServiceYouWantToViewController.scala - PSA / PSP → PSA dashboards: opens dashboard
- PSA / PSP → PSP dashboards: opens dashboard
- PSA dashboards → Dashboard assembly: builds view
app/controllers/psa/PsaSchemeDashboardController.scala - PSP dashboards → Dashboard assembly: uses dashboard data
app/controllers/psp/PspSchemeDashboardController.scala - Dashboard assembly → Scheme lists: loads schemes
app/services/PsaSchemeDashboardService.scala - Dashboard assembly → Scheme details: loads scheme details
app/services/PsaSchemeDashboardService.scala - Scheme lists → Pensions Scheme: requests scheme list
- Scheme details → Pensions Scheme: requests scheme details
- Scheme lists → Scheme list model: decodes response
app/connectors/scheme/ListOfSchemesConnector.scala - Scheme details → Scheme reference: uses scheme reference
app/services/PsaSchemeDashboardService.scala - Administrator details → Pension Administrator: requests minimal details
app/connectors/admin/MinimalConnector.scala - Administrator details → Minimal user model: decodes response
app/connectors/admin/MinimalConnector.scala - PSA / PSP → Invitation journeys: invites or accepts
- Invitation journeys → Pension Administrator: submits invitations
- PSA / PSP → PSA removal: removes administrator
- PSA removal → Pension Administrator: removes association
- PSA / PSP → PSP deauthorisation: deauthorises practitioner
- PSP deauthorisation → Audit events: sends audit event
app/controllers/psp/deauthorise/PsaDeauthPspDeclarationController.scala - Email responses → Audit events: sends email event
app/controllers/EmailResponseController.scala - PSA / PSP → AFT journeys: starts or amends return
- PSA / PSP → Registration and editing: starts registration or editing
- Service configuration → Registration and editing: configures destinations
app/config/FrontendAppConfig.scala - Load answers → Data request: creates request data
app/controllers/actions/DataRetrievalAction.scala - Require answers → Data request: requires data
app/controllers/actions/DataRequiredAction.scala - Scheme authorization → PSA / PSP: authorizes scheme access
app/controllers/actions/PsaSchemeAuthAction.scala