This public-facing microservice is part of Customs Exports Declaration Service (CEDS). It is designed to work in tandem with customs-declare-exports service.
It provides functionality to submit and manage exports declarations.
sm2 --start CDS_EXPORTS_DECLARATION_ALL
Start the service with:
sbt run
This repository contains unit tests for the service. In order to run them, simply execute:
sbt test
This service uses feature flags to enable/disable some of its features. These can be changed/overridden in config under microservice.services.features.<featureName> key.
The list of feature flags and what they are responsible for:
betaBanner = [true/false] - When enabled, all pages in the service have BETA banner.
The service's user interface is always built using the components provided by the play-frontend-hmrc library except for two of them due to the service's business requirements.
-
The "Summary" Card Twirl template was required as the Card component provided by play-frontend-hmrc can only contain a single SummaryList, via GovukSummaryList, whereas the service instead requires Card(s) potentially containing more than one of them.
What's more, each SummaryList might be prefixed, meaning outside the Html of the SummaryList, with specific heading tags (H3).
However, when used with a single SummaryList, our "Summary" Card template generates the same Html, with the same CSS classes, as generated by directly passing a Card to a GovukSummaryList. -
The dashboard/pagination and the drafts/pagination Twirl templates were required to support loading a single "page" of documents on demand, as the service, for each of its users, might store an indefinite number of declarations, potentially ten of thousands.
However, they generate the same Html, with the same CSS classes, as the Html component sampled at GDS pagination.
Project contains scalafmt plugin.
Commands for code formatting:
scalafmt # format compile sources
test:scalafmt # format test sources
sbt:scalafmt # format .sbt source
To ensure everything is formatted you can check project using commands below
scalafmt::test # check compile sources
test:scalafmt::test # check test sources
sbt:scalafmt::test # check .sbt sources
There is a script called precheck.sh that runs all tests, examine their coverage and check if all the files are properly formatted.
It is a good practise to run it just before pushing to GitHub.
This project has a TamperMonkey (Google Chrome) or GreaseMonkey (Firefox) Auto Complete Script to help speed through the form journey.
These scripts can be found in the docs directory.
As per Exports Product Manager and CDS Stakeholders instructions, the CDS Tariff is our source of truth for any CDS codes going forward, until further instructions or until we connect with a service that provides this data for us.
We use the following codes:
- Country codes Last updated 17 March 2023
- Authorisation codes (3/39 in tariff) Last updated 1 July 2022
- UK Office of Exit codes (5/12 in tariff) Last updated 17 April 2023
- Document type codes (previous document page) (2/1 in tariff) Last published: 1 August 2018
- Package Type codes (6/9 in tariff) Last published: 1 August 2018
- Customs supervising office codes (5/27 in tariff) Last updated 13 March 2023
This code is open source software licensed under the Apache 2.0 License