Frontend application for the the ECC (EORI Common Component) Subscription service. This service handles EORI Subscription journey.
Other related ECC services:
- Backend service: EORI Common Component
- Stubs: EORI Common Component Stubs
- Proxy: EORI Common Component Hods Proxy
- Registration service: EORI Common Component Registration Frontend
This service is written in Scala and Play, and requires Java 11 JRE to run.
To develop or run service locally you'll also need:
- Service Manager
- SBT
- Docker Desktop (Optional. Makes it easier to run external dependencies, e.g. Mongo Database locally)
What's running?
sm2 -s
Start the required development services (make sure your service-manager-config folder is up to date)
sm2 --start EORI_COMMON_COMPONENT_ALL
Stop all ECC related services
sm2 --stop EORI_COMMON_COMPONENT_ALL
When running locally the start page can be accessed via Government Gateway login stub http://localhost:9949/auth-login-stub/gg-sign-in.
To start the journey redirect URL has to point to http://localhost:6750/customs-enrolment-services/cds/subscribe after all required service-manager services are started.
All pages in the flow are authentication protected.
To run EORI Common Component Frontend using default port number
sbt run
Before debugging locally you will need to stop the Service Manager-started eori-common-component-frontend
service
sm2 --stop EORI_COMMON_COMPONENT_FRONTEND
Then start your local debugging session on the expected port
sbt -jvm-debug 9999 run
And finally connect and set-up debugger; Intellij set-up example
We're using ScalaTest for Unit and Integration tests.
You can run unit test suite with
sbt test
To run integration test suit execute
sbt it:test
To run all test suites together with Scoverage and ScalaFMT code formatting execute script
./precheck.sh
We're using Scoverage to check the code coverage of our test suites.
You can run this on the command line with
sbt clean coverage test it:test coverageReport
Adjust the following in build.sbt
to configure Scoverage
...
ScoverageKeys.coverageMinimum := 80,
ScoverageKeys.coverageFailOnMinimum := false,
...
High level journey diagram with APIs involved is documented in Confluence.
Different journeys and scenarios can be triggered using documented scenarios.
This code is open source software licensed under the Apache 2.0 License.