Skip to content

Clone of the frontend repository for our UNSW SENG3011 Group Project.

Notifications You must be signed in to change notification settings

sam1357/JASSS-SolarVoyant-Frontend

Repository files navigation

Solarvoyant Logo

CI

JASSS SolarVoyant Frontend

TypeScript Next JS React Chakra PNPM cypress AWS

Getting Started

Installing pnpm and packages

pnpm can be installed by simply running:

npm install -g pnpm

Then, install all packages using pnpm i.

Setting up env variables

Copy the .env.template into a .env file and fill out the values.

Key Description
GOOGLE_CLIENT_ID
GOOGLE_CLIENT_SECRET
Google OAuth Client ID and Secret. Learn more at: https://developers.google.com/identity/protocols/oauth2
NEXTAUTH_URL Base URL of website. If developing locally, this would be http://localhost:3000
NEXTAUTH_SECRET A random string of letters and numbers for Next Auth to process with. Can generate one by running the following in terminal:
$ openssl rand -base64 32
DEFAULT_REGION
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS environment variables.
STAGING_ENV The staging environment that the website is currently running in. Used for calling the correct AWS Lambda functions. In development, this would simply be 'dev'.

Starting the server

You can start the development server using:

pnpm dev

The development server will compile in realtime, so any changes you make will be reflected live.

Open http://localhost:3000 with your browser to see the result.

Testing

Testing is handled by the Cypress library. To run the tests, simply run pnpm cypress:run. Alternatively, if you would like to spin up a browser instance and have a GUI for running cypress like the one below, run pnpm cypress:open.

alt text

Important

If you are using WSL, the GUI requires WSL to be setup to handle GUI applications. Follow this guide to set this up.

If you are using a native Linux, Windows or macOS machine, then there is no need to perform this step.

Deployment

Deployment is automatically handled by AWS Amplify. You can access the deployment here.

About

Clone of the frontend repository for our UNSW SENG3011 Group Project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •