Giter Site home page Giter Site logo

alphagov / govuk-coronavirus-vulnerable-people-form Goto Github PK

View Code? Open in Web Editor NEW
33.0 44.0 10.0 2.24 MB

Helps the public get support during the COVID-19 pandemic

Home Page: https://coronavirus-vulnerable-people.service.gov.uk

License: MIT License

Ruby 76.91% JavaScript 2.74% HTML 18.65% Dockerfile 0.36% SCSS 1.34%
govuk

govuk-coronavirus-vulnerable-people-form's Introduction

Run tests

This codebase is archived. It has been superseded by alphagov/govuk-shielded-vulnerable-people-service.

CoronavirusForm

This is an application for submitting a form.

Getting started

The instructions will help you to get the application running locally on your machine.

Prequisites

You'll need an Amazon DynamoDB local instance running in a docker container.

You'll need a JavaScript runtime: https://github.com/rails/execjs
Clone the app and run bundle locally.

Running DynamoDB

Docker

Run the following to set up the local version of DynamoDB

    docker pull amazon/dynamodb-local
    docker run -d -p 8000:8000 amazon/dynamodb-local

Running the application (DynamoDB will need to be running)

foreman start

Running the tests

bundle exec rake

VCR

Some of our tests use VCR to generate stubbed responses. Read about how to test with VCR.

Running Sidekiq

We're using Sidekiq, a redis-backed queue, which plays nicely with ActiveJob and ActionMailer, to send emails.

In staging and production, we run instances of the application as workers, to process the email queue.

Locally

Sidekiq will start automatically when you run foreman start, but you can also run it alone with bundle exec sidekiq.

Sending emails or SMSs locally

Change the delivery method in development.rb:

config.action_mailer.delivery_method = :notify_email

You'll then need to pass a GOV.UK Notify API key as an environment variable NOTIFY_API_KEY as well the GOVUK_NOTIFY_EMAIL_TEMPLATE_ID and GOVUK_NOTIFY_SMS_TEMPLATE_ID template IDs.

You can create an api key here: https://www.notifications.service.gov.uk/services/6ba785b8-71e0-4d0e-9f41-b7aa8876e5a9/api/keys

Make sure to pick either "Team and whitelist" or "Testing". The api key can be revoked later.

If you're testing SMS as well, make sure you have a mobile number associated with your Notify profile.

Running the app

GOVUK_NOTIFY_EMAIL_TEMPLATE_ID=<email_template_id_from_notify> GOVUK_NOTIFY_SMS_TEMPLATE_ID=<sms_template_id_from_notify> NOTIFY_API_KEY=<your_api_key> foreman start

If your Notify service doesn't have a template you'll need to create a template in Notify.

The template should have a Message of ((body)) only.

Deployment pipeline

Every commit to master is deployed to GOV.UK PaaS by this concourse pipeline, which is configured in concourse/pipeline.yml.

The concourse pipeline has credentials for the govuk-forms-deployer user in GOV.UK PaaS. This user has the SpaceDeveloper role, so it can cf push the application.

How to deploy breaking changes

Details can be found here.

Licence

MIT License

govuk-coronavirus-vulnerable-people-form's People

Contributors

alex-ju avatar benthorner avatar bilbof avatar brucebolt avatar callumknights avatar chrisbashton avatar danwilliams avatar dependabot-preview[bot] avatar dependabot[bot] avatar gclssvglx avatar gdsnewt avatar huwd avatar injms avatar issyl0 avatar jonathanhallam avatar kevindew avatar leenagupte avatar m-green avatar murilodalri avatar nickcolley avatar olliejc avatar pixeltrix avatar reggieb avatar richardtowers avatar rosa-fox avatar stephengill avatar steveholmes avatar theseanything avatar thomasleese avatar timpaul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

govuk-coronavirus-vulnerable-people-form's Issues

Ensure hint text is black

Tim suggestion since users of this service may be more likely to have visual impairments and we know this can be a problem sometimes.

Contact page form errors, doesn't retain form values

  1. Add phone numbers to contact details page
  2. Put in wrong email address - eg 123

When the page shows the error message, the two phone numbers have been lost.

Expected - all of the values should be retained, even if wrong.

Assets requested from CSS do not have a long cache time

URL Cache TTL Size
/assets/light-94a07e06a1-v2-eedfb3c….woff2 None 50 KB
/assets/bold-b542beb274-v2-06eba01….woff2 None 31 KB
/assets/govuk-crest-2x-c654888….png None 9 KB
/assets/application-5dfb935….js 1 d 164 KB
/assets/application-7151bdd….css 1 d 26 KB
/assets/print-639d73a….css 1 d 3 KB

We should:

  • see if it's possible to cache all assets not just css
  • increase the cache time from 1d to something longer

This'll mean that there's no risk of users re-downloading the font between page transitions, which would make the page loads significantly slower.

Add service name to header

Just a thought, going on the design system and service manual, but is there any intention to add the service name to the header? If so, happy to open a pull request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.