This is the call-centre staff-facing frontend for Hackney's Here To Help.
It's a Next.js app that works with:
- Hackney's CV-19 Resident Support API V3
- Hackney's Google oAuth service
It's built using the GOV.UK Frontend.
You need node
and npm
installed.
First, clone the repo
npm i
npm run dev
It'll be on http://localhost:3000 with a mocking server on http://localhost:3001
First, you need a @hackney.gov.uk Google account in the right groups to log in. Speak to Hackney IT if you don't have these.
Next, you need to tell your computer to run the app from a hackney.gov.uk domain. Let's use localdev.hackney.gov.uk
.
Add this line to your hosts file (Windows: C:\Windows\System32\drivers\etc\hosts
, Mac: /etc/hosts
):
127.0.0.1 localdev.hackney.gov.uk
When you next launch the app, it should be on http://localdev.hackney.gov.uk:3000
.
Login should now work.
It uses Cypress for automated tests. Run them with:
npm run test:e2e:ci
It uses Jest for unit tests. Run them with:
npm test
It's suitable for Heroku, Vercel, AWS, or any other Node.js hosting.
Pushes to the main branch will be automatically built and deployed to our staging environment in Circle CI.
Check the Next.js deployment documentation for more details.
You can use a .env.local
file to supply environment config locally. Create a fresh one with cp .env.sample .env.local
.
Variable | Description | Example |
---|---|---|
APP_URL | http://localdev.hackney.gov.uk:3000 | |
APP_STAGE | production, staging, dev | staging |
HACKNEY_JWT_SECRET | ||
NEXT_PUBLIC_HACKNEY_COOKIE_NAME | hackneyToken | |
RUNTIME_HOST_ENV | dev | |
HERE_TO_HELP_API_BASE_URL | The Base URL for the Here To Help API | https://example.com/api/v2 |
HERE_TO_HELP_API_KEY | The API Key for the Here To Help API |