helengds / smart-answers

Serves smart answers on GOV.UK

Home Page:https://docs.publishing.service.gov.uk/apps/smart-answers.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Smart Answers

Smart answers are a great tool for content designers to present complex information in a quick and simple way. Defining what they are – decision trees? calculators? tools? is immaterial – what they do is provide a reusable technical framework to build a quick and simple answer to a complex question.

Read more in Lisa Scott's GDS blog post.

Deploy

Screenshots

Student Finance Forms screenshot

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 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 application that contains:

  • A Rails application to serve Smart Answers
  • A DSL for creating Smart Answers
  • The Smart Answers that appear on GOV.UK

NOTE. This application doesn't use a database and as such it does not include the ActiveRecord Railtie in application.rb.

Dependencies

  • alphagov/static: provides static assets (JS/CSS) and the GOV.UK templates.
  • nodejs/node: provides JS runtime for precompiling assets for deployment

Running the application

See:

Running the test suite

$ bundle exec rake

Smart Answers

### Smart Answer flow development

Smart Answers app development

Debugging

Registering on GOV.UK

  • bundle exec rake publishing_api:publish will send smart answers to the publishing-api.

Search indexing

  • bundle exec rake rummager:index will send the data to Rummager for indexing in search.

Licence

MIT License

About

Serves smart answers on GOV.UK

https://docs.publishing.service.gov.uk/apps/smart-answers.html

License:MIT License


Languages

Language:Ruby 58.0%Language:HTML 41.5%Language:CSS 0.2%Language:JavaScript 0.1%Language:Shell 0.1%