Soft Drinks Industry Levy Liability Tool Frontend

Build Status Download

About

The SDIL digital service is split into a number of different microservices all serving specific functions which are listed below:

Liability tool - Standalone frontend service that is used to check a company's liability in regards to the levy.

Frontend - The main frontend for the service which includes the pages for registration.

Backend - The service that the frontend uses to call HOD APIs to retrieve and send information relating to business information and subscribing to the levy.

Stubs - There is a stubs microservice that is used to mimic the DES APIs when running services locally or in the development and staging environments.

This repository is the Frontend of the Liability Tool.

For details about the sugar tax see this article BBC Article on Sugar Tax

Clone code

To clone the repository. Ensuring that you have set up SSH.

git clone git@github.com:hmrc/soft-drinks-industry-levy-liability-tool-frontend.git

If you need to setup SSH. Visit Here

Ensure that .sbt/.credentials is setup

Run the following command in Terminal nano /home/<USER>/.sbt/.credentials

See the output and ensure it is populated with the following details:

realm=Sonatype Nexus Repository Manager
host=NEXUS URL
user=USERNAME
password=PASSWORD

Start all services

You need to be on the VPN

Open a Terminal session. Ensuring you are in the folder for your the repository cd <REPOSITORY_PATH>

To start up all services run

sm --start SDIL_LIABILITY_ALL -f

This will start all the relevant services to allow you to view the tool

How to make changes and test

Create Branch

As you have the master branch of the code cloned. Checkout a new branch locally using the JIRA ticket id as the branch name.

git checkout -b <JIRA_ID>

You can now make any changes you need ready for testing in the next step. To commit run git commit -a this will open a text editor to enter the details for the commit message. Once filled, save and exit.

Run changes

To test the changes you need to stop the front end from the services started earlier. In the terminal

sm --stop SDIL_LIABILITY_FE -f

Once you have done this you can start your local version of the front end code using the following command.

sbt "run <PORT>"

Open your browser and navigate to the following url:

http://localhost:<PORT>/soft-drinks-industry-levy-liability-tool/liability

License

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