Code Monkey home page Code Monkey logo

hmrc-frontend-scaffold.g8's Introduction

hmrc-frontend-scaffold.g8

This repository is a Giter8 template to make building frontend services on the HMRC Multichannel Digital Tax Platform (MDTP) easier.

Detailed Documentation

Please see the wiki for detailed documentation (currently a work in progress). An example service built using these scaffolds will be available soon for reference.

Where to get help

If you're thinking of using this scaffold to create a new service, or have any questions about it, please get in touch - drop us a line in our Slack channel (requires an HMRC slack account).

What is it?

This repository is a template that generates a Scala Play! frontend service ready for use on the MDTP. It brings in all of the core libraries you need, and includes some useful components, patterns and scaffolds to make solving common problems easier.

In particular, it makes it extremely quick and easy to create one-question-per-page user journeys, caching the user's answers as they go.

What it isn't

It isn't a framework or a forms engine. It just gives you a plain old Scala microservice which you can develop, iterate and change as you like. While you'll get the most benefit by using the patterns and scaffolds as-is, you aren't tied in to them; you're free to use or ignore them as you choose.

It also doesn't try to solve every problem. It takes a lot of the grunt work out of creating screens, and makes it easy to wire them together into journeys; but you'll still need to do the wiring up, and of course handle any interactions with other microservices etc. that you need.

Usage

Before you start

Please drop by our Slack channel to say hi and see if we can offer you any support or guidance (requires an HMRC slack account).

You will need to have sbt version 0.13.13 or later installed.

Creating a new service

To create a new service:

  • Run sbt new hmrc/hmrc-frontend-scaffold.g8 and supply a name, e.g. example-frontend.
  • cd into the new directory, e.g. cd example-frontend
  • Initialise a git repo and make an initial commit, e.g. git init && git add . && git commit -m 'Initial commit'
  • Create a repository.yaml file and add the "repoVisibility: xxxxx" line to it (these can be copied from another HMRC repo - public one can be found in this repo), replace xxxxx with the actual string.

Adding new pages using scaffolds

In your service's root directory is a hidden directory .g8, which contains all of the scaffolds available for you to use. Each will add a new screen or suite of related screens into your service.

To use a scaffold, run sbt in interactive mode and issue the command g8Scaffold scaffoldName, e.g. g8Scaffold yesNoPage. The scaffold will ask you for some inputs, and create some new files (e.g. the yesNoPage scaffold will create a controller, view, and some specs).

Exit out of sbt and run the bash script migrate.sh in the root directory of your service. This will modify a couple of files in the service, including routes and messages.

Contributing

If you’ve spotted an issue or thought of a feature that you’d like to contribute to the scaffold, please take a few minutes to review our contribution process and guidelines before you submit your request.

License

This code is open source software licensed under the Apache 2.0 License.

hmrc-frontend-scaffold.g8's People

Contributors

thenickwilson avatar adamliptrot-oc avatar darbyo avatar chrisjameswright avatar wolfendale avatar lesjoneshmrc avatar hmrc-web-operations avatar callumcodes avatar kurtlogan avatar mjcallahanpage avatar muhammad-ali-ahmad avatar shnick avatar tomasz-rosiek avatar ian-hmrc avatar grab-a-byte avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.