Skip to main content

Web UI

This guide walks you through setting up the unhide-ui project on your local machine for development.


What is this project?

unhide-ui is the web interface for the Helmholtz Knowledge Graph (HKG). It lets users search and browse research entities — datasets, persons, institutions, software, events, instruments, documents, and data catalogs — that are indexed in an OpenSearch cluster.

It is a Next.js application written in TypeScript, with a built-in API layer that communicates with OpenSearch.


Prerequisites

Before you begin, make sure you have the following installed:

ToolVersionNotes
Node.js22+Check with node -v
pnpm10.25.0This project requires pnpm — do not use npm or yarn

To install pnpm:

npm install -g pnpm@10.25.0

1. Clone the repository

git clone https://codebase.helmholtz.cloud/hmc/hmc-public/unhide/development/ui.git
cd ui

2. Install dependencies

pnpm install

3. Set up environment variables

The app requires environment variables to connect to the OpenSearch backend and other services. These are not committed to the repository.

Copy the example file and fill in the values:

cp .env.example .env.development.local

Then open .env.development.local and set the values. Reach out to a team member to obtain the actual values.

VariableDescription
NEXT_PRIVATE_OPENSEARCH_URLURL of the OpenSearch cluster
NEXT_PRIVATE_OPENSEARCH_USERNAMEOpenSearch username (optional if no auth)
NEXT_PRIVATE_OPENSEARCH_PASSWORDOpenSearch password (optional if no auth)
NEXT_PUBLIC_QLEVER_URLPublic URL of the QLever SPARQL endpoint
NEXT_PRIVATE_QLEVER_URLPrivate URL of the QLever SPARQL endpoint
NEXT_PUBLIC_SPARQL_URLPublic SPARQL endpoint URL
NEXT_API_URLBase URL for internal API calls
NEXT_PUBLIC_DOC_URLURL of the external documentation site
NEXT_PUBLIC_BAD_DATA_PREFIXURL prefix used to flag records with data quality issues
NEXT_PUBLIC_SHOW_BANNERSet to true to show the announcement banner, false to hide it

Note: Variables prefixed with NEXT_PUBLIC_ are exposed to the browser. Variables prefixed with NEXT_PRIVATE_ remain server-side only and are never sent to the client.


4. Run the development server

pnpm run dev

The app will be available at http://localhost:3000.

You can verify the API is running by visiting http://localhost:3000/api/health.


Available scripts

CommandDescription
pnpm run devStart the development server with hot reload
pnpm buildCreate a production build
pnpm startStart the production server (requires a build first)
pnpm testRun all tests once
pnpm test:watchRun tests in watch mode
pnpm lintRun ESLint and auto-fix issues
pnpm checkRun ESLint, TypeScript type-check, and Prettier check together
pnpm prettierCheck and auto-format all files with Prettier

Running with Docker

A Dockerfile and docker-compose.yaml are provided for containerised deployment.

docker compose up

The app will be available on port 3000.

For production Kubernetes deployment, refer to the project documentation site.


Next steps