Skip to content

ministryofjustice/hmpps-remand-and-sentencing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hmpps-remand-and-sentencing

repo standards badge CircleCI

UI for Remand and Sentencing

Instructions

Filling in the productId

To allow easy identification of an application, the product Id of the overall product should be set in values.yaml. The Service Catalogue contains a list of these IDs and is currently in development here https://developer-portal.hmpps.service.justice.gov.uk/products

DPS common front-end components

In order to ensure consistency across services, DPS services import shared front-end components using the frontend-components service.

The header and footer components have been incorporated into this application but can be switched off by setting the COMMON_COMPONENTS_ENABLED environment variable to 'false'

Fallback html must be included for all imported components for instances when the api call fails. These should be kept within the calling project, but should remain consistent with the designs detailed here.

Running the app

The easiest way to run the app is to use docker compose to create the service and all dependencies.

docker compose pull

docker compose up

Dependencies

The app requires:

  • hmpps-auth - for authentication
  • redis - session store and token caching

Running the app for development

To start the main services excluding the example typescript template app:

docker compose up --scale=app=0

Install dependencies using npm install, ensuring you are using node v18.x and npm v9.x

Note: Using nvm (or fnm), run nvm install --latest-npm within the repository folder to use the correct version of node, and the latest version of npm. This matches the engines config in package.json and the CircleCI build config.

And then, to build the assets and start the app with nodemon:

npm run start:dev

Run linter

npm run lint

Run tests

npm run test

Running integration tests

For local running, start a test db and wiremock instance by:

docker compose -f docker-compose-test.yml up -d

Then run the server in test mode by:

npm run start-feature (or npm run start-feature:dev to run with nodemon)

And then either, run tests in headless mode with:

npm run int-test

Or run tests with the cypress UI:

npm run int-test-ui

Dependency Checks

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