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

# Development

> Preview and develop the Alphscan documentation site locally

This section is for **working on this documentation site** (Mintlify). To develop or use the **SDK** or **sdk-react** packages themselves, see the SDK and sdk-react tabs and your monorepo scripts.

<Info>
  **Prerequisites:**

  * Node.js 18+ (19+ recommended for Mintlify CLI)
  * This docs repo with a `docs.json` at the root of the docs folder
</Info>

## Run the docs locally

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

  <Step title="Start the preview server">
    From the **docs** directory (where `docs.json` lives), run:

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

    Open **[http://localhost:3000](http://localhost:3000)** to view the site. The preview reloads when you edit MDX or `docs.json`.
  </Step>
</Steps>

## Default theme

The site is configured to use **dark mode** by default. Users can still switch to light mode via the theme toggle if you leave it enabled in `docs.json`.

## Custom port

To use a different port:

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

If the chosen port is in use, Mintlify will try the next available port.

## Validate links

Check for broken links in the documentation:

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

## Updating the CLI

To align with the latest Mintlify behavior:

```bash theme={null}
npm update -g mint
```

## Editing content

* **Navigation:** Edit `docs.json` → `navigation.tabs`. Each tab (Introduction, SDK, sdk-react, sdk-react-ui, API reference) has its own groups and pages.
* **Pages:** Edit or add `.mdx` files under the paths referenced in `docs.json` (e.g. `sdk/overview.mdx`, `index.mdx`).
* **Code blocks:** Use fenced code blocks with a language tag for syntax highlighting.

For MDX formatting, a [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) or [MDX](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) extension in your editor is helpful.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Error: Could not load the sharp module">
    Try upgrading Node to v19+ and reinstalling the CLI: `npm remove -g mint` then `npm i -g mint`.
  </Accordion>

  <Accordion title="Preview not matching production">
    Update the Mintlify CLI: `npm update -g mint`. Each CLI version targets a specific Mintlify release.
  </Accordion>

  <Accordion title="Unknown or persistent error">
    Remove the Mintlify cache folder `~/.mintlify` and run `mint dev` again.
  </Accordion>
</AccordionGroup>

## SDK and package development

To build or test the **@alphscan/sdk**, **@alphscan/sdk-react**, or **@alphscan/sdk-react-ui** packages (e.g. in a monorepo), use that repo’s scripts (e.g. `pnpm run build`, `pnpm run test`). The **SDK**, **sdk-react**, and **sdk-react-ui** tabs in this docs site describe the public API and usage.
