{"id":23066922,"url":"https://github.com/dvsa/cvs-tsk-atf-report-gen","last_synced_at":"2025-07-15T23:35:29.081Z","repository":{"id":37444832,"uuid":"175402138","full_name":"dvsa/cvs-tsk-atf-report-gen","owner":"dvsa","description":"Processes end visit events into emails detailing testing activity for the day","archived":false,"fork":false,"pushed_at":"2025-07-09T06:11:20.000Z","size":1613,"stargazers_count":0,"open_issues_count":15,"forks_count":1,"subscribers_count":10,"default_branch":"develop","last_synced_at":"2025-07-09T23:21:20.958Z","etag":null,"topics":["app-dev","cvs-project"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dvsa.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-03-13T10:52:57.000Z","updated_at":"2025-06-10T09:30:24.000Z","dependencies_parsed_at":"2023-09-22T20:55:19.254Z","dependency_job_id":"52242f2a-ce7d-438e-992e-ffa54353ed83","html_url":"https://github.com/dvsa/cvs-tsk-atf-report-gen","commit_stats":null,"previous_names":[],"tags_count":2787,"template":false,"template_full_name":null,"purl":"pkg:github/dvsa/cvs-tsk-atf-report-gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvsa%2Fcvs-tsk-atf-report-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvsa%2Fcvs-tsk-atf-report-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvsa%2Fcvs-tsk-atf-report-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvsa%2Fcvs-tsk-atf-report-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dvsa","download_url":"https://codeload.github.com/dvsa/cvs-tsk-atf-report-gen/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvsa%2Fcvs-tsk-atf-report-gen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265467580,"owners_count":23770747,"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":["app-dev","cvs-project"],"created_at":"2024-12-16T05:15:34.045Z","updated_at":"2025-07-15T23:35:29.014Z","avatar_url":"https://github.com/dvsa.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cvs-tsk-report-gen\n\n## Introduction\n\nThe report gen task is a microservice to be consumed by DVSA to help generate reports.\n\n## Dependencies\n\nThe project runs on node 10.x with typescript and serverless framework. For further details about project dependencies, please refer to the `package.json` file.\n[nvm](https://github.com/nvm-sh/nvm/blob/master/README.md) is used to managed node versions and configuration explicitly done per project using an `.npmrc` file.\n\n## Configuration and environmental variable\n\nThe `BRANCH` environment variable indicates in which environment is this application running. Not setting this variable will result in defaulting to `local`.\n\nThe configuration file can be found under `src/config/config.yml`.\nEnvironment variable injection is possible with the syntax:\n`${BRANCH}`, or you can specify a default value: `${BRANCH:local}`.\n\n## Running the project\n\nPlease install and run the following security programs as part of your development process -\n[git-secrets](https://github.com/awslabs/git-secrets)\nAfter installing, do a one-time set up with `git secrets --register-aws`. Run with `git secrets --scan`.\nYou will also need to install [repo-security-scanner](https://github.com/UKHomeOffice/repo-security-scanner)\n\nSet up your nodejs environment running `nvm use` and once the dependencies are installed using `npm i`, you can run the scripts from `package.json` to build your project.\n\n### Building\n\n- Building the docker image - `npm run build:docker`\n- Building with source maps - `npm run build:dev`\n- Building without source maps - `npm run build`\n\n### Running\n\n- The S3 server can be started by running `npm run start:docker`.\n- The app can be started by running `npm run start`\n\n### Lambda Invoke\n\nThe `invoke` configuration contains settings for both the `local` and the `remote` environment.\nThe local environment contains configuration for the Lambda Invoke local endpoint, as well as configuration for loading mock JSON response.\n\n```\ninvoke:\n  local:\n    params:\n      apiVersion: 2015-03-31\n      endpoint: http://localhost:3000\n    functions:\n      testResults:\n          name: cvs-svc-test-results\n          mock: tests/resources/test-results-response.json\n  remote:\n    params:\n      apiVersion: 2015-03-31\n    functions:\n      testResults:\n          name: test-results-${BRANCH}\n```\n\n### S3\n\nThe S3 configuration contains settings for both the `local` and the `remote` environment. The `local` environment contains configuration for the local S3 instance. The `remote` environment does not require parameters.\n\n```\ns3:\n  local:\n    endpoint: http://localhost:7000\n    s3ForcePathStyle: true\n  remote: {}\n```\n\n### Testing\n\nJest is used for unit testing.\nPlease refer to the [Jest documentation](https://jestjs.io/docs/en/getting-started) for further details.\nIn order to test, you need to run the following:\n\n- `npm run test` for unit tests\n\n### Contributing\n\nThe projects has multiple hooks configured using [husky](https://github.com/typicode/husky#readme) which will execute the following scripts: `security-checks`, `audit`, `tslint`, `prepush`.\nThe codebase uses [typescript clean code standards](https://github.com/labs42io/clean-code-typescript) as well as sonarqube for static analysis.\nSonarQube is available locally, please follow the instructions below if you wish to run the service locally (brew is the preferred approach):\n\n- _Brew_:\n\n  - Install sonarqube using brew\n  - Change `sonar.host.url` to point to localhost, by default, sonar runs on `http://localhost:9000`\n  - run the sonar server `sonar start`, then perform your analysis `npm run sonar-scanner`\n\n- _Manual_:\n  - Add sonar-scanner in environment variables in your \\_profile file add the line: `export PATH=\u003cPATH_TO_SONAR_SCANNER\u003e/sonar-scanner-3.3.0.1492-macosx/bin:$PATH`\n  - Start the SonarQube server: `cd \u003cPATH_TO_SONARQUBE_SERVER\u003e/bin/macosx-universal-64 ./sonar.sh start`\n  - In the microservice folder run the command: `npm run sonar-scanner`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvsa%2Fcvs-tsk-atf-report-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdvsa%2Fcvs-tsk-atf-report-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvsa%2Fcvs-tsk-atf-report-gen/lists"}