Skip to content
forked from strogo/frontend

Serves mainstream formats, the homepage, and search on GOV.UK

License

Notifications You must be signed in to change notification settings

mybits/frontend

 
 

Repository files navigation

GOV.UK Frontend

Application to serve mainstream formats, the homepage, and search vertical for the GOV.UK single domain.

Live examples

Formats

Hard-coded routes

Nomenclature

  • Formats - our phrase for a type of content

Technical documentation

A Ruby on Rails application that renders the citizen-facing part of formats stored in the Content API. It looks up the passed in slug in the Content API.

It also serves the homepage (hard-coded route) and the search results vertical (hard-coded route).

See app/views/root for some bespoke transaction start pages.

Dependencies

Running the application

To run the application standalone, run static and execute the following command:

PLEK_SERVICE_STATIC_URI=http://127.0.0.1:3013 PLEK_SERVICE_CONTENTAPI_URI=https://www.gov.uk/api ./startup.sh

which uses the production content API and a local copy of static.

Note that you will have to have GOV.UK Mapit running locally.

To run in a full development stack (with DNS, all apps running etc.) just use ./startup.sh.

Note that the app uses a local version of GOV.UK Mapit, therefore a valid dataset will have to be loaded for Mapit, otherwise postcode lookups will not succeed. This is part of the standard GOV.UK data replication steps.

Running the test suite

bundle exec rake runs the test suite.

JavaScript unit testing

The tests in test/javascripts will be run as part of the test:javascript task.

To run them in a browser on your local machine (useful for breakpointing):

  1. run INCLUDE_JS_TEST_ASSETS=1 bundle exec script/rails server -p 3150 --environment=test on your vm
  2. open test/javascripts/support/LocalTestRunner.html (as a static file) in your browser.

This relies on you being able to access the above server on http://www.dev.gov.uk:3150.

Licence

MIT Licence

About

Serves mainstream formats, the homepage, and search on GOV.UK

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 62.2%
  • HTML 16.1%
  • JavaScript 13.6%
  • CSS 7.8%
  • Shell 0.3%