Skip to content

govuk-one-login/txma-infra

Repository files navigation

TxMA Infrastructure

Infrastructure for querying data in Transaction Monitoring & Audit. There is an additional README for each stack.

Pre-requisites

To run this project you will need the following:

  • SAM CLI - Used to build and deploy the application
  • Node.js version 24 - Recommended way to install is via NVM
  • Docker - Required to run SAM locally
  • Checkov - Scans cloud infrastructure configurations to find misconfigurations before they're deployed. Added as a Husky pre-commit hook.

Important

  • Node version 24 is required since the runtimes for Lambda functions are fixed.

Getting started

nvm use
npm install
npm run prepare

Code standards

This repository is set up to use Prettier for formatting, and ESLint to look for problems in any Typescript and Javascript code.

Prettier is an opinionated formatting tool for multiple languages/file formats. Exceptions can be added to the .prettierrc.json file.

ESLint is configured to use just its recommended rules via the .eslintrc.json file. These can be viewed at:

Additionally, its code formatting rules are disabled as these are handled by Prettier.

To run the linting:

npm run lint

Previewing a stack change set

The scripts/preview-template.sh script creates a CloudFormation change set against a live stack and saves the output to the preview/ folder. This is useful for inspecting what changes will be applied before deploying.

Ensure you are logged in via SSO first:

export AWS_PROFILE=<your-profile> && aws sso login

Then run:

./scripts/preview-template.sh <template-path> <stack-name>

For example:

./scripts/preview-template.sh infrastructure/audit-dr-london/template.yaml auditdr-infra

The change set output is saved to preview/<stack-name>-changeset.json and the change set is automatically deleted afterwards.

Testing

Unit and integration tests are found within;

infrastructure/audit-test-tools

cd infrastructure/audit-test-tools && npx vitest run

infrastructure/dev-tools

cd infrastructure/dev-tools && npx vitest run

Licence

MIT License

About

No description or website provided.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors