nova-dashboard-front-end

Next.js front end for Nova Dashboard project

Stars
0

Nova Dashboard Front End

This is the main frontend repository for the software part of a P3 project created by SW3 group 6 at Aalborg University in Copenhagen.

Local Development

Copy .env.local.sample into .env.local and fill out the values for the environment variables in the .env.local file.

Running the local development environment

To start the Docker Compose project, run:

docker compose up -d

or, when using JetBrains WebStorm, by running the Docker Compose run configuration.

Then, start a new shell session in the node container:

docker exec -it nova-dashboard-front-end-node-1 /bin/sh

The first time the project is cloned, or when dependencies in package.json or package-lock.json have changed, in the node container run:

npm install

Now the development server can be started in the node container:

npm run dev

The front end is now accessible at localhost:3000.

When code is pushed to the remote repository, the Formatting, Linting and Build workflow is run. Therefore, check your code for errors before committing and pushing by running the tools in the node container first:

npm run prettier && npx eslint .

To check whether the project can be compiled for production, run the build command:

NODE_ENV=production npm run build

Then, start the production server with:

NODE_ENV=production npm run start

After a finished development cycle, exit the node container and run:

docker compose down