Coder Social home page Coder Social logo

sptribs-case-api's Introduction

Special Tribunals Case API License: MIT

This API handles callbacks from CCD for the Criminal Injuries Compensation (CIC) (and other services, in the future e.g. Mental Health) case type for Special Tribunals (ST).

Overview

                    ┌──────────────────┐
                    │                  │
                    │ SPTRIBS-CASE-API │
                    │                  │
                    └───────▲──────────┘
                            │
                            │
                    ┌───────▼────────┐
                    │                │
              ┌─────►      CCD       ◄─────┐
              │     │                │     │
              │     └────────────────┘     │
              │                            │
      ┌───────┴───────────┐        ┌───────┴───────┐
      │                   │        │               │
      │ SPTRIBS-FRONTEND  │        │       XUI     │
      │                   │        │               │
      └───────────────────┘        └───────────────┘

Building and deploying the application

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

Running the application locally

You will need access to the sptribs-aat vault, and an active VPN to run locally, as it depends on services running on AAT.

Run the application by executing the following command:

./gradlew bootRun

This will start the API container exposing the application's port (set to 4013 in this template app).

In order to test if the application is up, you can call its health endpoint:

curl http://localhost:4013/health

You should get a response similar to this:

{"status":"UP","diskSpace":{"status":"UP","total":249644974080,"free":137188298752,"threshold":10485760}}

Running the application locally with CCD and XUI

If you would like to run the full CCD and XUI stack locally you can use:

./gradlew bootWithCcd

Then you can access XUI on http://localhost:3000

Generate CCD JSON files

Generating the CCD JSON files will happen on every ./gradlew bootWithCcd but you can manually trigger this with:

./gradlew generateCCDConfig

Generate TypeScript definitions for CCD definition

./gradlew generateTypeScript

Crons

You can manually run a cron task from the cli:

TASK_NAME=[task] java -jar sptribs-case-api.jar run

# E.g.
TASK_NAME=SystemProgressHeldCasesTask java -jar sptribs-case-api.jar

# or
TASK_NAME=SystemProgressHeldCasesTask ./gradlew bootRun

To configure a new cron in AAT please check out the cnp-flux-config repository and run:

./bin/add-cron.sh SystemProgressHeldCasesTask ~/cnp-flux-config "0/10 * * * *"

Then create a PR in the cnp-flux-config repository.

Note that the cron will only run in the aat-00 cluster as we don't have a way to run the job once over multiple clusters. Let's hope that cluster doesn't go down.

License

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

sptribs-case-api's People

Contributors

atedy avatar chris-pateman avatar dependabot[bot] avatar elifdenizesea avatar geciciserkan avatar gmmagruder avatar hannah38 avatar harryh96 avatar jaberelfasi avatar jakecg avatar jefex7 avatar jessieharrigan avatar muradalamv1 avatar oleon23 avatar osheaf01 avatar paul-pearson avatar pavihmcts avatar pr00279 avatar rajaram-nagarajan avatar renovate[bot] avatar sabir-v1 avatar shailesh-walke avatar sharmad-v1 avatar sjamihmcts avatar spotstory avatar sunil-vooturi avatar tamir-b avatar timpickmanhmcts avatar tomxelliott avatar vijay-knr avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sptribs-case-api's Issues

Dependency Dashboard

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

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency au.com.dius.pact.consumer:junit5 to v4.6.14
  • Update dependency ch.qos.logback:logback-classic to v1.5.7
  • Update dependency ch.qos.logback:logback-core to v1.5.7
  • Update dependency com.github.hmcts:ccd-client to v4.9.5-SPRING2
  • Update dependency com.github.hmcts:fortify-client to v1.4.4
  • Update dependency com.github.hmcts:java-logging to v6.1.6
  • Update dependency org.apache.pdfbox:pdfbox to v3.0.3
  • Update dependency org.apache.tomcat.embed:tomcat-embed-core to v10.1.28
  • Update dependency org.apache.tomcat.embed:tomcat-embed-websocket to v10.1.28
  • Update dependency org.elasticsearch:elasticsearch to v7.17.23
  • Update spring security (org.springframework.security:spring-security-rsa, org.springframework.security:spring-security-web, org.springframework.security:spring-security-test, org.springframework.security:spring-security-taglibs, org.springframework.security:spring-security-saml2-service-provider, org.springframework.security:spring-security-rsocket, org.springframework.security:spring-security-oauth2-resource-server, org.springframework.security:spring-security-oauth2-jose, org.springframework.security:spring-security-oauth2-core, org.springframework.security:spring-security-oauth2-client, org.springframework.security:spring-security-messaging, org.springframework.security:spring-security-ldap, org.springframework.security:spring-security-data, org.springframework.security:spring-security-crypto, org.springframework.security:spring-security-config, org.springframework.security:spring-security-cas, org.springframework.security:spring-security-aspects, org.springframework.security:spring-security-acl, org.springframework.security:spring-security-core)
  • Update dependency com.fasterxml.jackson.core:jackson-databind to v2.17.2
  • Update dependency com.github.hmcts:service-auth-provider-java-client to v5.2.0
  • Update dependency node to v20.17.0
  • Update dependency org.assertj:assertj-core to v3.26.3
  • Update dependency org.assertj:assertj-guava to v3.26.3
  • Update dependency org.bouncycastle:bcpkix-jdk18on to v1.78.1
  • Update dependency org.springdoc:springdoc-openapi-starter-webmvc-ui to v2.6.0
  • Update junit5 monorepo (org.junit.platform:junit-platform-commons, org.junit.jupiter:junit-jupiter-api, org.junit.jupiter:junit-jupiter-engine, org.junit.platform:junit-platform-engine, org.junit.jupiter:junit-jupiter-params)
  • Update log4j2 monorepo to v2.23.1 (org.apache.logging.log4j:log4j-to-slf4j, org.apache.logging.log4j:log4j-api)
  • Update plugin au.com.dius.pact to v4.6.14
  • Update plugin com.github.ben-manes.versions to v0.51.0
  • Update plugin org.owasp.dependencycheck to v9.2.0
  • Update plugin org.springframework.boot to v3.3.3
  • Update versions.jackson to v2.17.2 (com.fasterxml.jackson.core:jackson-annotations, com.fasterxml.jackson.core:jackson-core)
  • Update dependency com.github.hmcts:ccd-client to v5
  • Update dependency net.logstash.logback:logstash-logback-encoder to v8
  • Update dependency org.json:json to v20240303
  • Update dependency pmd to v7
  • Update dependency uk.gov.service.notify:notifications-java-client to v5
  • Update plugin org.owasp.dependencycheck to v10
  • Update plugin org.sonarqube to v5
  • 🔐 Create all rate-limited PRs at once 🔐

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

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

docker-compose
docker-compose.yml
dockerfile
Dockerfile
  • hmctspublic.azurecr.io/base/java 21-distroless
github-actions
.github/workflows/ci.yml
  • actions/checkout v4
  • actions/setup-java v4
gradle
settings.gradle
build.gradle
  • cz.habarta.typescript-generator:typescript-generator-gradle-plugin 3.2.1263
  • org.owasp.dependencycheck 9.0.7
  • org.sonarqube 4.4.1.3373
  • io.spring.dependency-management 1.1.5
  • org.springframework.boot 3.2.5
  • com.github.ben-manes.versions 0.50.0
  • hmcts.ccd.sdk 5.5.10
  • au.com.dius.pact 4.3.10
  • com.github.hmcts.rse-cft-lib 0.19.1307
  • checkstyle 9.3
  • pmd 6.24.0
  • com.google.guava:guava 33.1.0-jre
  • org.springframework.security:spring-security-core 6.3.1
  • org.springframework.security:spring-security-acl 6.3.1
  • org.springframework.security:spring-security-aspects 6.3.1
  • org.springframework.security:spring-security-cas 6.3.1
  • org.springframework.security:spring-security-config 6.3.1
  • org.springframework.security:spring-security-crypto 6.3.1
  • org.springframework.security:spring-security-data 6.3.1
  • org.springframework.security:spring-security-ldap 6.3.1
  • org.springframework.security:spring-security-messaging 6.3.1
  • org.springframework.security:spring-security-oauth2-client 6.3.1
  • org.springframework.security:spring-security-oauth2-core 6.3.1
  • org.springframework.security:spring-security-oauth2-jose 6.3.1
  • org.springframework.security:spring-security-oauth2-resource-server 6.3.1
  • org.springframework.security:spring-security-openid 6.3.1
  • org.springframework.security:spring-security-remoting 6.3.1
  • org.springframework.security:spring-security-rsocket 6.3.1
  • org.springframework.security:spring-security-saml2-service-provider 6.3.1
  • org.springframework.security:spring-security-taglibs 6.3.1
  • org.springframework.security:spring-security-test 6.3.1
  • org.springframework.security:spring-security-web 6.3.1
  • org.springframework.security:spring-security-rsa 1.1.3
  • org.bouncycastle:bcpkix-jdk18on 1.77
  • org.camunda.connect:camunda-connect-connectors-all 1.6.0
  • commons-fileupload:commons-fileupload 1.5
  • org.junit.jupiter:junit-jupiter-api 5.10.3
  • org.junit.jupiter:junit-jupiter-engine 5.10.3
  • org.junit.jupiter:junit-jupiter-params 5.10.3
  • org.junit.platform:junit-platform-commons 1.10.3
  • org.junit.platform:junit-platform-engine 1.10.3
  • com.fasterxml.jackson.core:jackson-databind 2.16.0
  • com.fasterxml.jackson.core:jackson-core 2.16.0
  • com.fasterxml.jackson.core:jackson-annotations 2.16.0
  • com.github.hmcts:befta-fw 8.10.1
  • io.swagger:swagger-annotations 1.6.14
  • com.google.code.findbugs:jsr305 3.0.2
  • org.apache.groovy:groovy 4.0.22
  • ch.qos.logback:logback-classic 1.5.6
  • ch.qos.logback:logback-core 1.5.6
  • com.github.hmcts:ccd-client 4.9.2
  • com.github.hmcts:ccd-case-document-am-client 1.59
  • com.github.hmcts:idam-java-client 3.0.3
  • com.github.hmcts:java-logging 6.1.5
  • com.github.hmcts:service-auth-provider-java-client 5.1.3
  • net.logstash.logback:logstash-logback-encoder 7.4
  • org.apache.logging.log4j:log4j-api 2.22.0
  • org.apache.logging.log4j:log4j-to-slf4j 2.22.0
  • org.apache.tomcat.embed:tomcat-embed-core 10.1.26
  • org.apache.tomcat.embed:tomcat-embed-websocket 10.1.23
  • org.elasticsearch:elasticsearch 7.17.22
  • org.projectlombok:lombok 1.18.34
  • org.springdoc:springdoc-openapi-starter-webmvc-ui 2.3.0
  • org.springframework.retry:spring-retry 2.0.6
  • org.springframework.cloud:spring-cloud-starter-netflix-hystrix 2.2.10.RELEASE
  • org.springframework.cloud:spring-cloud-starter-bootstrap 4.1.2
  • org.springframework.cloud:spring-cloud-starter-openfeign 4.1.1
  • uk.gov.service.notify:notifications-java-client 4.1.1-RELEASE
  • com.launchdarkly:launchdarkly-java-server-sdk 7.1.1
  • org.apache.commons:commons-collections4 4.4
  • org.json:json 20231013
  • jakarta.enterprise:jakarta.enterprise.cdi-api 4.1.0
  • com.github.ben-manes.caffeine:caffeine 3.1.8
  • org.camunda.bpm:camunda-external-task-client 7.21.0
  • com.github.hmcts:fortify-client 1.4.3
  • com.jayway.awaitility:awaitility 1.7.0
  • com.github.stefanbirkner:system-lambda 1.2.1
  • org.assertj:assertj-core 3.24.2
  • org.assertj:assertj-guava 3.24.2
  • org.springframework.cloud:spring-cloud-starter-contract-stub-runner 4.1.2
  • org.mockito:mockito-inline 5.2.0
  • io.github.openfeign:feign-jackson 13.1
  • org.apache.pdfbox:pdfbox 3.0.2
  • com.microsoft.playwright:playwright 1.45.0
  • org.camunda.bpm.dmn:camunda-engine-dmn 7.21.0
  • org.camunda.bpm:camunda-engine-plugin-spin 7.21.0
  • org.camunda.bpm.assert:camunda-bpm-assert 15.0.0
  • org.camunda.bpm:camunda-engine 7.21.0
  • com.github.hmcts:document-management-client 7.0.1
  • com.github.hmcts:service-auth-provider-java-client 5.1.2
  • au.com.dius.pact.consumer:junit5 4.6.11
  • org.junit.jupiter:junit-jupiter-api 5.10.3
  • org.junit.jupiter:junit-jupiter-engine 5.10.3
  • org.junit.jupiter:junit-jupiter-api 5.10.3
  • org.junit.platform:junit-platform-commons 1.10.3
  • com.microsoft.playwright:playwright 1.45.0
  • org.junit-pioneer:junit-pioneer 2.2.0
  • io.github.artsok:rerunner-jupiter 2.1.6
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.5
helm-values
charts/sptribs-case-api/values.yaml
helmv3
charts/sptribs-case-api/Chart.yaml
  • java 5.2.1
  • ccd 9.2.0
  • xui-webapp ~1.0.0
  • xui-mo-webapp ~1.1.0
  • aac-manage-case-assignment ~0.2.0
  • idam-pr 2.3.0
  • ccd-case-document-am-api 1.7.14
  • em-ccdorc 2.0.25
  • em-stitching 1.0.55
  • wa ~1.0.5
  • ccd-message-publisher ~0.1.7
  • servicebus ~1.0.6
  • postgresql ~1.0.2
  • am-org-role-mapping-service ~0.0.66
npm
package.json
  • node >=12.0.0
nvm
.nvmrc
  • node 20.15.1
regex
Dockerfile
  • microsoft/ApplicationInsights-Java 3.5.4

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

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.