opg-modernising-lpa

module
v0.1332.0-weblatepr.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2024 License: MIT

README

OPG Modernising LPA

path-to-live-workflow licence-mit codecov

repo standards badge

OPG Modernising LPA Documentation

Documentation for the service can be found in the /docs/ folder.

Getting Started

Prerequisites
  • Docker and docker-compose
  • Nodejs and Yarn
Installation

Install dependencies for development

yarn install

Bring the service up

make up
Run Cypress tests
make run-cypress

Cypress is run locally rather than in docker. To ensure version parity of nodeJS use a version manager, such as asdf, to parse .tool-versions:

asdf install
Local development

To run the app in dev mode on amd64/intel:

make up-dev

or the following for arm64/apple silicon:

make up-dev-arm

Dev mode adds hot reloading via air which will watch .go and .gohtml for changes and recompile the app.

It also enables debugging via delve. Delve runs on localhost:2345 - add this to your editor/IDE debug config settings and then add breakpoints to step through the app code when running on localhost. Example VSCode debug config:

{
    "name": "Go remote debug",
    "type": "go",
    "request": "attach",
    "mode": "remote",
    "port": 2345,
    "host": "127.0.0.1",
    "trace": "verbose",
}
Pact

We use Pact for contract tests. To install the necessary tools to run the tests do:

go install github.com/pact-foundation/pact-go/v2
pact-go install
Code generation

We make use of mockery for generating mocks and enumerator for generating enums. To use you'll need to go install ./cmd/enumerator, then running make go-generate will create code from any declarations.

Licence

The OPG Modernising LPA code in this repository is released under the MIT license, a copy of which can be found in LICENCE.

Directories

Path Synopsis
app module
cmd
enumerator
Enumerator is a tool to automate the creation of simple enums.
Enumerator is a tool to automate the creation of simple enums.
event-logger
Event logger is a tool to capture sqs events and display the most recent as a HTML page.
Event logger is a tool to capture sqs events and display the most recent as a HTML page.
internal module
actor
Code generated by "enumerator -type NoVoucherDecision -linecomment -empty"; DO NOT EDIT.
Code generated by "enumerator -type NoVoucherDecision -linecomment -empty"; DO NOT EDIT.
app
donor/donordata
Code generated by "enumerator -type AttorneysAct -linecomment -empty"; DO NOT EDIT.
Code generated by "enumerator -type AttorneysAct -linecomment -empty"; DO NOT EDIT.
form
Code generated by "enumerator -type YesNo -linecomment -trimprefix"; DO NOT EDIT.
Code generated by "enumerator -type YesNo -linecomment -trimprefix"; DO NOT EDIT.
identity
Code generated by "enumerator -type Status --linecomment --trimprefix"; DO NOT EDIT.
Code generated by "enumerator -type Status --linecomment --trimprefix"; DO NOT EDIT.
localize
Code generated by "enumerator -type Lang -linecomment -empty"; DO NOT EDIT.
Code generated by "enumerator -type Lang -linecomment -empty"; DO NOT EDIT.
page
Package page contains the core code and business logic of Make and Register a Lasting Power of Attorney (MRLPA)
Package page contains the core code and business logic of Make and Register a Lasting Power of Attorney (MRLPA)
pay
Code generated by "enumerator -type EvidenceDelivery -linecomment -empty"; DO NOT EDIT.
Code generated by "enumerator -type EvidenceDelivery -linecomment -empty"; DO NOT EDIT.
s3
task
Code generated by "enumerator -type IdentityState -trimprefix"; DO NOT EDIT.
Code generated by "enumerator -type IdentityState -trimprefix"; DO NOT EDIT.
uid
mocks
GOVUKNotify Module
GOVUKSignIn Module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL