{"id":20038693,"url":"https://github.com/defra/cyltfr-app","last_synced_at":"2025-11-26T08:03:19.284Z","repository":{"id":245900265,"uuid":"819450653","full_name":"DEFRA/cyltfr-app","owner":"DEFRA","description":"Check Your Long Term Flood Risk application","archived":false,"fork":false,"pushed_at":"2025-11-13T16:03:10.000Z","size":72010,"stargazers_count":2,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-13T18:07:23.063Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-24T14:25:49.000Z","updated_at":"2025-10-28T12:01:23.000Z","dependencies_parsed_at":"2024-08-27T15:56:58.286Z","dependency_job_id":"2e41574b-967f-42e2-9a9d-b51a1df9885c","html_url":"https://github.com/DEFRA/cyltfr-app","commit_stats":null,"previous_names":["defra/cyltfr-app"],"tags_count":96,"template":false,"template_full_name":null,"purl":"pkg:github/DEFRA/cyltfr-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fcyltfr-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fcyltfr-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fcyltfr-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fcyltfr-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DEFRA","download_url":"https://codeload.github.com/DEFRA/cyltfr-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fcyltfr-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286079811,"owners_count":27282121,"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","status":"online","status_checked_at":"2025-11-26T02:00:06.075Z","response_time":193,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-13T10:31:57.940Z","updated_at":"2025-11-26T08:03:19.271Z","avatar_url":"https://github.com/DEFRA.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-app\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-app)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-app\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-app)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-app\u0026metric=reliability_rating)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-app)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-app\u0026metric=security_rating)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-app)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-app\u0026metric=ncloc)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-app)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-app\u0026metric=bugs)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-app)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-app\u0026metric=code_smells)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-app)\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-app\u0026metric=sqale_index)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-app)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_cyltfr-app\u0026metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=DEFRA_cyltfr-app)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![Jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)\n[![GitHub issues](https://img.shields.io/github/issues/DEFRA/cyltfr-app.svg)](https://github.com/DEFRA/cyltfr-app/issues/)\n[![Code size](https://img.shields.io/github/languages/code-size/DEFRA/cyltfr-app.svg)]()\n[![Repo size](https://img.shields.io/github/repo-size/DEFRA/cyltfr-app.svg)]()\n[![Licence](https://img.shields.io/badge/licence-OGLv3-blue.svg)](http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3)\n\n# Check Your Long Term Flood Risk Services Front end application (cyltfr-app)\nRepo for the Check Your Long Term Flood (CYLTFR) service front end application.\n\nThis repository is part of the CYLTFR service which also includes:\\\n\u003chttps://github.com/DEFRA/cyltfr-service\u003e\\\n\u003chttps://github.com/DEFRA/cyltfr-data\u003e\\\n\u003chttps://github.com/DEFRA/cyltfr-admin\u003e\n\n## Prerequisites\nNode v22.x\\\nDocker v20.10.0+\n\n### Build app\n\n`npm run build`\n\n### Start app\n\n`npm start`\n\n### Test app\n\n`npm test`\n\n# Environment variables\n| name                        |      description                        | required  |   default   |            valid            | notes |\n|-----------------------------|-----------------------------------------|:---------:|-------------|:---------------------------:|-------|\n| NODE_ENV                    | Node environment                        |    no     | development | development,test,production |       |\n| RISK_APP_HOST               | Host server IP                          |   yes     |             |                             |       |\n| PORT                        | Server port #                           |   yes     |             |                             |       |\n| SERVICE_URL                 | Service API                             |   yes     |             |                             |       |\n| SIMULATE_ADDRESS_SERVICE    | Mocks address service for testing       |    no     | false       |                             |       |\n| DATA_VERSION                | Which data version will be used for maps|    no     | 01          |                             |       |\n| PERFORMANCE_LOGGING         | If true, will log performance of external calls | no | false      |                             |       |\n| HTTP_TIMEOUT_MS             | Timeout in ms                           |   yes     |             |                             |       |\n| G4_ANALYTICS_ACCOUNT        | GA ID                                   |    no     |             |                             |       |\n| GTAG_MANAGER_ID             | GTM ID                                  |    no     |             |                             |       |\n| FLOOD_WARNINGS_URL          | Flood warning API                       |   yes     |             |                             |       |\n| FLOOD_RISK_URL              | Flood risk API                          |   yes     |             |                             |       |\n| OS_POSTCODE_URL             | OS postcode API                         |   yes     |             |                             |       |\n| OS_MAPS_URL                 | OS map API                              |   yes     |             |                             |       |\n| OS_SEARCH_KEY               | OS search key                           |   yes     |             |                             |       |\n| OS_MAPS_KEY                 | OS map key                              |   yes     |             |                             |       |\n| OS_MAPS_SECRET              | OS map secret key                       |   yes     |             |                             |       |\n| OS_TOKEN_ENDPOINT           | End point to OS OAuth token generation  |   no      | https://api.os.uk/oauth2/token/v1 |                             |       |\n| OS_TOKEN_EXPIRY_TIME        | Map token expiry time in ms             |    no     |60 * 60 *1000|                             |       |\n| http_proxy                  | Proxy that is used for external calls by the service |    no     |             |                             |       |\n| RATE_LIMIT_ENABLED          | Enable limit on postcode requests       |    no     | false       |                             |       |\n| RATE_LIMIT_REQUESTS         | Amount of requests per user             |    no     |             |                             |       |\n| RATE_LIMIT_EXPIRES_IN       | Time user request limit expires         |    no     |             |                             |       |\n| RATE_LIMIT_WHITELIST        | Limit enabled user exceptions           |   yes     | []          |                             |       |\n| REDIS_CACHE_ENABLED         | Redis cache storing enabled             |    no     | false       |                             |       |\n| REDIS_TLS                   | Redis cache requires TLS for connection |    no     | false       |                             |       |\n| REDIS_CACHE_HOST            | Redis linked AWS server URI             |    no     |             |                             |       |\n| REDIS_CACHE_PORT            | Redis default port                      |    no     | 6379        |                             |       |\n| COOKIE_PASSWORD             | Password to prevent exposing cookie data |  yes    |             |                             |       |\n| FRIENDLY_CAPTCHA_ENABLED    | Friendly Captcha robot check enabled    |    no     | false       |                             |       |\n| FRIENDLY_CAPTCHA_SITE_KEY   | Key for site for Catcha check           |    no     |             |                             |       |\n| FRIENDLY_CAPTCHA_SECRET_KEY | Secret key for website captcha          |    no     |             |                             |       |\n| FRIENDLY_CAPTCHA_URL        | Friendly Captcha API                    |    no     |             |                             |       |\n| FRIENDLY_CAPTCHA_BYPASS     | Friendly Capctha bypass key             |    no     |             |                             |       |\n| SESSION_TIMEOUT             | Timeout for session cookies of 10 minutes |    no     | 10          |                             |       |\n| CACHE_ENABLED               | If disabled external APIs will not be cached |    no     | true        |                             |       |\n| ERRBIT_POST_ERRORS          | Allow Errbit errors to be sent for post requests |   yes     |             |                             |       |\n| ERRBIT_ENV                  | Option for info of of which environment is sent to Errbit |   yes     |             |                             |       |\n| ERRBIT_KEY                  | Key for Errbit error logging            |   yes     |             |                             |       |\n| ERRBIT_HOST                 | Server IP for where Errbit is hosted    |   yes     |             |                             |       |\n| ERRBIT_PROXY                | Errbit proxy                            |    no     |             |                             |       |\n| ESRI_CLIENT_ID              | ESRI Client ID                          |   yes     |             |                             |       |\n| ESRI_CLIENT_SECRET          | ESRI Client Secret                      |   yes     |             |                             |       |\n\nFor testing production (P01) ESRI layers get the Client ID and Secret from either Matthew C or Paul S.\n\n# Running the application locally\n\n`$ node index.js`\n\n# Debugging the application in docker using vscode\n\nFirst build the debug image using\n\n`$ npm run container:builddebug`\n\nConfigure vscode using a debug configuration launch.json like\n\n```json\n{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"address\": \"0.0.0.0\",\n      \"name\": \"Attach\",\n      \"port\": 9229,\n      \"request\": \"attach\",\n      \"skipFiles\": [\n        \"\u003cnode_internals\u003e/**\"\n      ],\n      \"localRoot\": \"${workspaceFolder}\",\n      \"remoteRoot\": \"/home/node/app\",\n      \"type\": \"node\"\n    }\n  ]\n}\n```\n\nThen you can run the container in debug mode using\n\n`$ npm run container:debug`\n\nor \n\n`$ npm run cd`\n\nThis maps your source directory into the container, so that you can make changes locally and they'll be reflected in the container.\n\nIf you have auto-attach configured in vscode you might need to disable it for this to work.\n\nWhen you have finished end the debug container using\n\n`$ npm run container:stopdebug`\n\nor \n\n`$ npm run cx`\n\n## License\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\u003eContains public sector information licensed under the Open Government licence v3\n\n### About the license\nThe Open Government Licence (OGL) was developed by the Controller of His 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.\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%2Fcyltfr-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefra%2Fcyltfr-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Fcyltfr-app/lists"}