API to support the front end service allowing court and probation users to book and manage video link hearings/appointments with people in prison.
Tools required:
- JDK v21+
- Kotlin (Intellij)
- docker
- docker-compose
Useful tools but not essential:
- KUBECTL not essential for building the project but will be needed for other tasks. Can be installed with
brew
. - k9s a terminal based UI to interact with your Kubernetes clusters. Can be installed with
brew
. - jq a lightweight and flexible command-line JSON processor. Can be installed with
brew
.
docker-compose up --remove-orphans
./gradlew
./gradlew clean build
There are two key environment variables needed to run the service. The system client id and secret used to retrieve the OAuth 2.0 access token needed for service to service API calls can be set as local environment variables. This allows API calls made from this service that do not use the caller's token to successfully authenticate.
Add the following to a local .env
file in the root folder of this project (you can extract the credentials from the dev k8s project namespace).
N.B. you must escape any '$' characters with '\$'
SYSTEM_CLIENT_ID=<system.client.id>
SYSTEM_CLIENT_SECRET=<system.client.secret>
There is a script to help, which sets local profiles, port and DB connection properties to the values required.
./run-local.sh
To test Gov Notify emails locally, you just need to add one more variable to your .env
file.
export NOTIFY_API_KEY=<gov.notify.api.key>
If you have added it correctly, you will see the log on startup with the following output:
Gov Notify emails are enabled