> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.docs.modulards.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.docs.modulards.com/_mcp/server.

# Example kit

The [API example kit](https://github.com/modulards/api-example-kit) is an open-source Nuxt app built on this API. Every screen is backed by a typed server route that makes a single request to the API, so each route shows how to call the endpoint behind it.

## Try it live

1. Create a personal access token in Modular DS under **My profile > API > Create key**.
2. Open [examplekit.modulards.ai](https://examplekit.modulards.ai) and paste the token.

> **Warning**
>
> There is no sandbox: the kit works on your real account. A read-only token opens every view and is the safest way to explore. Creating, editing and Updater actions need a read and write token, and they change real data.

## How your token is handled

* The token is verified, then stored encrypted in an HttpOnly session cookie for seven days.
* The browser only talks to the app's own routes, never to the Modular DS API directly. The server uses the token to call the API and never sends it back to the browser.
* The API client refuses redirects, so the token is never forwarded to another host.

## What it covers

* **Sites, teams and tags**: list, filter, inspect, create, edit and delete; assign tags and mark favorites.
* **Connection**: download the connection plugin for a team, view manual connection data and verify a connection.
* **Site detail**: overview, uptime and inventory; maintenance mode, private note, cache clearing and service status; health checks, backups, TLS certificate, broken links and malware scans.
* **Portfolio**: uptime and vulnerabilities across all sites.
* **Updater**: plugin, theme and core inventories; sync, install, upgrade, activate, deactivate and uninstall; activity and version history.

Maintenance mode, cache clearing and Updater actions are applied asynchronously, so the app reports them as requested rather than done.

## How it is built

* `server/utils/modular/` holds a small `fetch` client and turns JSON:API responses into flat objects for the UI.
* Each server route validates its input and makes one API call, with no retries: a `429` stays visible until you retry. The API allows 120 requests per minute per token.

## Run it locally

It requires Node `^22.19.0 || ^24.11.0 || >=26.0.0` and pnpm.

```bash
git clone https://github.com/modulards/api-example-kit.git
cd api-example-kit
pnpm install
cp .env.example .env
pnpm dev
```

Open `http://localhost:3000` and paste your token.

For a production build, set `NUXT_SESSION_PASSWORD` in `.env` to a secret of at least 32 characters (`openssl rand -hex 32`), then run:

```bash
pnpm build
node --env-file=.env .output/server/index.mjs
```

To host it, use any platform that runs a Nuxt server, serve it over HTTPS and configure `NUXT_SESSION_PASSWORD` as a secret. A static host is not enough, because the API calls go through the server.