Skip to content

alphagov/govwifi-user-signup-api

Repository files navigation

GovWifi User Signup API

This handles incoming sign-up texts and e-mails.

The private GovWifi build repository contains instructions on how to build GovWifi end-to-end - the sites, services and infrastructure.

Overview

Journeys

With each journey, we generate a unique username and password for GovWifi. These get stored and sent to the user.

  • SMS signup - Users text a phone number and get a set of credentials.
  • SMS help routes - Users can also ask for help from the same phone number and are sent some guides based on their selected operating system.
  • Email signup - Users with a government domain email send a blank email to [email protected].
  • Sponsor signup - Users with a government domain email address send through a list of email addresses and/or phone numbers to [email protected].

Sinatra routes

  • GET /healthcheck - AWS ELB target group health checking
  • POST /user-signup/email-notification - AWS SES incoming email notifications
  • POST /user-signup/sms-notification/notify - Notify incoming SMS notifications

Performance Platform

This application used to send statistics to the Performance Platform for volumetrics and completion rates via a Rake task. This is no longer the case because the Performance Platform has been archived and the relevant code in this application has been removed. The archived data is still available via the above link.

GDPR

Inactive User Deletion

Any user who has not logged into GovWifi for more than 12 months is considered inactive.

We have a Rake task that runs daily with ECS Scheduled tasks to ensure this happens.

bundle exec rake delete_inactive_users

Dependencies

  • GOV.UK Notify - used to send outgoing emails and SMS replies
  • MySQL database - used to store generated credentials

Developing

Running the tests

make test

Using the linter

make lint

Serving the app locally

make serve

Then access the site at http://localhost:8080/healthcheck

Deploying changes

You can find in depth instructions on using our deploy process here (you must be member of the GovWifi Team to access this document).

Licence

This codebase is released under the MIT License.