The Marine Licensing Frontend is the start of a GDS-compliant application that will eventually replace the Marine Case Management System (MCMS). It is under development and currently offers the ability to create licence exemption notifications.
For latest minimum versions of Node.js and NPM, see the package.json 'engines' property.
You may find it easier to manage Node.js versions using a version manager such
as nvm or n. From within the
project folder you can then either run nvm use or n auto to install the required version.
Install application dependencies:
npm installNote - to get all dependent services up you should also run docker compose up --build -d in both
this repo and in marine-licensing-backend. Then stop the marine-licensing-frontend container.
To run the application in development mode run:
npm run devand hit http://localhost:3000 in your browser. This will use Defra ID stub for login.
To mimic the application running in production mode locally run:
npm startAll available Npm scripts can be seen in package.json To view them in your command line run:
npm runThe routes for this service are defined in src/server/router.js.
For authentication when running locally, there are 2 options:
The out-of-the-box config will use the cdp-defra-id-stub. If you run this with docker compose (see section below) you will also get an instance of Redis, which can be used for session caching.
To properly use features like organisation switching, you will need to use real Defra ID (not the stub) and Entra ID.
All pages are authenticated with Defra ID, except the view exemption details page for Dynamics 365 users, which is authenticated with Entra ID.
To set this up and run it, instructions are here
For most local development, you shouldn't need to override any of the env var defaults that are in config.js.
Dev environment - login uses Defra ID stub
The other environments use real Defra ID and Entra ID for login: Test environment Perf-test environment Production environment
Those links and all the tools to deploy, view logs etc are on the Core Delivery Platform page
We use Catbox for server-side caching. By default the service will use CatboxRedis when deployed and
CatboxMemory for
local development. You can override the default behaviour by setting the SESSION_CACHE_ENGINE
environment variable to either redis or memory.
Please note: CatboxMemory (memory) is not suitable for production use! The cache will not be
shared between each instance of the service and it will not persist between restarts.
Ensure you have run npm install before running any Docker commands.
Build:
docker build --target development --no-cache --tag marine-licensing-frontend:development .Run:
docker run -p 3000:3000 marine-licensing-frontend:developmentBuild:
docker build --no-cache --tag marine-licensing-frontend .Run:
docker run -p 3000:3000 marine-licensing-frontendA local environment with:
- Localstack for AWS services (S3, SQS)
- Redis
- MongoDB
- This service
- A commented out backend example
docker compose up --build -dInstructions for setting up SonarCloud can be found in sonar-project.properties.
Dependabot automatically creates pull requests to update dependencies.
Details available on the release version ticket
Release of marine licensing frontend application that would be accessible by the public. The link lists all the features within the application
Initial release of the marine licensing frontend application but wont be used by public.
THIS INFORMATION IS LICENSED UNDER THE CONDITIONS OF THE OPEN GOVERNMENT LICENCE found at:
http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3
The following attribution statement MUST be cited in your products and applications when using this information.
Contains public sector information licensed under the Open Government license v3
The Open Government Licence (OGL) was developed by the Controller of Her Majesty's Stationery Office (HMSO) to enable information providers in the public sector to license the use and re-use of their information under a common open licence.
It is designed to encourage use and re-use of information freely and flexibly, with only a few conditions.