Python PHP HTML C CSS Perl Other
Failed to load latest commit information.
bin Use bundle to install/run compass instead of gem. Mar 13, 2015
classes Use config MapIt URL and follow redirects. Feb 17, 2017
commonlib @ de3f256 Replace legacy className() constructors with future-proof __construct() Aug 24, 2015
conf define a default mapit URL during tests Feb 21, 2017
db change collation of glossary title to utf8 to stop search errors Jan 30, 2017
flex Update build script with new URL for SDK Jan 13, 2014
foundation @ a2a3901 Switch to using Foundation v4.2.3 via a submodule Jun 30, 2014
googleappengine copy change/ change newsletter/mailing list/URL Dec 17, 2014
puphpet [Vagrant] Make sure engine/encoding match server. Dec 4, 2015
scripts Import social media details Feb 20, 2017
search Add date exemption for Jo Cox written answer. Jul 2, 2016
tests correct escaping in testGetConstituencies Feb 21, 2017
uml-tests Remove most of uml-tests directory. May 31, 2013
www remove responsiveness link from MP page sidebar Feb 21, 2017
.gitignore Automatically generate documentation using PHPDoc Oct 27, 2015
.gitmodules Switch to using Foundation v4.2.3 via a submodule Jun 30, 2014
.scrutinizer.yml Increase code coverage timeout. May 21, 2015
.travis.yml [Travis] Don't compile docs on pull requests. Mar 30, 2016 Add contributing document. Jul 13, 2015
Gemfile Use bundle to install/run compass instead of gem. Mar 13, 2015
Gemfile.lock Use bundle to install/run compass instead of gem. Mar 13, 2015 Move all absolute HTTP links to HTTPS. Sep 23, 2016 Fix incorrect name in Mar 3, 2014 Move all absolute HTTP links to HTTPS. Sep 23, 2016
Vagrantfile Improvements to the Vagrant box: Feb 13, 2015 Automatically generate documentation using PHPDoc Oct 27, 2015
composer.json Update PHPUnit dependency version to 4.8, update Dependencies. Aug 24, 2015
composer.lock Fix broken composer symfony/config hash. Mar 30, 2016
composer.phar Update Composer to latest version. Aug 24, 2015
phpdoc.dist.xml Automatically generate documentation using PHPDoc Oct 27, 2015
phpunit.xml Remove the suppression of errors causing PHPUnit hard failures. Oct 4, 2014

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 on GitHub. You can read more about this on TheyWorkForYou's parser info page

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 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 TheyWorkForYou email list at!forum/theyworkforyou

Developing with Vagrant

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

  • Stick an entry in your hosts file to point twfy.mysociety at (Apache doesn't like IP addresses).
  • 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 http://twfy.mysociety 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 after changes:

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


TheyWorkForYou includes a 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

mySociety Installability


Thanks to Browserstack who let us use their web-based cross-browser testing tools for this project.