How hmrc/tai-frontend works
Project type and purpose
• This is a full-stack Play Framework (Scala) web application that serves as the “Tax Account for Individuals” frontend.
• It provides UI pages, form journeys and print assets for users to view/edit PAYE tax info, and it orchestrates calls to downstream microservices (the TAI backend, NPS, JRS, etc.).
File structure
• app/controllers: HTTP entry points (Play controllers), grouped by feature (income, pensions, benefits, auth, error pages).
• app/views: Twirl templates for rendering HTML.
• app/assets: JS, CSS/SCSS, images for the frontend.
• app/service: Business-logic services that call connectors and prepare view models.
• app/connectors: HTTP clients to downstream microservices (TaiConnector, TaxAccountConnector, CitizenDetailsConnector, etc.).
• app/repository: JourneyCacheRepository (caching wizard state), SessionConnector (session store).
• app/model & viewModels: Domain and presentation models.
• conf: Play routes, configuration.
• test & it: Unit and integration tests.
Key insights from README
• It’s a Scala 2.13 & Play 3.0 application that requires JRE 21.
• It’s purely frontend: no internal database; all persistent/stateful calls go through connectors to HMRC microservices.
• Authentication is handled via an Auth stub / Single Customer Account (SCA) service.