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

# Contributing to docs

> How to edit these docs locally and how they get deployed.

This page is for the team and community members contributing to the TruLayer docs. If you're looking to integrate TruLayer into your app, head to the [Quickstart](/quickstart).

<Info>
  **Prerequisites**:

  * Node.js 19 or higher
  * This repo cloned locally (`git clone git@github.com:trulayer/docs.git`)
</Info>

## Local preview

<Steps>
  <Step title="Install the Mintlify CLI">
    ```bash theme={null}
    npm i -g mint
    ```
  </Step>

  <Step title="Start the preview server">
    From the repo root:

    ```bash theme={null}
    mint dev
    ```

    The preview is at [http://localhost:3000](http://localhost:3000). It hot-reloads as you edit MDX files.
  </Step>
</Steps>

## Editing content

* **MDX** files live at the repo root and in subdirectories (`concepts/`, `sdks/`, `api-reference/`, etc.)
* **Navigation** is configured in `docs.json` — any new page must be listed there to appear in the sidebar
* **Components** — Mintlify supports `<Card>`, `<CardGroup>`, `<Columns>`, `<Tabs>`, `<CodeGroup>`, `<Steps>`, `<Accordion>`, `<Note>`, `<Tip>`, `<Warning>`, `<Frame>`, and more. See [Mintlify's component reference](https://mintlify.com/docs/components).

## Keeping the API reference in sync

The OpenAPI spec is the source of truth for the HTTP API reference. It lives at `api-reference/openapi.yaml` and is kept in sync with the backend service spec.

When the backend API changes, the docs team updates `api-reference/openapi.yaml` and opens a PR. Spec drift is caught automatically in CI.

## Custom ports

```bash theme={null}
mint dev --port 3333
```

## Validating links

```bash theme={null}
mint broken-links
```

Run before opening a PR — broken internal links block merge.

## Deployment

Pushes to `main` are picked up by the Mintlify GitHub app and deployed to `https://docs.trulayer.ai` within \~60 seconds.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Error: Could not load the &#x22;sharp&#x22; module using the darwin-arm64 runtime">
    This is typically an outdated Node. Try:

    1. `npm remove -g mint`
    2. Upgrade to Node 19+
    3. `npm i -g mint`
  </Accordion>

  <Accordion title="Unknown error on mint dev">
    Remove the local Mintlify cache:

    ```bash theme={null}
    rm -rf ~/.mintlify
    mint dev
    ```
  </Accordion>
</AccordionGroup>
