This frontend microservice powers the Trader Reporting Dashboard, enabling traders, declarants, and authorized third parties to request and download customs declaration reports. It is available to all EORI-registered users subscribed to CDS.
You can run the service locally in two ways:
After cloning the repository, run the following command in the root directory:
sbt run
To use the service manager CLI (sm2), please refer to the official setup guide for instructions on how to install and configure it locally.
Once set up:
- To start the service:
sm2 --start TRE_ALL
- To stop the service:
sm2 --stop TRE_ALL
http://localhost:2102/request-customs-declaration-data
The service's endpoints (that need Enrolment to access) can be accessed by using the enrolments below:
| Enrolment Key | Identifier Name | Identifier Value |
|---|---|---|
| HMRC-CUS-ORG | EORINumber | GB123456789012 |
| HMRC-CUS-ORG | EORINumber | GB123456789014 |
The minimum requirement for test coverage is 90%. Builds will fail when the project drops below this threshold.
| Command | Description |
|---|---|
sbt test |
Runs unit tests locally |
sbt "test/testOnly *TEST_FILE_NAME*" |
Runs tests for a single file |
| Command | Description |
|---|---|
sbt clean coverage test coverageReport |
Generates a unit test coverage report. The report can be found at target/scala-3.3.4/scoverage-report/index.html |
The following feature switches are set in application.conf:
| Feature | Description |
|---|---|
| welsh-translation | Enables Welsh language translation support. |
| third-party | Enables or disables all third-party related features (such as adding a third party or providing access to reports). When set to false, users cannot access any third-party functionality. |
| notifications | Enables or disables all email notification features, such as adding additional emails to a report request. By default, users can only receive reports at the default company email associated with the EORI. |
| user-allow-list | Restricts access to users in an allow list if set to true. |
| Command | Description |
|---|---|
| sbt run | Runs the service locally |
| sbt clean | Cleans code |
| sbt compile | 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 scalafmtAll | Formats all the necessary files based on .scalafmt.conf |
| 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 |