Education & Employment Domain Microservice - resource server for offender work readiness data
The service has no external service dependencies currently other than HMPPS Auth and Postgres. The service will in the fullness of time send SQS audit events but does not currentlty do so.
To run the service locally with Docker, it is assumed that the developer will wish to use HMPPS Auth dev instance, Postgres in docker, for which docker compose can be used:
- to run this application independently e.g. in IntelliJ:
docker-compose up --scale hmpps-education-employment-api=0
- else to run the application in docker also:
docker-compose up
to run service with gradle
- gradle bootRun with these environment variables:
- with IntelliJ IDEA:
spring.profiles.active=local
- with IntelliJ IDEA:
- run via command line:
SPRING_PROFILES_ACTIVE=local ./gradlew bootRun
gradle bootRun --args='--spring.profiles.active=local'
The API supports the hmpps-education-employment-ui, storing a collection of responses to questions provided by Prison Employment Leads (PEL), related to an offenders willingess and ability to seek and obtain employment on leaving prison.
Each offender dealt with by a PEL will have a work readiness profile created, the data in that profile stored by the API within Postgres/AWS RDS in a jsonb column.
Architecture and Technical Design docs can be found decision records start here
There is a JSON schema in src/main/resources which describes the structure of the profile JSON that the client is expected to store and will subsequently get back. The schema is not currently used by the MVP - instead the JSON is serialized/deserialized on its way in and out of the API using a series of data classes in package:
- uk.gov.justice.digital.hmpps.educationemployment.api.data.jsonprofile
These classes have been built to represent the schema structure. The only validation performed currently is that the multi choice field values must conform to the enums with the data classes.