Skip to content

Getting Started

Live demo

Before starting to work on Karr, check out the live demo to see what it looks like and the features implemented.

Visit the demo

Before you start

Git

Make sure you’ve been added to the github repository and have push permission.

The main branch should be protected, so you’ll need to work on another branch and open a pull request when your work is ready.

Dependencies

Make sure you have all the dependencies, using the correct version:

  • Node.js: currenly version 22, more generally the latest LTS.
  • pnpm: currently on version 9, more generally the latest stable version. Should be specified in the root package.json.
  • PostgreSQL: currently on version 17. Can be running from a Docker container.
PostgreSQL Docker compose

Run this compose file with docker compose up -d to get a Postgres database running.

docker-compose.yaml
services:
postgresql:
image: "postgres:17"
volumes:
- "./data:/bitnami/postgresql"
ports:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=karr
- POSTGRES_USER=karr
- POSTGRES_DB=karr

Get the repo

Make sure to have ssh keys set up with git. It makes using git much more convenient and more secure.

You can also configure git to sign your commits, although not required.

  1. First off, clone the repo:

    Terminal window
    git clone git@github.com:finxol/karr.git
  2. Go into the directory and install the dependencies.

    Terminal window
    cd karr
    pnpm install

Git hooks

The repo uses Husky to manage git hooks.

If a hook fails, the action won’t take effect, leaving you the chance to fix it.

There are 3 hooks set up:

  • Pre-commit: Format the staged files
  • Pre-push: Run all tests, check types, lint, and check formatting. These are slower so only done before pushing.
  • Commit-msg: Check the commit message follows Conventional Commits. This commit format is useful for precise changelog generation.

The hook scripts are located in .husky/.

You can always deactivate the git hooks if you really don’t like them, the checks will also be run in Github CI. The hooks are there for a quicker feedback loop, and avoid waiting several minutes before finding out a check fails.