Skip to content

hmcts/em-native-pdf-annotator-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Evidence Management Native PDF Annotator App

License: MIT Build Status codecov

Native PDF Annotator is a backend service that manages native annotations on PDF documents. In addition, the Native PDF Annotator handles requests from the Media Viewer to markup sensitive content in a case document and subsequent requests to redact marked up content..

Tech

It uses:

  • Java17
  • Spring boot
  • Junit, Mockito and SpringBootTest
  • Gradle
  • lombok project - Lombok project

Plugins

Quickstart

To clone repo and prepare to pull containers:

git clone https://github.com/hmcts/em-native-pdf-annotator-app.git
cd em-native-pdf-annotator-app/

Clean and build the application:

Requires docker desktop running

./gradlew clean
./gradlew build

To run the application:

VPN connection is required

az login
./gradlew bootWithCCD

Swagger UI

To view our REST API go to http://{HOST}/swagger-ui/index.html On local machine with server up and running, link to swagger is as below

http://localhost:8080/swagger-ui/index.html if running on AAT, replace localhost with ingressHost data inside values.yaml class in the necessary component, making sure port number is also removed.

API Endpoints

A list of our endpoints can be found here

https://hmcts.github.io/reform-api-docs/swagger.html?url=https://hmcts.github.io/reform-api-docs/specs/rpa-native-pdf-annotator-app.json

Building the application

The project uses Gradle as a build tool. It already contains ./gradlew wrapper script, so there's no need to install gradle.

To build the project execute the following command:

./gradlew build

To run the project unit tests execute the following command:

./gradlew test

To run the project functional tests, first ensure you have run ./gradlew bootWithCCD as in the above setup instructions, then run

./gradlew functional 

License

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

Running contract or pact tests:

You can run contract or pact tests as follows:

./gradlew clean
./gradlew contract

You can then publish your pact tests locally by first running the pact docker-compose:

docker-compose -f docker-pactbroker-compose.yml up

and then using it to publish your tests:

./gradlew pactPublish