> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cisisk.projects.bernardopinto.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Setup

> Install, configure, and run the Cisisk API

## Requirements

* Node.js 18+
* MySQL 8+
* npm

## Clone

```bash theme={null}
git clone https://github.com/PintoBernardo/cisisk.git
cd cisisk
```

## Install dependencies

```bash theme={null}
npm install
```

## Configure environment

```bash theme={null}
cp .env.example .env
```

Edit `.env` with your database credentials:

```env theme={null}
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=
DB_NAME=cisisk

JWT_SECRET=change-this-to-a-random-string
```

## Create the database

```bash theme={null}
mysql -u root < sql/init.sql
```

This creates the `cisisk` database and all tables.

## Start

```bash theme={null}
npm run dev
```

The API starts on the configured port (default `3000`).

## Verify

```bash theme={null}
curl /api/v1/health
```

## Default permission

The init script seeds a superadmin permission (level 0) with UUID `00000000-0000-0000-0000-000000000000`. Assign it to a user after creation via `POST /api/v1/user-perms`.
