Skip to content
This repository

Keeping tabs on the UK's parliaments and assemblies

Octocat-spinner-32 bin Remove composer self-update.
Octocat-spinner-32 classes Implement function on new Member class to get image URL.
Octocat-spinner-32 commonlib @ f38f0dc update commonlib to get phplib/email deprecation fix
Octocat-spinner-32 conf Merge branch 'dynamic-topic-representative'
Octocat-spinner-32 db Merge branch 'wheezy_changes'
Octocat-spinner-32 flex Update build script with new URL for SDK
Octocat-spinner-32 googleappengine Fix incorrect JSON content-type
Octocat-spinner-32 puphpet Move Vagrant to using Ubuntu Precise.
Octocat-spinner-32 scripts Fix relative path issue.
Octocat-spinner-32 search Fix date range search indexing.
Octocat-spinner-32 tests Merge branch '499-fix-confirmation-code-emails'
Octocat-spinner-32 uml-tests Remove most of uml-tests directory.
Octocat-spinner-32 www Fix copy on Topic pages.
Octocat-spinner-32 .coveralls.yml Update Coveralls config with src directory.
Octocat-spinner-32 .gitignore Correctly ignore testing output.
Octocat-spinner-32 .gitmodules Remove most of uml-tests directory.
Octocat-spinner-32 .scrutinizer.yml Enable more in-depth Scrutinizer analysis for code quality analysis.
Octocat-spinner-32 .travis.yml Remove Coveralls dependency in favour of Scrutinizer.
Octocat-spinner-32 Include Composer requirement in
Octocat-spinner-32 Fix incorrect name in
Octocat-spinner-32 Remove Coveralls dependency in favour of Scrutinizer.
Octocat-spinner-32 Vagrantfile Updates to Vagrant configuration to support PHPDoc
Octocat-spinner-32 composer.json Upgrade PHPUnit to 4.0, update Composer and site dependencies.
Octocat-spinner-32 composer.lock Upgrade PHPUnit to 4.0, update Composer and site dependencies.
Octocat-spinner-32 composer.phar Upgrade PHPUnit to 4.0, update Composer and site dependencies.
Octocat-spinner-32 phpdoc.dist.xml Add configuration for PHPDoc generation.
Octocat-spinner-32 phpunit.xml Improved Coveralls behaviour.

Hello everyone,

If you're looking to set up a new Parliamentary monitoring site then you should look at our Pombola probject at which takes the lessons we've learned from writing and running TheyWorkForYou and uses them to create a modern, flexible and more easily adaptable platform for creating your own Parliamentary monitoring site. We strongly encourage people to use this rather than trying to adapt TheyWorkForYou to their own requirements.

If you want to dig in to the source of TheyWorkForYou then carry right on below.

We're pleased to release the source code. This is the code for the website itself. It's mainly written in PHP, although there are also some Perl scripts for database loading and indexing. The backend parser code is separate and available from the UKParse Subversion repository on KnowledgeForge.

The source code in this distribution is released under a BSD style license. Roughly, this means you are free to copy, use, modify and redistribute the code or binaries made from the code. Commercial or non- commercial use is allowed. However, we disclaim warranty, and expect you not to use our name without our permission.

See the file LICENSE.txt for exact legal information.

What is anyway?

Everything MPs say in the UK's House of Commons is recorded in a document called Hansard. helps make sense of this vital democratic resource and, crucially, allows you to add your own annotations and links to the official transcripts of Parliament.

How on earth do I use this code?

See for installation questions.

If you have questions, the best place to ask is the mySociety developers-public email list at

Developing with Vagrant

You will need the latest versions of VirtualBox and Vagrant, then:

  • Stick an entry in your hosts file to point at
  • Run vagrant up.
  • Go make a cup of tea. It may take a while whilst Vagrant and Puppet do their thing.
  • Point your web browser at and marvel at modern technology.

Compiling Static Assets

If you're working on a page which uses the redesign, you will need to compile static assets:

  • vagrant ssh
  • sudo gem install zurb-foundation
  • sudo gem install compass
  • cd /data/twfy/www/docs/style
  • compass compile for a one-off compilation or compass watch to recompile on changes


TheyWorkForYou includes a (currently very limited) test suite, using PHPunit. To run tests, ensure that the environment variables TWFY_TEST_DB_HOST, TWFY_TEST_DB_NAME, TWFY_TEST_DB_USER and TWFY_TEST_DB_PASS are set and contain relevant information for your testing database. The database will be stripped down and rebuilt during testing, so make sure it's not an important copy.

You may find that in some versions of PHPUnit errors are thrown regarding code coverage reports. If this is the case, the version installed by Composer and located at /vendor/bin/phpunit should run correctly.

Build Status

Build Status

Code Coverage

Scrutinizer Quality Score

Something went wrong with that request. Please try again.