Skip to content

Installing Klarity locally

Klarity is constituted of multiple applications, this could mean that installing Klarity involves installing all of these applications. In fact, installing Klarity only refers to installing Klarity Dashboard, either locally or in the cloud. Since we are just getting started, we will focus on installing Klarity locally on your machine.

Klarity Dashboard Local Installation

Prerequisites

  • Docker 24+ (build and run images)
  • Docker-compose 2.23+ (launch applications and services) or Podman-compose 1.22+

Get the repository

Clone on your computer the klarity-dashboard git repository using the main branch. Create a .env file and complete it as it follows :

bash
GITLAB_NPM_PROJECT_ID=YYY
GITLAB_NPM_AUTH_TOKEN=xxx

KD_BACK_GITLAB_PROJECT_ID=ZZZ
KD_BACK_GITLAB_ACCESS_TOKEN=xxx
  • GITLAB_NPM_PROJECT_ID : Default GitLab repository on which the klarity front and back are hosted (this one).
  • GITLAB_NPM_AUTH_TOKEN : GitLab Access Token (project or personal)
  • KD_BACK_GITLAB_PROJECT_ID : Identifier of the gitlab project on which the request fropm KD are pushed (this one).
  • KD_BACK_GITLAB_ACCESS_TOKEN : GitLab Access Token (project or perosnal)

Start

  • Using Docker
shell
docker-compose up -d
  • Using Podman
shell
#if you are on windows you might need to start the Podman machine:
podman machine start

If you are on linux, it might be required to indicate the relevant registries for nginx, postgres or minio container. You can do this in the registries.conf :

shell
sudo vim /etc/containers/registries.conf

and add the following :

shell
unqualified-search-registries = ["docker.io"]

Now you can execute the compose file :

shell
# first time always use 
podman compose --file docker-compose.yml up --build

# then
podman compose --file docker-compose.yml up --build

The backend becomes accessible via Swagger UI from http://localhost:8080/swagger/ (useful for simulating Klarity Craft) and the frontend is accessible from http://localhost:5173.

Note: If the code has changed, remember to specify images rebuild: --build, for either Docker or Podman

Stop

  • Using Docker
shell
docker-compose stop
  • Using Podman
shell
podman-compose stop

Destroy (reset database)

  • Using Docker
shell
docker-compose down -v
  • Using Podman
shell
podman-compose down -v

Login

Front-end

  • Go to frontend application and login : http://localhost:5173 (email : admin@klarity.test, password : nltQguf2mFgR4Xx4LLpc5QfSEOV8wqDi)

Back-end

bash
{
  "email": "admin@klarity.test",
  "password": "nltQguf2mFgR4Xx4LLpc5QfSEOV8wqDi"
}
  • Copy token returned in response and paste it into Authorize (top right button)
bash
Response body
{
  "status": 200,
  "data": {
    "token": "THIS TOKEN",
    "user": { [...] }
  }
}

Now you can either initiate your first project or read about the lifecycle !