Contract work

Primary Authority Register

Lead and now sole developer on the Primary Authority Register, the national service behind Primary Authority: more than 13,000 users, 1,900 partnerships and 124,000 businesses. I have taken it from Drupal 9 to 10 and on to Drupal 11, modernised its entity architecture and removed accessibility barriers from complex admin journeys.

Gov UK Logo

The brief

A national register businesses rely on

Primary Authority lets a business form a legally recognised partnership with a local authority, which then gives it assured advice on regulation. The register is the service behind it: businesses, local authorities and national regulators use it to set up partnerships, share inspection plans, handle enforcement and record advice.

It is a business-critical government service built on a large Drupal application with a deep custom data model. The department needed it kept current through successive Drupal major versions, stable under daily use and compliant with government accessibility standards, without disrupting the people who depend on it.

Primary Authority Register Drupal website build screenshot
registered users
13,000+
Primary Authority partnerships
1,900
businesses covered by those partnerships
124,000+
upgraded and live on Drupal 11
D11

My role

From a team of three to sole lead developer

I joined as one of a development team of three, first through Olive Jar and then Affinity Digital, working for the Department for Business and Trade (previously BEIS). Today I am the sole and primary developer on the register, responsible for its code, its upgrades and its releases.

What I did

My work

Drupal 9 to 10

Upgraded the platform to Drupal 10: deprecations removed from custom code, contrib moved to compatible releases, and a staged rollout.

Drupal 10 to 11

Most recently took the register to Drupal 11, now live, keeping it on a supported, secure version.

Entity architecture

Refactored the core custom entities and their relationships to simplify admin journeys and make the platform more stable to extend.

Accessible admin journeys

Accessibility testing and fixes in templates and forms to remove WCAG barriers from multi-step journeys.

Search and data tools

Better data input, search and management tools, with OpenSearch behind register search.

Reliable releases

Every change through configuration management and code review, never made directly on production.

Security, performance and standards

Getting the register assessment-ready

Early in the engagement, through Olive Jar, the register needed work beyond upgrades to meet government expectations for security, speed and service standards.

GDS assessment readiness

Implemented the features and practices the register needed to meet Government Digital Service standards and pass service assessment.

Two-factor authentication

Added 2FA through custom Drupal modules and third-party integrations, protecting accounts that manage legally recognised partnerships.

Redis and performance

Database optimisation, Redis caching and code profiling to make a heavily used service noticeably faster.

Approach

Upgrading a live national service

  1. Clean up

    Remove deprecated API use from custom modules and the theme.

  2. Align contrib

    Move every contrib module to a release that supports the target version.

  3. Upgrade core

    Upgrade Drupal core and run database updates and configuration changes.

  4. Regression test

    Test the key partnership, inspection and enforcement journeys before release.

Under the hood

Drupal technical detail

Every change goes through Drupal's configuration management: exported to code, reviewed, and imported on deployment. Nothing is changed directly on production, so every environment can be rebuilt and every change is traceable.

The register is modelled as custom content entities (partnerships, authorities, organisations, people, inspection plans and enforcement records) joined by entity references. Custom Views relationship plugins expose those links, so reports and admin listings are built in Views rather than hand-written queries.

Moving Drupal's cache bins out of the database into Redis stops cache reads competing with the register's own queries, so busy pages stay fast as the number of users and partnerships grows.

After their password, users confirm sign-in with a second factor. It is enforced through Drupal's authentication flow, so it covers every route into the service, not just the login form.

Mostly removed deprecated APIs and newer PHP and Symfony requirements. On a large custom codebase the work is in finding every deprecated call, checking each contrib module's support, and testing the journeys users rely on.

Running a complex government Drupal platform?

I lead upgrades, untangle custom entity models and make admin journeys accessible, inside your team or alongside your supplier.