Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Hackney - Report a Repair

How to start the application

$ rails server

How to run the test suite

$ rspec spec

System dependencies

PhantomJS is required on the host machine when running the test suite:

$ brew cask install phantomjs


The application is configured using environment variables. On production these should be set directly on the server. In development these can be managed by dotenv: create a .env.local file in the root of the application containing environment variable assignments.

Required config

The following environment variables are required to run the site:

  • HACKNEY_API_URL - the root of the Hackney Repairs API which is used by the site. Development and staging use the same credentials and they can be sourced from the Hackney team or from the environment variables of the staging Heroku account
  • HACKNEY_API_TOKEN - the API token for the Hackney Repairs API. Development and staging use the same credentials and they can be sourced from the Hackney team or from the environment variables of the staging Heroku account
  • ENCRYPTION_SECRET - secret used to prevent parameter tampering. Generate one with e.g. rake secret

Optional config

The app should run successfully without these environment variables:



  • ROLLBAR_ACCESS_TOKEN - The access token for the rollbar account used to monitor system errors
  • ROLLBAR_ENV - Defines which environment rollbar errors are logged to. By default this is Rails.env and doesn't need to be set in development but on the staging server this should be set to 'staging'.


  • HTTP_AUTH_USER / HTTP_AUTH_PASSWORD - Set these to protect the site with HTTP Basic Authentication
  • FLIPPER_AUTH_USER / FLIPPER_AUTH_PASSWORD - As above, but for feature flag UI


  • RACK_SERVICE_TIMEOUT - Set this to control the point at which Rack::Timeout times-out an HTTP request. This is used to ensure that the app times out before Heroku automatically kills the connection and displays its own, less friendly, error message. Defaults to 15 seconds.
  • APPOINTMENT_LIMIT - Set this to override the maximum number of appointments returned from the AppointmentFetcher service. Defaults to 15.
  • ONE_ACCOUNT_URL - Set this to override the URL that redirects users to One Account in the event that Report a Repair is disabled (see feature flagging below).

Feature flagging

The following feature flags can be used. The first time these are used, they should be created via the Flipper UI:

  • service_disabled - Enabling this flag disables the service completely. All pages will return a message prompting users to call the Repairs Contact Centre. This is to be used when Hackney back-end systems are unavailable.

Deployment instructions

This application is hosted on Heroku and configured with webhooks so that when GitHub receives a push to origin/develop it will automatically attempt a staging deployment, and when it receives a push to origin/master it will automatically attempt a production deployment.


  • Ruby version

  • Database creation

  • Database initialization

  • Services (job queues, cache servers, search engines, etc.)


An online repairs reporting system for Hackney social housing residents




No releases published


No packages published