Skip to Content
DocsMaintenanceDevelopment Setup

Local Development Setup

First, clone the repository:

git clone https://gitlab.ethz.ch/digital-chemistry-laboratory/currybo

or, with SSH:

git clone git@gitlab.ethz.ch:digital-chemistry-laboratory/currybo

Node

For Next.js development, a recent version of Node.js  is required. For development, NVM  is a convenient solution that does not depend on whatever version is shipped by your package manager.

After installing NVM, run

nvm install 20 nvm use 20

This will load Node.js 20 into the node, npm and npx executables path.

After installing node, install all JavaScript dependencies by running

npm install

Database

In order to store data, we need a database. Here, PostgreSQL is used.

Install the (dockerized) database by running

docker run --name postgres -e POSTGRES_PASSWORD=sup3rs3cr3t -p 5432:5432 -d postgres

Configuration

If needed, edit the .env file to find your database or LDAP server. The default settings will work if you run the commands as described here.

.env
# how to reach the database. # [DB]://[user]:[password]@[host]:[port]/[DBname]?schema=public DATABASE_URL="postgres://postgres:sup3rs3cr3t@localhost:5432/currybo?schema=public" # LDAP server LDAP_URI=ldaps://ldaps-hit-1.ethz.ch # URL used for auth redirect URI AUTH_URL=http://localhost:3000 # Key to encrypt Session token AUTH_SECRET=!ChangeMe! # Authorization token to upload Python library builds CURRYBO_API_KEY=!ChangeMe!

Migrations

In order to prepare the database for currybo data, flush all pending migrations to the database:

npx prisma migrate dev

Development Server

Last, start the development server with

npm run dev

and visit localhost:3000 in your browser.

Last updated on