Skip to content

Provides a ’save and resume’ feature for reform applications

License

Notifications You must be signed in to change notification settings

hmcts/draft-store

Repository files navigation

Build Status Codacy Badge codecov

Draft store

The Draft store micro-service provides a ’save and resume’ feature for reform applications via an internal API. It stores a draft json document against the userId provided.

Low Level Design

Getting Started

Prerequisites

Building

To build the project execute the following command:

./gradlew build

Running

Before you run the application you have to define database connection.
You can do this be either setting environment variables or creating application-default.yaml file.
Run the application by executing:

./gradlew bootRun

Consuming this service locally

This image is available in the HMCTS azure container registry (currently private)
Image url is: hmcts.azurecr.io/hmcts/draft-store-service
See required config in: docker-compose.yml

Operational note

When operating this service with live data, no one should under any circumstances view the encrypted data. The reason for this is because it would be considered under Article 14 of GDPR that we had commenced processing data. Then we would have thirty days to notify any third party parties mentioned in the application that we had commenced processing their data. This must not happen as the citizen, who is creating the application, has not yet submitted their application.

API documentation

API documentation is provided with Swagger.
You can view the json spec here: http://localhost:8800/v2/api-docs
Swagger UI is available here: http://localhost:8800/swagger-ui.html
Updates to master documentation are reflected here: https://hmcts.github.io/reform-api-docs/swagger.html

Developing

Unit tests

To run all unit tests execute the following command:

./gradlew test

Integration tests

To run all integration tests execute the following command:

./gradlew integration

Code quality checks

We use checkstyle and PMD.
To run all checks execute the following command:

./lint.sh

License

This project is licensed under the MIT License - see the LICENSE file for details.