Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

LBHackney-IT/coronavirus-here-to-help-frontend

Repository files navigation

📤 Hackney Here To Help Frontend

This is the call-centre staff-facing frontend for Hackney's Here To Help.

🧱 How it's made

It's a Next.js app that works with:

It's built using the GOV.UK Frontend.

💻 Running it locally

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

Logging in

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.

🧪 Testing it

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

🌎 Putting it on the internet

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.

🧬 Configuration

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published