Application: frontend
Serves most frontend pages for www.gov.uk
- GitHub
- frontend
- Ownership
- #govuk-patterns-and-pages-tech
- Category
- Frontend apps
Relevant manual pages
Example pages rendered by frontend
- Sign in to your Universal Credit account
- Check the MOT history of a vehicle
- HMRC online services: sign in or set up an account
- Universal Credit
- Tax your vehicle
- eVisas: access and use your online immigration status
- Check if a vehicle is taxed
- Get information about a company
- Book your driving test
- Check the MOT status of a vehicle
README
Frontend renders the citizen-facing part of content items, and some hard-coded routes.
The content items are obtained using govuk_content_item_loader from either Content Store or Publishing API (GraphQL). The code for some types of documents also obtains additional data directly from Content Store, after the original content item has been retrieved from the content item loader.
Formats
Nomenclature
- format: our phrase for a type of content
Technical documentation
Frontend is a Ruby on Rails application and should follow our Rails app conventions.
See the CONTRIBUTING guide for more information.
Dependencies
- alphagov/content-store - provides raw data for rendering formats
- alphagov/local-links-manager - provides council info lookups
- alphagov/locations-api - provides postcode lookups
- alphagov/places-manager - provides places lookups (e.g. for find-my-nearest)
- alphagov/publishing-api - this app sends data to the content-store
Running the application
You can use the GOV.UK Docker environment or the local startup.sh script to run the app. Read the guidance on local frontend development to find out more about each approach, before you get started.
If you are using GOV.UK Docker, remember to combine it with the commands that follow. See the GOV.UK Docker usage instructions for examples.
If you are using the startup.sh script, execute the following command:
./startup.sh --live
which uses content from production.
Note that you will have to have GOV.UK Locations API running locally. A valid dataset will have to be loaded for Locations API or postcode lookups will not succeed. This is part of the standard GOV.UK data replication steps.
Running the test suite
bundle exec rake