Rails application that publishes and renders most pages on www.gov.uk/government
Ruby HTML JavaScript CSS Gherkin Shell
Latest commit 33fe4e4 Mar 28, 2017 @bevanloon bevanloon committed on GitHub Merge pull request #3145 from alphagov/republish-land-registry-corp-info
Republish Land Registry Corporate Information Page
Failed to load latest commit information.
app Merge pull request #3138 from alphagov/make-tagging-mandatory Mar 28, 2017
bench Further presenter refactor and renaming Jul 12, 2016
bin Remove spring. Jul 10, 2015
carrierwave-tmp Add explicit carrierwave-tmp dir Aug 23, 2013
config Use `Services` module for publishing-api Mar 23, 2017
db Republish Land Registry Corporate Information Page Mar 28, 2017
docs Add sync check docs Dec 13, 2016
features Remove `NewsArticle` from path helper Mar 23, 2017
lib Paginate the people finder Mar 27, 2017
log Quite literally the initial commit. Sep 19, 2011
public Amended comment from 404 to 403 Mar 16, 2015
script Add range argument for Edition sync checks Feb 17, 2017
test Merge pull request #3138 from alphagov/make-tagging-mandatory Mar 28, 2017
vendor/assets/stylesheets Revert "Revert "Merge pull request #571 from alphagov/rails-upgrade"" Jun 20, 2013
.env Remove taxonomy feature flag Mar 28, 2017
.env.test Remove taxonomy feature flag Mar 28, 2017
.gitignore Add .DS_Store to gitignore Aug 15, 2016
.ruby-version Upgrade Ruby to 2.2.3 Jan 7, 2016
.yardopts Cope with search bots adding [] to param keys Jul 3, 2013
CONTRIBUTING.md Replace Travis guidance with Jenkins Oct 2, 2015
Gemfile Update gds-api-adapters gem to get the latest special route publishing Mar 28, 2017
Gemfile.lock Update gds-api-adapters gem to get the latest special route publishing Mar 28, 2017
Jenkinsfile Lock all build steps which modify the database Mar 22, 2017
LICENCE Fix the copyright notice Feb 18, 2015
Procfile Add Foreman worker to run Sidekiq Sep 27, 2013
README.md Add sync check docs Dec 13, 2016
Rakefile Bring back basic logging for tests Oct 17, 2014
config.ru Add Raindrops to Rack configuration Oct 22, 2013
convert-tables.sh Remove detailed guide categories from database Aug 7, 2015
startup.sh Remove thin dependency Oct 7, 2016


Code Climate

Whitehall App

"Whitehall" is the code name for the Inside Government project, which aims to bring Government departments online in a consistent and user-friendly manner. Documentation can be found on rdoc.


  • Govspeak A variation of Markdown used throughout 'Whitehall' as the general publishing format

Technical Documentation

Whitehall is a Rails 4 app built on a MySQL database. It is deployed in two modes, 'admin' for publishers to create and manage content and 'frontend' for rendering content under https://www.gov.uk/government. In addition to storing and managing its own content database Whitehall also updates various other APIs including search and is currently being migrated towards a new publishing model utilising Publishing API and Content Store.


  • Xcode (for the Command Line Tools xcode-select --install)
  • Ruby 2.2.3
  • Rubygems and Bundler
  • Mysql
  • Imagemagick and Ghostscript (for generating thumbnails of uploaded PDFs)
  • xpdf (first download XQuartz)
  • PhantomJS (for running the Javascript tests)

Running the application

The application can be started with

bundle exec rails s

Note that the application itself will respond to requests on the root URL / with a routing error. To check that it works, try visiting /government/admin and /government/organisations.

Further setup instructions are available in the detailed setup guide

Running the test suite

See the testing guide


GOV.UK shares assets (eg stylesheets and JavaScript) across apps using the slimmer gem and the static app.

See the local asset setup guide


The Whitehall app relies on Rummager for document indexing, and the GOV.UK frontend application to serve results.

See the search setup guide

## How to publish a finder in whitehall?

  • You will need to create a JSON file in the whitehall repository, under whitehall/lib/finders
  • You can base it on one of the existing files in that folder
  • Double-check the filter format and document noun - the filter format is used for rummager to return the data, while the document noun is displayed to the user
  • The default_documents_per_page key can be used to paginate very long finders (see whitehall/lib/finders/case_studies.json for an example)
  • Running the finders:publish rake task will publish your new finder to the publishing-api, the the route defined in the JSON will be taken over by finder-frontend

Other guides



Creating new users

Contributing guide

Migration sync checks

Generating the documentation

We use YARD for the documentation. You can generate a local copy with:

yard server --reload

You can also read the docs on rdoc.info.


MIT License