Repository: hmrc/customs-financials-session-cache
Pull request #26: [MMCA-5318] - Update Readme
Author: login: jamie2210
Created: 2025-05-21T09:21:08Z | Merged: 2025-05-22T11:25:56Z



Diff:
diff --git a/README.md b/README.md
index 9b0691b..d25c9d3 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,76 @@
 
 # customs-financials-session-cache
 
+[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Coverage](https://img.shields.io/badge/test_coverage-90-green.svg)](/target/scala-3.3.5/scoverage-report/index.html) [![Accessibility](https://img.shields.io/badge/WCAG2.2-AA-purple.svg)](https://www.gov.uk/service-manual/helping-people-to-use-your-service/understanding-wcag)
+
 This repository is responsible for storing the duty deferment account number and associated data via a UUID (LinkId) to prevent the passing over a URL parameter
 
-| Path                               | Description                                          |
-| ---------------------------------  | ---------------------------------------------------- |
-| GET /account-link/:id/:linkId | Retrieves the AccountLink based on the sessionId (id) and the LinkId (linkid)|
-| POST /update-links | Stores the generated AccountLinks into mongo |
-| DELETE /remove/:id  | Removes all associated links for a given EORI based on session id |
+## Running the service
+
+*From the root directory*
+
+`sbt run` - starts the service locally
+
+`sbt runAllChecks` - Will run all checks required for a successful build
+
+Default service port on local - 9840
+
+### Required dependencies
+
+There are a number of dependencies required to run the service.
+
+The easiest way to get started with these is via the service manager CLI - you can find the installation guide [here](https://docs.tax.service.gov.uk/mdtp-handbook/documentation/developer-set-up/set-up-service-manager.html)
+
+| Command                                       | Description                                                      |
+|-----------------------------------------------|------------------------------------------------------------------|
+| `sm2 --start CUSTOMS_FINANCIALS_ALL`          | Runs all dependencies                                            |
+| `sm2 -s`                                      | Shows running services                                           |
+| `sm2 --stop CUSTOMS_FINANCIALS_SESSION_CACHE` | Stop the micro service                                           |
+| `sbt run` or ` sbt "run 9840"`                | (from root dir) to compile the current service with your changes |
+
+### Runtime Dependencies
+(These are subject to change and may not include every dependency)
+
+* `AUTH`
+* `AUTH_LOGIN_STUB`
+* `AUTH_LOGIN_API`
+* `BAS_GATEWAY`
+* `CA_FRONTEND`
+* `SSO`
+* `USER_DETAILS`
+
+## Testing
 
+The minimum requirement for test coverage is 90%. Builds will fail when the project drops below this threshold.
+
+### Unit Tests
+
+| Command                                | Description                  |
+|----------------------------------------|------------------------------|
+| `sbt test`                             | Runs unit tests locally      |
+| `sbt "test/testOnly *TEST_FILE_NAME*"` | runs tests for a single file |
+
+### Coverage
+
+| Command                                  | Description                                                                                                 |
+|------------------------------------------|-------------------------------------------------------------------------------------------------------------|
+| `sbt clean coverage test coverageReport` | Generates a unit test coverage report that you can find here target/scala-3.3.5/scoverage-report/index.html |
+
+
+## Feature Switches
+Not applicable
+
+## Available Routes
+
+You can find a list of microservice specific routes here - `/conf/app.routes`
+
+| Path                                  | Description                                                                             |
+|---------------------------------------|-----------------------------------------------------------------------------------------|
+| GET /account-link/:id/:linkId         | Retrieves the AccountLink based on the sessionId (id) and the LinkId (linkId)           |
+| GET /account-links/:sessionId         | Retrieves the AccountLink based on the sessionId (sessionId)                            |
+| GET /account-links/session/:sessionId | Retrieves the AccountLink based on the session (session) and the session Id (sessionId) |
+| POST /update-links                    | Stores the generated AccountLinks into mongo                                            |
+| DELETE /remove/:id                    | Removes all associated links for a given EORI based on session id                       |
 
 ## GET /account-link/:id/:linkId
 
@@ -103,13 +165,20 @@ Removes all associated links for a given EORI based on session id
 | ---------------------------------  | ---------------------------------------------------- |
 | 204 | Delete successful        |
 
-
-
-### License
-This code is open source software licensed under the [Apache 2.0 License]("http://www.apache.org/licenses/LICENSE-2.0.html").
-
-## All tests and checks
-
-This is a sbt command alias specific to this project. It will run a scala style check, run unit tests, run integration
-tests and produce a coverage report:
-> `sbt runAllChecks`
+## Helpful commands
+
+| Command                                       | Description                                                                                                 |
+|-----------------------------------------------|-------------------------------------------------------------------------------------------------------------|
+| `sbt runAllChecks`                            | Runs all standard code checks                                                                               |
+| `sbt clean`                                   | Cleans code                                                                                                 |
+| `sbt compile`                                 | Better to say 'Compiles the code'                                                                           |
+| `sbt coverage`                                | Prints code coverage                                                                                        |
+| `sbt test`                                    | Runs unit tests                                                                                             |
+| `sbt it/test`                                 | Runs integration tests                                                                                      |
+| `sbt scalafmtCheckAll`                        | Runs code formatting checks based on .scalafmt.conf                                                         |
+| `sbt scalastyle`                              | Runs code style checks based on /scalastyle-config.xml                                                      |
+| `sbt Test/scalastyle`                         | Runs code style checks for unit test code /test-scalastyle-config.xml                                       |
+| `sbt coverageReport`                          | Produces a code coverage report                                                                             |
+| `sbt "test/testOnly *TEST_FILE_NAME*"`        | runs tests for a single file                                                                                |
+| `sbt clean coverage test coverageReport`      | Generates a unit test coverage report that you can find here target/scala-3.3.5/scoverage-report/index.html |
+| `sbt "run -Dfeatures.some-feature-name=true"` | enables a feature locally without risking exposure                                                          |
diff --git a/build.sbt b/build.sbt
index 7087aac..2fa5ac4 100644
--- a/build.sbt
+++ b/build.sbt
@@ -57,7 +57,6 @@ lazy val microservice = Project(appName, file("."))
   )
   .settings(PlayKeys.playDefaultPort := 9840)
   .settings(scalastyleSettings)
-  .settings(resolvers += Resolver.jcenterRepo)
 
 addCommandAlias(
   "runAllChecks",


Reviews:
user: login: tyagikumarvineet
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-22T08:26:44Z
user: login: magicaljellybeans
state: APPROVED
author_association: NONE
submitted_at: 2025-05-22T10:32:05Z
user: login: tyagikumarvineet
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-22T11:06:49Z

Review comments:
diff_hunk: @@ -1,14 +1,120 @@
 
 # customs-financials-session-cache
 
+[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Coverage](https://img.shields.io/badge/test_coverage-90-green.svg)](/target/scala-3.3.5/scoverage-report/index.html) [![Accessibility](https://img.shields.io/badge/WCAG2.2-AA-purple.svg)](https://www.gov.uk/service-manual/helping-people-to-use-your-service/understanding-wcag)
+
 This repository is responsible for storing the duty deferment account number and associated data via a UUID (LinkId) to prevent the passing over a URL parameter
 
-| Path                               | Description                                          |
-| ---------------------------------  | ---------------------------------------------------- |
-| GET /account-link/:id/:linkId | Retrieves the AccountLink based on the sessionId (id) and the LinkId (linkid)|
-| POST /update-links | Stores the generated AccountLinks into mongo |
-| DELETE /remove/:id  | Removes all associated links for a given EORI based on session id |
+## Running the service
+
+*From the root directory*
+
+`sbt run` - starts the service locally
+
+`sbt runAllChecks` - Will run all checks required for a successful build
+
+Default service port on local - 9840
+
+### Required dependencies
+
+There are a number of dependencies required to run the service.
+
+The easiest way to get started with these is via the service manager CLI - you can find the installation guide [here](https://docs.tax.service.gov.uk/mdtp-handbook/documentation/developer-set-up/set-up-service-manager.html)
+
+| Command                                       | Description                                                      |
+|-----------------------------------------------|------------------------------------------------------------------|
+| `sm2 --start CUSTOMS_FINANCIALS_ALL`          | Runs all dependencies                                            |
+| `sm2 -s`                                      | Shows running services                                           |
+| `sm2 --stop CUSTOMS_FINANCIALS_SESSION_CACHE` | Stop the micro service                                           |
+| `sbt run` or ` sbt "run 9840"`                | (from root dir) to compile the current service with your changes |
+
+### Runtime Dependencies
+(These are subject to change and may not include every dependency)
+
+* `AUTH`
+* `AUTH_LOGIN_STUB`
+* `AUTH_LOGIN_API`
+* `BAS_GATEWAY`
+* `CA_FRONTEND`
+* `SSO`
+* `USER_DETAILS`
+
+### Login enrolments
+
+The service can be accessed by using below enrolments and with below sample EORI numbers, via http://localhost:9949/auth-login-stub/gg-sign-in (on local) or https://<host:port>/auth-login-stub/gg-sign-in on DEV/QA/STAGING
+
+Redirect URL - `/customs/payment-records`
+
+| Enrolment Key	 | Identifier Name | Identifier Value |
+|----------------|-----------------|------------------|
+| `HMRC-CUS-ORG` | `EORINumber`    | `GB744638982000` |
+| `HMRC-CUS-ORG` | `EORINumber`    | `GB744638982001` |
+
+## Testing
 
+The minimum requirement for test coverage is 90%. Builds will fail when the project drops below this threshold.
+
+### Unit Tests
+
+| Command                                | Description                  |
+|----------------------------------------|------------------------------|
+| `sbt test`                             | Runs unit tests locally      |
+| `sbt "test/testOnly *TEST_FILE_NAME*"` | runs tests for a single file |
+
+### Coverage
+
+| Command                                  | Description                                                                                                 |
+|------------------------------------------|-------------------------------------------------------------------------------------------------------------|
+| `sbt clean coverage test coverageReport` | Generates a unit test coverage report that you can find here target/scala-3.3.5/scoverage-report/index.html |
+
+
+## Feature Switches
+
+> ### Caution!
+> There's a risk of WIP features being exposed in production!
+> **Don't** enable features in `application.conf`, as this will apply globally by default
+### Enable features
+| Command                                       | Description                                        |
+|-----------------------------------------------|----------------------------------------------------|
+| `sbt "run -Dfeatures.some-feature-name=true"` | enables a feature locally without risking exposure |
+
+### Available feature flags
+(There are currently no feature flags for this service)
+
+| Flag | Description |
+|------|-------------|
+
+Different features can be enabled / disabled per-environment via the `app-config-<env>` project by setting `features.some-feature: true`
+
+## Helpful commands
path: README.md
user: login: tyagikumarvineet
body: Better to move this at the end please
created_at: 2025-05-22T08:24:39Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,14 +1,120 @@
 
 # customs-financials-session-cache
 
+[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Coverage](https://img.shields.io/badge/test_coverage-90-green.svg)](/target/scala-3.3.5/scoverage-report/index.html) [![Accessibility](https://img.shields.io/badge/WCAG2.2-AA-purple.svg)](https://www.gov.uk/service-manual/helping-people-to-use-your-service/understanding-wcag)
+
 This repository is responsible for storing the duty deferment account number and associated data via a UUID (LinkId) to prevent the passing over a URL parameter
 
-| Path                               | Description                                          |
-| ---------------------------------  | ---------------------------------------------------- |
-| GET /account-link/:id/:linkId | Retrieves the AccountLink based on the sessionId (id) and the LinkId (linkid)|
-| POST /update-links | Stores the generated AccountLinks into mongo |
-| DELETE /remove/:id  | Removes all associated links for a given EORI based on session id |
+## Running the service
+
+*From the root directory*
+
+`sbt run` - starts the service locally
+
+`sbt runAllChecks` - Will run all checks required for a successful build
+
+Default service port on local - 9840
+
+### Required dependencies
+
+There are a number of dependencies required to run the service.
+
+The easiest way to get started with these is via the service manager CLI - you can find the installation guide [here](https://docs.tax.service.gov.uk/mdtp-handbook/documentation/developer-set-up/set-up-service-manager.html)
+
+| Command                                       | Description                                                      |
+|-----------------------------------------------|------------------------------------------------------------------|
+| `sm2 --start CUSTOMS_FINANCIALS_ALL`          | Runs all dependencies                                            |
+| `sm2 -s`                                      | Shows running services                                           |
+| `sm2 --stop CUSTOMS_FINANCIALS_SESSION_CACHE` | Stop the micro service                                           |
+| `sbt run` or ` sbt "run 9840"`                | (from root dir) to compile the current service with your changes |
+
+### Runtime Dependencies
+(These are subject to change and may not include every dependency)
+
+* `AUTH`
+* `AUTH_LOGIN_STUB`
+* `AUTH_LOGIN_API`
+* `BAS_GATEWAY`
+* `CA_FRONTEND`
+* `SSO`
+* `USER_DETAILS`
+
+### Login enrolments
+
+The service can be accessed by using below enrolments and with below sample EORI numbers, via http://localhost:9949/auth-login-stub/gg-sign-in (on local) or https://<host:port>/auth-login-stub/gg-sign-in on DEV/QA/STAGING
+
+Redirect URL - `/customs/payment-records`
+
+| Enrolment Key	 | Identifier Name | Identifier Value |
+|----------------|-----------------|------------------|
+| `HMRC-CUS-ORG` | `EORINumber`    | `GB744638982000` |
+| `HMRC-CUS-ORG` | `EORINumber`    | `GB744638982001` |
+
+## Testing
 
+The minimum requirement for test coverage is 90%. Builds will fail when the project drops below this threshold.
+
+### Unit Tests
+
+| Command                                | Description                  |
+|----------------------------------------|------------------------------|
+| `sbt test`                             | Runs unit tests locally      |
+| `sbt "test/testOnly *TEST_FILE_NAME*"` | runs tests for a single file |
+
+### Coverage
+
+| Command                                  | Description                                                                                                 |
+|------------------------------------------|-------------------------------------------------------------------------------------------------------------|
+| `sbt clean coverage test coverageReport` | Generates a unit test coverage report that you can find here target/scala-3.3.5/scoverage-report/index.html |
+
+
+## Feature Switches
path: README.md
user: login: tyagikumarvineet
body: I think better to add just 'Not applicable' under Feature Switches section (and remove other details) as its better to explicitly mention that there are no feature flags for this service
created_at: 2025-05-22T08:25:27Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,14 +1,120 @@
 
 # customs-financials-session-cache
 
+[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Coverage](https://img.shields.io/badge/test_coverage-90-green.svg)](/target/scala-3.3.5/scoverage-report/index.html) [![Accessibility](https://img.shields.io/badge/WCAG2.2-AA-purple.svg)](https://www.gov.uk/service-manual/helping-people-to-use-your-service/understanding-wcag)
+
 This repository is responsible for storing the duty deferment account number and associated data via a UUID (LinkId) to prevent the passing over a URL parameter
 
-| Path                               | Description                                          |
-| ---------------------------------  | ---------------------------------------------------- |
-| GET /account-link/:id/:linkId | Retrieves the AccountLink based on the sessionId (id) and the LinkId (linkid)|
-| POST /update-links | Stores the generated AccountLinks into mongo |
-| DELETE /remove/:id  | Removes all associated links for a given EORI based on session id |
+## Running the service
+
+*From the root directory*
+
+`sbt run` - starts the service locally
+
+`sbt runAllChecks` - Will run all checks required for a successful build
+
+Default service port on local - 9840
+
+### Required dependencies
+
+There are a number of dependencies required to run the service.
+
+The easiest way to get started with these is via the service manager CLI - you can find the installation guide [here](https://docs.tax.service.gov.uk/mdtp-handbook/documentation/developer-set-up/set-up-service-manager.html)
+
+| Command                                       | Description                                                      |
+|-----------------------------------------------|------------------------------------------------------------------|
+| `sm2 --start CUSTOMS_FINANCIALS_ALL`          | Runs all dependencies                                            |
+| `sm2 -s`                                      | Shows running services                                           |
+| `sm2 --stop CUSTOMS_FINANCIALS_SESSION_CACHE` | Stop the micro service                                           |
+| `sbt run` or ` sbt "run 9840"`                | (from root dir) to compile the current service with your changes |
+
+### Runtime Dependencies
+(These are subject to change and may not include every dependency)
+
+* `AUTH`
+* `AUTH_LOGIN_STUB`
+* `AUTH_LOGIN_API`
+* `BAS_GATEWAY`
+* `CA_FRONTEND`
+* `SSO`
+* `USER_DETAILS`
+
+### Login enrolments
path: README.md
user: login: tyagikumarvineet
body: Better to remove this section entirely as its a backend service and no endpoint requires the Enrolments
created_at: 2025-05-22T08:26:05Z
author_association: CONTRIBUTOR

PR comments:
user: login: platops-pr-bot
created_at: 2025-05-21T09:25:45Z
body: - Bintray and JCenter resolvers should be removed from [build.sbt](https://github.com/hmrc/customs-financials-session-cache/blob/MMCA-5318/build.sbt#L60) - See confluence https://confluence.tools.tax.service.gov.uk/x/jhHKDg
author_association: NONE
user: login: platops-pr-bot
created_at: 2025-05-21T09:54:17Z
body: - ~~Bintray and JCenter resolvers should be removed from [build.sbt](https://github.com/hmrc/customs-financials-session-cache/blob/MMCA-5318/build.sbt#L60) - See confluence https://confluence.tools.tax.service.gov.uk/x/jhHKDg~~
author_association: NONE
user: login: magicaljellybeans
created_at: 2025-05-21T10:57:56Z
body: Looks fine, similar discussion comment about level of detail needed for routes (especially if they are team facing) might be worth having.
author_association: NONE