-
Installation of Node Version Manager
- For Mac/Linux: Refer to the GitHub on how to install node version manager (GitHub)
- For Windows: Refer to the Github nvm-windows (Github) and download nvm-setup.exe under "Assets"
nvm install node
to install the latest version of node.js- Verify that you have installed node correctly
node -v
- Verify that you have
npm
by typing innpm -v
-
Installation of pnpm https://pnpm.io/installation Next, install PNPM by following the following instructions:
# Installing pnpm npm install -g pnpm # Verify installation pnpm --version
Note: If you are converting from yarn to pnpm, then you will need to do the following
- Delete the current
node_modules
- Run
pnpm i
- Delete the current
-
Installation of project libraries
git clone https://github.com/NUS-Project-SaBai/FrontEnd # Change Directory into the FrontEnd folder cd FrontEnd # Install the necessary libraries for the project pnpm i # Run the development server pnpm dev
-
Environmental Setup
Create a new
.env.local
file by making a copy of.env.local.example
and filling it with relevant details under the "FRONTEND" heading in the "Key Credentials" document.# Run the following command to start the server: pnpm dev
*Make sure you set up both the Frontend AND Backend before logging into localhost.
Log into localhost with the credentials in the "Key Credentials" document.
-
Offline Setup Change .env.local for the following variables (note that IP Address should be your static IP):
NEXT_PUBLIC_OFFLINE='OFFLINE' NEXT_PUBLIC_API_URL='https://192.168.1.100:3000/api/v1'
Run the following command to start offline
pnpm offline
Refer to BackEnd offline Setup.
- Node Version Manager [https://github.com/nvm-sh/nvm]
- Node.js [https://nodejs.org/en]
- Node Package Manager [https://www.npmjs.com/]
- pnpm [https://pnpm.io/]
- React.js [https://react.dev/]
- Next.js [https://nextjs.org/]
- Axios [https://axios-http.com/docs/intro]
- Auth0 [https://auth0.com/]