All Projects → alphagov → pay-selfservice

alphagov / pay-selfservice

Licence: MIT license
Payments Team Self Service

Programming Languages

javascript
184084 projects - #8 most used programming language
Nunjucks
165 projects

Projects that are alternatives of or similar to pay-selfservice

jekyll-portfolio-generator
Generates a portfolio/project pages (including related projects) out of data files
Stars: ✭ 55 (+189.47%)
Mutual labels:  portfolio
thepranaygupta.github.io
my personal portfolio website
Stars: ✭ 47 (+147.37%)
Mutual labels:  portfolio
lakshmi
Investing library and command-line interface inspired by the Bogleheads philosophy
Stars: ✭ 107 (+463.16%)
Mutual labels:  portfolio
rizkicitra
My Personal Website, build with Next.js and Tailwind CSS
Stars: ✭ 82 (+331.58%)
Mutual labels:  portfolio
pichichi
Simple one page responsive portfolio template
Stars: ✭ 54 (+184.21%)
Mutual labels:  portfolio
developerIdentity
Developers Identity(Portfolio) Template that helps you showcase your work and skills as a software developer.
Stars: ✭ 21 (+10.53%)
Mutual labels:  portfolio
website
The Official Open-Source version of Gigabyte Developers Incorporated webpage
Stars: ✭ 19 (+0%)
Mutual labels:  portfolio
github-pinner
📌 Pin and embed github repositories or profiles on your own website easily
Stars: ✭ 62 (+226.32%)
Mutual labels:  portfolio
govuk frontend toolkit npm
An npm package for alphagov/govuk_frontend_toolkit
Stars: ✭ 14 (-26.32%)
Mutual labels:  portfolio
JayantGoel001.github.io
My Personal Portfolio.
Stars: ✭ 31 (+63.16%)
Mutual labels:  portfolio
daviddalbusco.com
Freelance Web Developer
Stars: ✭ 19 (+0%)
Mutual labels:  portfolio
jahir.dev
My personal website 💎 – Built using Next.js, TypeScript, MDX, contentlayer, Notion and Stitches styled components
Stars: ✭ 119 (+526.32%)
Mutual labels:  portfolio
Portfolio-Demo-1
A portfolio build by using flutter for web.
Stars: ✭ 74 (+289.47%)
Mutual labels:  portfolio
hugo-uilite
uicard.io/products/hugo-uilite
Stars: ✭ 85 (+347.37%)
Mutual labels:  portfolio
programmergaurav.github.io
Portfolio
Stars: ✭ 27 (+42.11%)
Mutual labels:  portfolio
Portfolio
A responsive portfolio app made with flutter web.
Stars: ✭ 43 (+126.32%)
Mutual labels:  portfolio
web portfolio
My web portfolio built with Flutter
Stars: ✭ 18 (-5.26%)
Mutual labels:  portfolio
dakshp07
Personal Portfolio
Stars: ✭ 14 (-26.32%)
Mutual labels:  portfolio
portfolio
This is my portfolio which is also a template. Feel free to fork, star, and use it.
Stars: ✭ 86 (+352.63%)
Mutual labels:  portfolio
nisrulz.github.io
Everything about Nishant Srivastava/nisrulz (online alias)
Stars: ✭ 41 (+115.79%)
Mutual labels:  portfolio

pay-selfservice

GOV.UK Pay Self Service admin tool (Node.js)

Prerequisites

Running locally

Start the backend services locally in docker, using the Pay CLI.

pay local launch admin

Generate the environment variables file. This only needs to be done the first time you run locally.

./scripts/generate-dev-environment.sh local

Build the Selfservice app and start it

 npm install && npm run compile
 npm run start:dev

Open application in browser:

Log output

When using Docker, you can view log out with the following command:

docker logs -f selfservice

Debug using Visual Studio Code

  • You need to make sure the app runs locally first using the steps in the Running section.
  • In VSCode, go to the Debug view (on MacOS, use shortcut CMD + shift + D).
  • From the Run toolbar, select tne launch config Self Service.
  • Add breakpoints to any file you want to debug - click in the left hand column and a red dot will appear.
  • Press The green play button (F5 MacOS):
    • This will run the app in debug mode.
    • Uses nodemon so it will automatically restart on code changes.

Watching for changes

You shouldn’t need to restart the app to see changes you make.

We use nodemon which watches for changes to files and restarts the node process.

If you’re making changes to client-side JS or Sass files (anything within /browsered/ or /assets/) then running npm run watch-live-reload will watch for changes and recompile. Nodemon does not do anything here as that’s not necessary. If you install the livereload browser plugin then it will refresh your page once the assets have been compiled to the /public folder.

Running tests

To run mocha tests

npm run compile && npm test

Debug tests using Visual Studio Code

IMPORTANT NOTE - some tests do not work in debug mode
  • Some integration tests do not work in debug mode. This is because the tests are dependent on other tests running before hand.
  • Nevertheless, it is still useful to debug tests that do work in debug mode.
Run tests in debug mode
  • In VSCode, go to the Debug view (on MacOS, use shortcut CMD + shift + D).
  • From the Run toolbar, select the launch config you want to run:
    • Mocha All - runs all tests.
    • Mocha Current File - only run currently open test file.
  • Add breakpoints to any file you want to debug - click in the left hand column and a red dot will appear.
  • Press The green play button or F5.

To run cypress tests

Run in two separate terminals:

  1. npm run cypress:server

    This runs both the Cypress server and Mountebank which is the virtualisation server used for stubbing out external API calls.

  2. Either:

  • npm run cypress:test to run headless
  • npm run cypress:test-headed to run headed
  • npm run cypress:test-no-watch to run headless with auto-running of tests when the test file is edited turned off

See About Cypress tests in selfservice for more information about running and writing Cypress tests.

Key environment variables

Variable required default value Description
PORT X 9200 The port number for the express server to be bound at runtime
SESSION_ENCRYPTION_KEY X Key to be used by the cookie encryption algorithm. Should be a large unguessable string (More Info).
PUBLIC_AUTH_URL X The publicauth endpoint to use when API Tokens.
PUBLIC_AUTH_URL X The endpoint to connector base URL.
DISABLE_INTERNAL_HTTPS false/undefined To switch off generating secure cookies. Set this to true only if you are running self service in a non HTTPS environment.
HTTP_PROXY_ENABLED false/undefined To enable proxying outbound traffic of HTTP(S) requests. If set to true make sure to set the following 3 variables
HTTP_PROXY HTTP proxy url
HTTPS_PROXY HTTPS proxy url
NO_PROXY host:port(s) that need to be by passed by the proxy. Supports comma separated list
NODE_WORKER_COUNT 1 The number of worker threads started by node cluster when run in production mode

Architecture Decision Records

We use Architecture Decision Records to keep track of the history of software design decisions on this application. Please see docs/arch.

Licence

MIT License

Vulnerability Disclosure

GOV.UK Pay aims to stay secure for everyone. If you are a security researcher and have discovered a security vulnerability in this code, we appreciate your help in disclosing it to us in a responsible manner. Please refer to our vulnerability disclosure policy and our security.txt file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].