{"id":20726912,"url":"https://github.com/hmcts/document-management-store-app","last_synced_at":"2025-04-06T13:11:11.934Z","repository":{"id":27550526,"uuid":"113465578","full_name":"hmcts/document-management-store-app","owner":"hmcts","description":"Spring Boot Application to store Documents ","archived":false,"fork":false,"pushed_at":"2024-10-29T09:24:26.000Z","size":67069,"stargazers_count":43,"open_issues_count":2,"forks_count":32,"subscribers_count":67,"default_branch":"master","last_synced_at":"2024-10-29T09:42:50.650Z","etag":null,"topics":["application","docker","document-management","java","jenkins-cft","jenkins-cft-d-i","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hmcts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audit.json","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-07T15:11:57.000Z","updated_at":"2024-10-29T08:21:52.000Z","dependencies_parsed_at":"2024-11-11T08:30:00.468Z","dependency_job_id":null,"html_url":"https://github.com/hmcts/document-management-store-app","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmcts%2Fdocument-management-store-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmcts%2Fdocument-management-store-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmcts%2Fdocument-management-store-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmcts%2Fdocument-management-store-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmcts","download_url":"https://codeload.github.com/hmcts/document-management-store-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485287,"owners_count":20946398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["application","docker","document-management","java","jenkins-cft","jenkins-cft-d-i","spring-boot"],"created_at":"2024-11-17T04:28:13.379Z","updated_at":"2025-04-06T13:11:11.916Z","avatar_url":"https://github.com/hmcts.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Document Management Store App\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://travis-ci.org/hmcts/document-management-store-app.svg?branch=master)](https://travis-ci.org/hmcts/document-management-store-app)\n[![codecov](https://codecov.io/gh/hmcts/document-management-store-app/branch/master/graph/badge.svg)](https://codecov.io/gh/hmcts/document-management-store-app)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/04bae03fe36b43759ea4f2df7c48fd43)](https://www.codacy.com/app/HMCTS/document-management-store-app)\n[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/04bae03fe36b43759ea4f2df7c48fd43)](https://www.codacy.com/app/HMCTS/document-management-store-app)\n[![Known Vulnerabilities](https://snyk.io/test/github/hmcts/document-management-store-app/badge.svg)](https://snyk.io/test/github/hmcts/document-management-store-app)\n\nDocument Management is a backend service to store and retrieve documents.\n\n### Tech\n\nIt uses:\n\n* Java\n* Spring boot\n* Junit, Mockito and SpringBootTest and Powermockito\n* Gradle\n* [lombok project](https://projectlombok.org/) - Lombok project\n\n### Plugins\n* [lombok plugin](https://plugins.jetbrains.com/idea/plugin/6317-lombok-plugin) - Lombok IDEA plugin\n\n#### Environment variables\nThe following environment variables are required:\n\n| Name | Default | Description |\n|------|---------|-------------|\n| IDAM_USER_BASE_URI | - | Base URL for IdAM's User API service (idam-app). `http://localhost:4501` for the dockerised local instance or tunneled `dev` instance. |\n| IDAM_S2S_BASE_URI | - | Base URL for IdAM's S2S API service (service-auth-provider). `http://localhost:4502` for the dockerised local instance or tunneled `dev` instance. |\n| MAX_FILE_SIZE | 100MB | Max file size |\n\n**Note:** The MAX_FILE_SIZE enforces limit on the document upload in the document management backend service.\nAdditionally, the max request content length (including file sizes) need to be configured for the IIS web server (on\nAzure) via *maxAllowedContentLength* property for request filter in **web.config** (config file within source\nrepository).\n\n## Setup\n```bash\n# Get the connection string for Azure Blob Store and put it in place of getOneFromPortalAzure in application.yaml\n# Do not commit it!!!\nazure:\n  storage:\n      connection-string: ${STORAGEACCOUNT_PRIMARY_CONNECTION_STRING:getOneFromPortalAzure}\n```\n\n```bash\n# Cloning repo and running though docker\ngit clone https://github.com/hmcts/document-management-store-app.git\ncd document-management-store-app/\n\naz login\naz acr login --name hmctspublic \u0026\u0026 az acr login --name hmctsprivate\n\ndocker-compose -f docker-compose-dev.yml pull\ndocker-compose -f docker-compose-dev.yml up -d\n\n#Run below script to create the Batch related tables for local set up ONLY\n./bin/create-batch-related-tables-postresql.sh\n\n# Run application\n./gradlew bootRun\n```\n### Integration\nThere is currently a Java Client available here:\nhttps://github.com/hmcts/document-management-client\n\n### Swagger UI\nTo view our REST API go to http://{HOST}/swagger-ui/index.html\nOn local machine with server up and running, link to swagger is as below\n\u003e http://localhost:4603/swagger-ui/index.html\n\u003e if running on AAT, replace localhost with ingressHost data inside values.yaml class in the necessary component, making sure port number is also removed.\n\n### API Endpoints\nA list of our endpoints can be found here\n\u003e https://hmcts.github.io/reform-api-docs/swagger.html?url=https://hmcts.github.io/reform-api-docs/specs/document-management-store-app.json\n\n### Functional Tests\nTo use the functional tests locally for large .mp4 and .doc files please first download them\nfrom here : [Large Files](https://portal.azure.com/#blade/Microsoft_Azure_Storage/ContainerMenuBlade/overview/storageAccountId/%2Fsubscriptions%2Fbf308a5c-0624-4334-8ff8-8dca9fd43783%2FresourceGroups%2Fdm-store-sandbox%2Fproviders%2FMicrosoft.Storage%2FstorageAccounts%2Fdmstorefiles/path/dm-store-files/etag/%220x8D83471B8B0648C%22/defaultEncryptionScope/%24account-encryption-key/denyEncryptionScopeOverride//defaultId//publicAccessVal/None)\nand place them under your resources folder document-management-store-app/src/functionalTest/resources\nThis would make them available to be used in the Functional Test -\n```bash\nMV1 (R1) As authenticated user I should not be able to upload files that exceed permitted sizes\n```\n- Ensure the @Pending annotation is removed before running the test locally.\n- Revert your changes after tests are run  as these are for running the above F-Test on local only.\n\n### Contract Tests (Pact)\nFor Executing the contract provider test  execute\n```./gradlew contractTest```\nFor Publishing the verification results to broker execute\n```./gradlew runProviderPactVerification```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmcts%2Fdocument-management-store-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmcts%2Fdocument-management-store-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmcts%2Fdocument-management-store-app/lists"}