{"id":27171966,"url":"https://github.com/defra/marine-licensing-backend","last_synced_at":"2026-05-04T07:37:25.435Z","repository":{"id":286643480,"uuid":"962072660","full_name":"DEFRA/marine-licensing-backend","owner":"DEFRA","description":"Git repository for service marine-licensing-backend","archived":false,"fork":false,"pushed_at":"2025-04-07T15:53:02.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-07T16:45:40.152Z","etag":null,"topics":["backend","cdp","node","service"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DEFRA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-07T15:52:41.000Z","updated_at":"2025-04-07T15:53:06.000Z","dependencies_parsed_at":"2025-04-07T16:45:59.408Z","dependency_job_id":"bdbbfba2-b6d8-43c6-a7b0-076621df17f4","html_url":"https://github.com/DEFRA/marine-licensing-backend","commit_stats":null,"previous_names":["defra/marine-licensing-backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fmarine-licensing-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fmarine-licensing-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fmarine-licensing-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fmarine-licensing-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DEFRA","download_url":"https://codeload.github.com/DEFRA/marine-licensing-backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008625,"owners_count":21032556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","cdp","node","service"],"created_at":"2025-04-09T09:19:38.590Z","updated_at":"2026-05-04T07:37:25.429Z","avatar_url":"https://github.com/DEFRA.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# marine-licensing-backend\n\nThe Marine Licensing Backend is part of a GDS-compliant replacement of the Marine Case Management System (MCMS).\n\n- [Directory structure](#directory-structure)\n- [Requirements](#requirements)\n  - [Node.js](#nodejs)\n- [Local development](#local-development)\n  - [Setup](#setup)\n  - [Development](#development)\n  - [Production](#production)\n  - [Npm scripts](#npm-scripts)\n  - [Dependency updates](#dependency-updates)\n  - [Authentication](#authentication)\n- [API endpoints](#api-endpoints)\n- [Docker](#docker)\n  - [Development image](#development-image)\n  - [Production image](#production-image)\n  - [Docker Compose](#docker-compose)\n  - [Dependabot](#dependabot)\n  - [SonarCloud](#sonarcloud)\n- [Licence](#licence)\n  - [About the licence](#about-the-licence)\n\n## Releases\n\n### [6.0.0](https://eaflood.atlassian.net/projects/ML/versions/33941/tab/release-report-all-issues)\n\nDetails available on the release version ticket\n\n### [5.0.0](https://eaflood.atlassian.net/projects/ML/versions/32612/tab/release-report-all-issues)\n\nDetails available on the release version ticket\n\n### [4.0.0](https://eaflood.atlassian.net/projects/ML/versions/29700/tab/release-report-all-issues)\n\nDetails available on the release version ticket\n\n### [3.0.0](https://eaflood.atlassian.net/projects/ML/versions/29059/tab/release-report-all-issues)\n\n### [2.0.0](https://eaflood.atlassian.net/projects/ML/versions/23737/tab/release-report-all-issues)\n\nRelease of the marine licensing backend that will be accessed by marine licensing frontend which will be used by the public. The link lists all the features within the application.\n\n### [1.0.0](https://eaflood.atlassian.net/projects/ML/versions/23736/tab/release-report-all-issues)\n\nInitial release of the marine licensing backend platform.\n\n## Directory structure\n\nThe source code under `src/` is split into domain-aligned folders:\n\n| Folder            | Description                                                                       |\n| ----------------- | --------------------------------------------------------------------------------- |\n| `exemptions`      | All API routes, models, and business logic for marine exemptions                  |\n| `marine-licences` | All API routes, models, and business logic for marine licences                    |\n| `shared`          | Shared logic across both domains — config, helpers, plugins, routes, and services |\n\n## Requirements\n\n### Node.js\n\nFor latest minimum versions of Node.js and NPM, see the [package.json](./package.json) 'engines' property.\n\n- [Node.js](http://nodejs.org/)\n- [npm](https://nodejs.org/)\n- [Docker](https://www.docker.com/)\n\nYou may find it easier to manage Node.js versions using a version manager such\nas [nvm](https://github.com/creationix/nvm) or [n](https://www.npmjs.com/package/n). From within the project folder you\ncan then either run `nvm use` or `n auto` to install the required version.\n\n## Local development\n\n### Setup\n\nInstall application dependencies:\n\n```bash\nnpm install\n```\n\n### Development\n\nTo run the application in `development` mode run:\n\n```bash\nnpm run dev\n```\n\n### Production\n\nTo mimic the application running in `production` mode locally run:\n\n```bash\nnpm start\n```\n\n### Npm scripts\n\nAll available Npm scripts can be seen in [package.json](./package.json).\nTo view them in your command line run:\n\n```bash\nnpm run\n```\n\n### Dependency updates\n\nDependabot automatically creates pull requests to update dependencies.\n\n### Authentication\n\nFor authentication when running locally, there are 2 options. Whichever you use it has to match the option used by\nmarine-licensing-frontend, so that auth tokens sent with requests to the backend are correctly validated:\n\n#### Defra ID stub\n\nThe out-of-the-box config will use the [cdp-defra-id-stub](https://github.com/DEFRA/cdp-defra-id-stub).\n\n#### Real Defra ID and Entra ID\n\nTo set this up and run\nit, [instructions are in marine-licensing-frontend](https://github.com/DEFRA/marine-licensing-frontend/blob/main/local-https-setup/README.md#local-https-development-setup).\nThe .env.template file referred to by the instructions is in the root of this repo.\n\n### Environment variables\n\nFor most local development, you shouldn't need to override any of the env var defaults that are\nin [config.js](./src/config/config.js).\n\n## API endpoints\n\nAPI routes are defined under the `api` folders in each domain:\n\n- `src/exemptions/api/`\n- `src/marine-licences/api/`\n- `src/shared/api/geo-parser/`\n\n## Docker\n\n### Development image\n\nBuild:\n\n```bash\ndocker build --target development --no-cache --tag marine-licensing-backend:development .\n```\n\nRun:\n\n```bash\ndocker run -e PORT=3001 -p 3001:3001 marine-licensing-backend:development\n```\n\nNote - the development image uses the source files directly using volumes, and will automatically rebuild to reflect any\nchanges.\n\n### Production image\n\nBuild:\n\n```bash\ndocker build --no-cache --tag marine-licensing-backend .\n```\n\nRun:\n\n```bash\ndocker run -e PORT=3001 -p 3001:3001 marine-licensing-backend\n```\n\n### Migrations\n\nDatabase migrations are automatically applied to `mongo` on application start.\n\n```shell\nnpm run migrate:status\nnpm run migrate:up\nnpm run migrate:down\n```\n\nSee [migrations/README.md](migrations/README.md) for full details\n\n### Docker Compose\n\nA local environment with:\n\n- Localstack for AWS services (S3, SQS)\n- Redis\n- MongoDB\n- This service.\n- A commented out frontend example.\n\n```bash\ndocker compose up --build -d\n```\n\n### SonarCloud\n\nInstructions for setting up SonarCloud can be found in [sonar-project.properties](./sonar-project.properties)\n\n## Licence\n\nTHIS INFORMATION IS LICENSED UNDER THE CONDITIONS OF THE OPEN GOVERNMENT LICENCE found at:\n\n\u003chttp://www.nationalarchives.gov.uk/doc/open-government-licence/version/3\u003e\n\nThe following attribution statement MUST be cited in your products and applications when using this information.\n\n\u003e Contains public sector information licensed under the Open Government license v3\n\n### About the licence\n\nThe Open Government Licence (OGL) was developed by the Controller of Her Majesty's Stationery Office (HMSO) to enable\ninformation providers in the public sector to license the use and re-use of their information under a common open\nlicence.\n\nIt is designed to encourage use and re-use of information freely and flexibly, with only a few conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Fmarine-licensing-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefra%2Fmarine-licensing-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Fmarine-licensing-backend/lists"}