Skip to content

User guide for local development

Floris edited this page May 24, 2024 · 17 revisions

Guide for development Ubuntu/linux

This is a guide giving step by step instructions to run this website locally for development pruposes.

The prerequisites:

  • Java JDK version 17+
  • Node and npm (we recommend you use a node version manager like nvm)
  • Either a PostgreSQL installation, or a Docker installation

When that's ready, clone the GitHub repository into a folder on your computer.

Environments

Our website uses environment files in a couple different places. To simplify the process of creating these files, we have supplied templates and a generate script. Please fill in this template with the correct values and execute the script envBuilder.py

Backend

In order to run the backend, first we have to setup a PostgreSQL database. Here you can choose to either use a local installation of PostgreSQL or use the docker-compose file in the root directory of this repository.

Using Docker

To use Docker, make sure Docker is running on your device, and run following commands in a terminal in the root directory of this repository:

docker-compose -f docker-compose.yml --env-file=.env up db -d --build

Using a local PostgreSQL installation

If you're not using Docker, make sure you have the correct application.properties and application-secrets.properties files in the backend/app/src/main/resources/ folder. After that, you can start the PostgreSQL server by running following commands in a terminal in the root directory of this repository:

cd backend/app/
./gradlew bootRun

Express server

For this server a file called .env is required in the directory backend/web-bff/App/. See the provided template in .env.dev for further details.

To start the Express server, run the following commands in a terminal in the root directory of this repository:

cd backend/web-bff/App/
npm install
npm run dev

Frontend

To start the frontend, run the following commands in a terminal in the root directory of this repository:

cd frontend/
npm install
npm run start
Clone this wiki locally