Skip to content

West Midlands Placement Portal

A GOV.UK placement service, and an authentication pattern built once and reused across products.

The West Midlands Placement Portal is a GOV.UK-compliant service modernising placement workflows for local-authority teams. Its engineering through-line: authentication built once as a reusable pattern, adopted across products, and mentored into the team so the practice outlived the build.

KotlinJava 17AWS CognitoNext.jsSpring Boot

The problem: auth, once or forever

Authentication is the concern every product shares and no product wants to write twice. A placement portal needs it, but so does the next service, and the one after. Wiring Cognito and ADFS into this codebase alone solves today’s problem and leaves the same work waiting for tomorrow. The better target is a pattern: solve it here, in a shape the rest of the estate can reuse.

A pattern, not an integration

So the auth solution was architected as a reusable template, not a one-off integration. The AWS Cognito and ADFS components were designed to slot into an existing codebase, with the integration points, configuration and conventions generalised enough that a different product could adopt the same pattern without re-deriving it. Cost estimates, roadmaps and full documentation shipped alongside it, so adoption did not depend on the person who built it.

// Products depend on this seam, not on a specific identity provider.
interface IdentityProvider {
    fun authenticate(credentials: Credentials): Either<AuthError, Principal>
}

// The template ships both implementations…
class CognitoProvider(cfg: CognitoConfig) : IdentityProvider { /* … */ }
class AdfsProvider(cfg: AdfsConfig) : IdentityProvider { /* … */ }

// …so a new product adopts auth by configuration, not reimplementation.
@Bean
fun identityProvider(props: AuthProps): IdentityProvider = when (props.mode) {
    AuthMode.COGNITO -> CognitoProvider(props.cognito)
    AuthMode.ADFS    -> AdfsProvider(props.adfs)
}
One reusable authentication template adopted across multiple productsA reusable authentication template, combining AWS Cognito and ADFS with generalised configuration and documentation, sits above three products. Arrows show each product adopting the same template by configuration rather than reimplementing authentication.Reusable auth templateCognito + ADFS · config · docsadopt by configurationPlacement Portallater productlater product
The auth pattern was built once and adopted across products by configuration, not re-derived each time.

Seeding the practice

A pattern is only reusable if the team can reuse it. Mentoring the delivery team on the auth pattern and the test-first approach seeded practice that carried onto later products, so the template was adopted rather than merely published. Work like this does not show up as a feature; it shows up as the teams that came after not having to solve auth again.

The portal

The portal itself is a modern GOV.UK service: test-first Kotlin and Java 17 microservice APIs on Spring Boot, with Docker, Lambda and CI/CD into AWS, data layers spanning PostgreSQL, DynamoDB and MongoDB for the placement data, and a TypeScript, Next.js and React frontend. Built throughout to GDS service standards.

Deriving the product from thirteen organisations

  • Thirteen organisations in the room. Sessions with stakeholders from thirteen different councils and organisations, working out the functional and non-functional requirements together, then deriving the product from that with a business analyst.
  • Spikes before commitment. Spike tasks on existing and new endpoints and branches, testing and researching infrastructure and development options before the build committed to any of them.
  • Beyond the MVP. Shaping the product past the minimum through Scrum, Kanban and PI-planning, with progress presentations to executives and stakeholders.