A user interface for the HMPPS Tier API. Try it out in the dev environment: https://tier-dev.hmpps.service.justice.gov.uk
You'll need to install:
*If you're already using nvm or fnm, run:
nvm install --latest-npm
at the project root to install the correct Node version automatically.
Install NPM package dependencies:
npm install
To run the service locally, with an in-memory session store and local user account, run:
npm run start:dev
Open http://localhost:3000 in your browser.
Alternatively, you can integrate your local UI with the dev/test services deployed on MOJ Cloud Platform. This removes the need for using Docker.
Create a .env
file at the root of the project:
NODE_ENV=development
ENVIRONMENT=dev
REDIS_ENABLED=false
HMPPS_AUTH_URL=https://sign-in-dev.hmpps.service.justice.gov.uk/auth
MANAGE_USERS_API_URL=https://manage-users-api-dev.hmpps.service.justice.gov.uk
DELIUS_INTEGRATION_URL=https://tier-to-delius-dev.hmpps.service.justice.gov.uk
ARNS_API_URL=https://assess-risks-and-needs-dev.hmpps.service.justice.gov.uk
TIER_API_URL=https://hmpps-tier-dev.hmpps.service.justice.gov.uk
Run the following to grab client credentials from the dev namespace:
kubectl -n hmpps-tier-dev get secret hmpps-tier-ui -o json \
| jq -r '.data | map_values(@base64d) | to_entries[] | "\(.key)=\(.value)"' \
| grep CLIENT >> .env
Then, start the UI service:
npm run start:dev
npm run lint
npm run lint:fix
npm run test
To run the Cypress integration tests locally:
# Start the UI in test mode
npm run start-feature:dev
# Run the tests in headless mode:
npm run int-test
# Or, run the tests with the Cypress UI:
npm run int-test-ui
The template project has implemented some scheduled checks to ensure that key dependencies are kept up to date.
If these are not desired in the cloned project, remove references to check_outdated
job from .circleci/config.yml