Skip to content

alphagov/smart-answers

Folders and files

NameName
Last commit message
Last commit date
Aug 14, 2024
Feb 7, 2025
Jan 6, 2025
Jan 7, 2025
Oct 27, 2011
Dec 5, 2024
Feb 13, 2025
Oct 27, 2011
May 28, 2020
Jul 4, 2024
Feb 13, 2025
May 27, 2014
Jan 31, 2024
Aug 14, 2024
Jan 16, 2024
May 17, 2024
Nov 9, 2021
May 2, 2024
Apr 25, 2024
Jan 7, 2025
Feb 21, 2025
Dec 2, 2022
Jan 16, 2024
Jul 4, 2024
May 5, 2022
Aug 7, 2023
Nov 2, 2018
Feb 10, 2025
Jan 16, 2024
Feb 10, 2025

Repository files navigation

Smart Answers

A tool for content designers to present complex information as a flow of questions, leading to an outcome. While the app is mostly self-contained, some Smart Answers use Whitehall to get data on countries and worldwide organisations.

Live examples

Nomenclature

  • Smart Answer: The flow, questions and outcomes.

  • Flow: Defines the questions, outcomes and the rules for navigating between them.

  • Landing page: Contains a description of the Smart Answer and the "Start now" button that leads to the first question.

  • Question page: Contains an individual question that's asked in order to help arrive at an outcome.

  • Outcome page: Contains the result of the Smart Answer based on responses to individual questions.

Technical documentation

This is a Ruby on Rails app, and should follow our Rails app conventions.

You can use the GOV.UK Docker environment or run ./startup.sh --live script to run the app. Read the guidance on local frontend development to find out more about each approach, before you get started.

If working on a smart answer that makes use of an API, locally run ./startup.sh --live script to run the app instead of docker.

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.

Running the test suite

bundle exec rake

Troubleshooting

  • When running integration tests, if you get SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version <some version number> error, then:
    • run brew install chromedriver or if you already have the cask, brew upgrade chromedriver
    • if that doesn't work, install the correct Chrome driver into usr/local/bin
  • When running bundle exec rake, if you get rake aborted! LoadError: linked to incompatible <some libruby or gem link>, run gem pristine --all

Smart Answer design

Smart Answer tasks

Further guidance is available in docs/tasks.

Further documentation

Licence

MIT License