Official upstream source mirror. Do not make UH changes here.
  • Ruby 80.4%
  • HTML 18%
  • SCSS 0.7%
  • JavaScript 0.6%
  • Dockerfile 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-28 09:57:10 +01:00
.github build(deps): bump ruby/setup-ruby from 1.324.0 to 1.325.0 2026-09-24 14:04:47 +00:00
app Update frequency error message link 2026-09-15 11:10:51 +01:00
bin Generate binstubs after Ruby upgrade 2026-05-18 09:40:04 +01:00
config Update text on signups via /email-signups 2026-03-30 15:09:07 +01:00
docs Move lengthy nomenclature into separate doc 2021-03-10 09:51:20 +00:00
lib/tasks Remove publishing_api tasks - routes now published by special-route-publisher 2023-08-02 09:51:47 +01:00
public Remove unused new public files 2024-12-11 09:21:05 +00:00
spec Update error message tests 2026-09-15 11:09:23 +01:00
.dockerignore Remove obsolete Jenkinsfile. 2024-01-31 16:20:48 +00:00
.gitignore Configure builds 2023-12-19 11:28:11 +00:00
.govuk_dependabot_merger.yml Update govuk_dependabot_merger to v2 2024-04-24 09:44:10 +01:00
.rspec Set up Rspec 2015-04-23 12:54:09 +01:00
.rubocop.yml Add standard header to protect .rubocop.yml 2021-11-09 09:45:37 +00:00
.ruby-version Upgrade Ruby to 4.0.x 2026-05-18 09:40:04 +01:00
.yarnrc set enable-scripts false 2026-03-30 11:58:36 +01:00
app.json Fix Plek URL for Static in development 2022-09-06 15:36:14 +01:00
config.ru Run Rails app:update for 6.1 2021-06-28 15:09:24 +01:00
Dockerfile Remove redundant --platform flag in Dockerfile 2026-05-18 11:32:15 +01:00
Gemfile build(deps): bump rails from 8.1.3.1 to 8.1.4 2026-09-28 08:23:39 +00:00
Gemfile.lock Merge pull request #2412 from alphagov/dependabot/bundler/simplecov-1.3.1 2026-09-28 09:57:10 +01:00
LICENCE Add LICENCE 2017-12-08 16:21:26 +00:00
package.json Update lint:js script to use standard 2026-09-09 11:15:29 +01:00
Procfile Use foreman task to start app 2018-02-02 14:52:42 +00:00
Rakefile Move to Jasmine Browser Runner from Jasmine Gem 2022-05-30 11:02:35 +01:00
README.md Update link 2024-09-25 19:45:40 +01:00
yarn.lock Replace standardx with standard 2026-09-09 11:15:29 +01:00

Email alert frontend

A frontend for creating and managing email subscriptions.

Features

Signup

This app provides three routes for signing up to email:

  • A /email-signup?link=/:base_path route [example]. This route supports signup to several types of content. It was originally specific to the taxonomy (despite the generic name), and then got re-purposed for other document types.

  • A legacy /:base_path/email-signup route [example]. Each of these routes corresponds to a content item with an email_alert_signup schema. At the time of writing, /foreign-travel-advice/* still uses this route.

  • A /email/subscriptions/new route [example]. This route enables any other application to offer a fully customised email signup experience that is not reliant on the content store. It is used by apps like finder-frontend, where a new subscriber list is created from the combination of selected filters.

In order to verify the email for a new subscription, we send a verification email using Email Alert API. The email contains a link with a unique token for the subscription. Clicking on the link completes the signup process.

Manage

This allows the user to list, modify and delete their subscriptions [login]. It uses a similar, but separate email/token process to authenticate a user, establishing a session for them to make their changes.

Nomenclature

  • Tags and Links - strings that uniquely define a list to subscribe to

Technical documentation

This is a Ruby on Rails app, and should follow our Rails app conventions.

You can use the GOV.UK Docker environment to run the application and its tests with all the necessary dependencies. Follow the usage instructions to get started.

Use GOV.UK Docker to run any commands that follow.

Running the test suite

$ bundle exec rake

Publishing Routes

There are six routes provided by this app: /email-signup, /email-signup/confirm, /email/unsubscribe, /email/subscriptions, /email/authenticate and /email/manage. If you are deploying this app to a new environment, you will need to publish these routes using the special_route tasks in Publishing API

Testing account pages

Some pages are only accessible once a user has logged-in, using a link sent in an email. To test these pages locally, you will need to make a temporary change to the controller code to bypass authentication. If testing on a deployed branch, see the documentation on receiving emails from in Integration and Staging.

Licence

MIT License