Skip to content

companieshouse/acsp-manage-users-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

acsp-manage-users-web

This is a web frontend for the ACSP Manage Users journey. It was created based on Typescript Web Starter for Companies House.

Frontend Technologies and Utils

Running locally outside of Docker

This front end application can be run locally (using node and npm) along with the CHS development environnment. Instructions can be found here

Test data

Instructions for adding initial data for development and testing, can be found here

In addition to the above there is a seed script is included in this repo which uses Node.js and faker.js.

To use this script

From the terminal cd into the correct directory

cd tools/seed-acsp-data-mongo

Install dependencies

npm i

Configuration options can be updated in config.js.

To run the script

node index.js

Helmet

We have used the npm package Helmet to setup security-related HTTP response headers.

GOV.UK Frontend Design System

The repo uses GOV.UK Frontend v5.4.0. Version v5.0+ updates the design of the Tag component. Text within the tag is no longer bold and uppercase with extra letter spacing. The colours have also changed to make them more distinguishable from buttons.

Handling errors and promise rejections

Express-async-errors package

The Express-async-errors package has been added. This means when an error is thrown in an async function or a rejected promise is awaited inside an async function, any errors will be passed to the error handler as if calling next(err). More information can be found here.

Navigation Checks

To avoid users from skipping pages some navigation check logic has been implemented, which uses the the referrer in the headers. Link to the middleware here