UI for Remand and Sentencing
If this is a HMPPS project then the project will be created as part of bootstrapping -
see https://github.com/ministryofjustice/hmpps-project-bootstrap. You are able to specify a template application using the github_template_repo
attribute to clone without the need to manually do this yourself within GitHub.
This bootstrap is community managed by the mojdt #typescript
slack channel.
Please raise any questions or queries there. Contributions welcome!
Our security policy is located here.
More information about the template project including features can be found here.
When deploying to a new namespace, you may wish to use this template typescript project namespace as the basis for your new namespace:
These credentials are configured using the following env variables:
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.
-
Copy
.env.example
to a.env
file in the root directory (most of these values come fromvalues-dev.yaml
). Theclient_ids
andsecrets
are from the dev namespace. -
Start the app by running:
npm run start:dev
-
Access the application in your browser:
http://localhost:3000/person/XXX
(Replace
XXX
with a valid prisoner ID from the dev environment.)
npm run lint
runseslint
.npm run typecheck
runs the TypeScript compilertsc
.
npm run test
For local running, start a 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 auto-restart on changes)
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
A changelog for the service is available here