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

# Configuring Lerian Cabine

> The service addresses and institution settings that Lerian Cabine reads at run time.

Lerian Cabine reads its service addresses and institution settings at run time. The deployment serves a script that sets `window.__CABINE_CONFIG__` before Cabine starts. One installation serves one institution.

```js theme={null}
window.__CABINE_CONFIG__ = {
  VITE_AUTH_URL: "https://auth.example.com/v1",
  VITE_DESK_URL: "https://cabine-api.example.com",
  VITE_FI_ISPB: "12345678",
};
```

## How Cabine reads a key

Cabine resolves each key in this order:

1. The value in `window.__CABINE_CONFIG__`, when the key is there and valid.
2. The value set when the Cabine bundle was built, when `window.__CABINE_CONFIG__` does not carry the key.
3. Unset.

An empty string is valid. It unsets the key, and it hides the build value. A value that is not valid is treated as unset. It also hides the build value, so a typo cannot fall back to an address from another environment. Cabine trims a run-time value. Cabine reads only its allowed run-time keys and ignores the rest.

| Type | Valid value |
| - | - |
| Address | An `http` or `https` URL, with no user name, password, query or fragment. |
| ISPB | Exactly 8 characters, each a digit or an uppercase letter. |
| Identifier | Up to 256 characters, with no control character. |
| Amount | Digits with an optional decimal part, for example `65000000.00`. |

## Access Manager and Cabine API addresses

Cabine adds the route path to each address.

| Key | What it sets | Value |
| - | - | - |
| `VITE_AUTH_URL` | The Access Manager auth service: sign-in, token refresh and the code step (MFA). | Ends in `/v1`. |
| `VITE_IDENTITY_URL` | The Access Manager identity service: users and groups. See [Identity service](https://docs.lerian.studio/en/platform/access-manager/identity-plugin.md). | Ends in `/v1`. |
| `VITE_DESK_URL` | The Cabine API. Without it, Cabine does not call the Cabine API. | Origin. |

## Rail addresses

Without the address of a rail, Cabine cannot call that rail.

| Key | What it sets | Value |
| - | - | - |
| `VITE_SPB_URL` | Lerian SPB. | Origin. |
| `VITE_SPI_URL` | Lerian SPI. | Origin. |
| `VITE_DICT_URL` | The Lerian SPI DICT service. When unset, Cabine uses `VITE_SPI_URL`. | Origin. |
| `VITE_BRCODE_URL` | The Lerian SPI BR Code service. When unset, Cabine uses `VITE_SPI_URL`. | Origin. |
| `VITE_CORE_URL` | The Lerian SPI core service. When unset, Cabine uses `VITE_SPI_URL`. | Origin. |
| `VITE_SILOC_URL` | Lerian SILOC. | Origin. |
| `VITE_CORREIOS_URL` | Lerian BC Correios. | Ends in `/api/v1/correios`. |
| `VITE_STA_URL` | Lerian STA. | Origin. |
| `VITE_CCS_URL` | Lerian CCS. | Origin. |
| `VITE_SRC_URL` | Lerian SRC. | Origin. |
| `VITE_SISBAJUD_URL` | Lerian SISBAJUD. | Origin. |
| `VITE_SCR_URL` | Lerian SCR. | Origin. |

## Readiness addresses

Cabine reads the readiness of a rail at `/readyz` on the readiness address. Cabine leaves out a rail that has no address. When a readiness key is unset, Cabine uses the address in the last column.

| Key | Rail | Fallback |
| - | - | - |
| `VITE_READYZ_SPB_URL` | Lerian SPB | `VITE_SPB_URL` |
| `VITE_READYZ_SPI_URL` | Lerian SPI | `VITE_SPI_URL` |
| `VITE_READYZ_DICT_URL` | The Lerian SPI DICT service | `VITE_DICT_URL`, then `VITE_SPI_URL` |
| `VITE_READYZ_BRCODE_URL` | The Lerian SPI BR Code service | `VITE_BRCODE_URL`, then `VITE_SPI_URL` |
| `VITE_READYZ_CORE_URL` | The Lerian SPI core service | `VITE_CORE_URL`, then `VITE_SPI_URL` |
| `VITE_READYZ_CORREIOS_URL` | Lerian BC Correios | The origin of `VITE_CORREIOS_URL` |
| `VITE_READYZ_SILOC_URL` | Lerian SILOC | `VITE_SILOC_URL` |
| `VITE_READYZ_STA_URL` | Lerian STA | `VITE_STA_URL` |
| `VITE_READYZ_CCS_URL` | Lerian CCS | `VITE_CCS_URL` |
| `VITE_READYZ_SRC_URL` | Lerian SRC | `VITE_SRC_URL` |
| `VITE_READYZ_SISBAJUD_URL` | Lerian SISBAJUD | `VITE_SISBAJUD_URL` |
| `VITE_READYZ_SCR_URL` | Lerian SCR | `VITE_SCR_URL` |

## Institution

| Key | What it sets | Value |
| - | - | - |
| `VITE_FI_ISPB` | The ISPB of the institution. Cabine puts it in the forms and the actions that name the institution. Without it, those forms stay incomplete. | ISPB |
| `VITE_SISBAJUD_INSTITUTION_ID` | The Lerian SISBAJUD institution that Cabine reads. Without it, Cabine makes no SISBAJUD read. | Identifier |

## Floors

| Key | What it sets | Value |
| - | - | - |
| `VITE_RESERVE_FLOOR_BRL` | The default reserve floor, in BRL. | Amount |
| `VITE_CONTA_PI_FLOOR_BRL` | The default Conta PI threshold, in BRL. | Amount |

Floors that an operator sets are saved in that browser only. They override the deployment default in that browser.

An operator sets the floors on the **Configuração** page of the STR and SPI workspaces, in the fields **Piso da reserva** and **Limiar da Conta PI**, and saves with **Salvar**. Each field accepts up to two decimal places. Clearing a field returns to the deployment default. Without a default, the alert stops.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.