Giter Club home page Giter Club logo

em-stitching-api's Introduction

EVIDENCE MANAGEMENT Stitching App

Build Status codecov License: MIT

Stitching API is a backend service to merge Word/PDF documents.

Setup.

To clone repo and prepare to pull containers:

git clone https://github.com/hmcts/em-stitching-api.git
cd em-stitching-api/

Clean and build the application:

./gradlew clean
./gradlew build

To run the application:

VPN connection is required

az login
./gradlew bootWithCCD

Document Tasks

This API makes use of Spring Batch scheduled tasks in order to process stitching jobs asynchronously. The versioned_document_task table acts as a queue for the processing nodes.

Distributed locks

In order to run in a highly available environment with redundant servers the task runner implements a distributed lock using shedlock to ensure tasks are only executed on a single server.

Task versioning

In order to support zero-downtime deployments document tasks are versioned. This enables two versions of the API (the old version and the new version) to run side-by-side and share the same database, while ensuring that any document tasks created by the new version are processed by the new version.

Tasks created by the old version of the code may be processed by the new version, when this occurs the version number of the task will be updated when it is saved to the database.

As the version of the code may be ahead of the version of the document task, any non-nullable columns added to the schema must have a default value.

The document task version number is derived from the build number inside the build-info.properties file. In a development environment this will default to version 1.

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-em-stitching-api.json

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

Tech

It uses:

  • Java11
  • Spring boot
  • Spring batch
  • Junit, Mockito and SpringBootTest and Powermockito
  • Gradle
  • lombok project - Lombok project
  • Postgres
  • Flyway

License

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

em-stitching-api's People

Contributors

benouaer avatar damongreen123 avatar danielwilsonkainos avatar dependabot-preview[bot] avatar dependabot[bot] avatar hmcts-jenkins-d-to-i[bot] avatar hmcts-jenkins-em[bot] avatar isha2040 avatar jefex7 avatar jeroenrijks avatar kasi-subramaniam avatar lara-mpt avatar larslnde avatar linusnorton avatar matt-k1998 avatar mdayican avatar meganaslattery avatar michaeljacob21012 avatar pawelkaczmarekuk avatar phaniperla avatar raihan-r avatar rajkatla-hmcts avatar renovate-bot avatar renovate[bot] avatar rishikrsharma avatar shehreem-solirius avatar tomxelliott avatar velimd avatar yashikno avatar yogesh-hullatti avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

em-stitching-api's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

dockerfile
Dockerfile
  • hmctspublic.azurecr.io/base/java 21-distroless
database/Dockerfile
  • postgres 16
gradle
gradle.properties
settings.gradle
build.gradle
  • org.flywaydb:flyway-database-postgresql 10.14.0
  • io.spring.dependency-management 1.1.5
  • org.springframework.boot 3.3.0
  • uk.gov.hmcts.java 0.12.63
  • com.github.ben-manes.versions 0.51.0
  • org.sonarqube 5.0.0.4638
  • org.owasp.dependencycheck 9.2.0
  • com.github.hmcts.rse-cft-lib 0.19.1250
  • org.flywaydb.flyway 10.14.0
  • net.serenity-bdd.serenity-gradle-plugin 3.0.0
  • org.springframework.cloud:spring-cloud-starter-bootstrap 4.1.3
  • com.google.guava:guava 33.2.1-jre
  • org.springframework.security:spring-security-oauth2-resource-server 6.3.0
  • org.springframework.security:spring-security-oauth2-client 6.3.0
  • org.springframework.security:spring-security-web 6.3.0
  • org.springframework.security:spring-security-oauth2-jose 6.3.0
  • org.springframework.security:spring-security-oauth2-core 6.3.0
  • org.springframework.security:spring-security-config 6.3.0
  • org.springframework.security:spring-security-core 6.3.0
  • com.squareup.okhttp3:okhttp 4.12.0
  • com.fasterxml.jackson.datatype:jackson-datatype-hibernate5-jakarta 2.17.1
  • org.yaml:snakeyaml 2.2
  • org.zalando:problem-spring-web 0.29.1
  • org.zalando:jackson-datatype-problem 0.27.1
  • org.springdoc:springdoc-openapi-starter-webmvc-ui 2.5.0
  • org.apache.httpcomponents:httpclient 4.5.14
  • org.flywaydb:flyway-core 10.14.0
  • org.flywaydb:flyway-database-postgresql 10.14.0
  • org.mapstruct:mapstruct-jdk8 1.5.5.Final
  • org.postgresql:postgresql 42.7.3
  • org.ehcache:ehcache 3.10.8
  • org.hibernate:hibernate-core 6.5.2.Final
  • org.hibernate:hibernate-jcache 6.5.2.Final
  • org.hibernate:hibernate-envers 6.5.2.Final
  • pl.touk:throwing-function 1.3
  • com.zaxxer:HikariCP 5.1.0
  • org.apache.commons:commons-lang3 3.14.0
  • commons-validator:commons-validator 1.9.0
  • org.apache.pdfbox:pdfbox 2.0.31
  • net.javacrumbs.shedlock:shedlock-spring 5.13.0
  • net.javacrumbs.shedlock:shedlock-provider-jdbc-template 5.13.0
  • org.apache.poi:poi-ooxml 5.2.4
  • com.github.hmcts:service-auth-provider-java-client 5.1.2
  • com.github.hmcts:idam-java-client 3.0.3
  • com.github.hmcts:ccd-case-document-am-client 1.7.3
  • com.github.hmcts:auth-checker-lib 3.0.2
  • com.github.hmcts.java-logging:logging 6.1.4
  • com.vladmihalcea:hibernate-types-60 2.21.1
  • org.springframework.cloud:spring-cloud-starter-openfeign 4.1.2
  • io.github.openfeign:feign-httpclient 13.2.1
  • org.apache.httpcomponents:httpclient 4.5.14
  • org.projectlombok:lombok 1.18.32
  • org.mapstruct:mapstruct 1.5.5.Final
  • org.mapstruct:mapstruct-processor 1.5.5.Final
  • org.hibernate:hibernate-jpamodelgen 6.5.2.Final
  • com.github.gmazzo:okhttp-mock 2.0.0
  • org.hamcrest:hamcrest-all 1.3
  • org.junit.vintage:junit-vintage-engine 5.10.2
  • org.junit.jupiter:junit-jupiter-api 5.10.2
  • org.junit.jupiter:junit-jupiter-engine 5.10.2
  • org.testcontainers:postgresql 1.19.8
  • com.github.hmcts:fortify-client 1.4.2
  • jakarta.xml.bind:jakarta.xml.bind-api 4.0.2
  • org.glassfish.jaxb:jaxb-runtime 4.0.5
  • au.com.dius:pact-jvm-consumer-junit 4.0.10
  • au.com.dius:pact-jvm-consumer-junit5 4.0.10
  • au.com.dius:pact-jvm-consumer-java8 4.0.10
  • au.com.dius:pact-jvm-consumer 4.0.10
  • org.apache.httpcomponents:httpclient 4.5.14
  • com.github.hmcts:em-test-helper 2.0.8
  • xerces:xercesImpl 2.12.2
  • org.apache.httpcomponents:fluent-hc 4.5.14
  • com.fasterxml.jackson.core:jackson-databind 2.17.1
  • com.fasterxml.jackson.core:jackson-annotations 2.17.1
  • com.fasterxml.jackson.core:jackson-core 2.17.1
  • org.apache.commons:commons-compress 1.26.2
  • org.json:json 20240303
  • checkstyle 10.17.0
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.8
helm-requirements
charts/em-stitching/Chart.yaml
  • java 5.2.1
helm-values
charts/em-stitching/values.yaml
helmv3
charts/em-stitching/Chart.yaml
  • java 5.2.1
terraform
infrastructure/main.tf
infrastructure/state.tf
  • azuread 2.50.0
  • azurerm ~> 3.106.0
infrastructure/versions.tf
  • hashicorp/terraform >= 0.15
terraform-version
infrastructure/.terraform-version
  • hashicorp/terraform 1.8.4

  • Check this box to trigger a request for Renovate to run again on this repository

Use of mutation testing in em-stitching-api - Help needed

Hello there!

My name is Ana. I noted that you use the mutation testing tool Pit in the project.
I am a postdoctoral researcher at the University of Seville (Spain), and my colleagues and I are studying how mutation testing tools are used in practice. With this aim in mind, we have analysed over 3,500 public GitHub repositories using mutation testing tools, including yours! This work has recently been published in a journal paper available at https://link.springer.com/content/pdf/10.1007/s10664-022-10177-8.pdf.

To complete this study, we are asking for your help to understand better how mutation testing is used in practice, please! We would be extremely grateful if you could contribute to this study by answering a brief survey of 21 simple questions (no more than 6 minutes). This is the link to the questionnaire https://forms.gle/FvXNrimWAsJYC1zB9.

We apologize if you have already received message multiple times or if you have already had the opportunity to complete the survey. If you have already shared your feedback, we want to convey our appreciation, kindly disregard this message, and please accept our apologies for any inconvenience.

Drop me an e-mail if you have any questions or comments ([email protected]). Thank you very much in advance!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.