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

# Licensing

> Develop locally without a key. Apply a valid hostname license key before deploying any Floorkit app or demo.

Floorkit is proprietary software. You can install the public package and develop locally without a key. Every deployed website needs a valid key for its hostname, including a public prototype or non-commercial demo.

## When you need a key

| Where Floorkit runs | Requirement |
| - | - |
| `localhost`, `*.localhost`, or a loopback address | No key; keep the badge visible |
| Tests, builds, and scripts outside a browser | No key; exported files keep the badge |
| Any deployed website | A valid key for that hostname |
| Teaching or research on a deployed website | Ask about academic terms and a hostname key |

A trial key lets you evaluate deployment for 14 days and keeps the **made with floorkit** badge. A paid key removes the badge. Paid keys have a 30-day technical grace period after expiry; trial keys do not.

<Card title="Ask about a license" icon="handshake" href="https://ploterr.com/floorkit">
  Ask about a trial, academic terms, or a commercial license. Startups and solo businesses receive
  special pricing.
</Card>

The package's `LICENSE.md` contains the terms. Keep the badge visible wherever the SDK shows it unless your valid paid key removes it.

## Apply your key

In a Vite app, put the key in your app's `.env.local`:

```text theme={null}
VITE_FLOORKIT_LICENSE_KEY=your-hostname-license-key
```

Restart Vite after changing the file. This key is delivered with your browser app; it is not a server API credential or a signing key.

Apply it and await verification before the first view or export:

```typescript theme={null}
import { Floorkit, setLicenseKey } from '@opengeometry/floorkit';
import wasmURL from 'opengeometry/opengeometry_bg.wasm?url';

export async function startFloorkit(): Promise<void> {
  const key = import.meta.env.VITE_FLOORKIT_LICENSE_KEY;
  const floorkit = new Floorkit({ licenseKey: key });
  await setLicenseKey(key);
  await floorkit.setupOpenGeometry(wasmURL);
}
```

* Give the key exactly as issued, without extra spaces or line breaks.
* Use HTTPS on a named domain covered by the key.
* Apply the key separately in each worker that uses the SDK.
* A page on your LAN address is not a localhost page. See [Troubleshooting](/floorkit/troubleshooting).

## Handle a missing or invalid key

On a deployed hostname without a valid key, views stop after five seconds and SDK exports throw `LicenseError`. A wrong-domain, invalid, or expired key is also refused. Saving the project remains available, so your app can preserve the user's work.

Read `getLicenseState()` to show the cause. See the [license key API](/floorkit/api/licensing/license-key) for the states and errors.

## Usage reporting

The SDK sends limited usage reports to `https://license.ploterr.com`. Reports contain no project content or page paths.

* Development reporting is an anonymous daily report with a machine identifier and SDK version. Set `telemetry: false` in the `Floorkit` options to disable it.
* Deployed reporting includes the hostname, SDK version, license status, and key ID when available. It also runs with a paid key and cannot be disabled.
* Non-browser runs send no reports. Failure to reach the reporting service does not change license validity.

For a strict content security policy, allow `https://license.ploterr.com` in `connect-src`. License verification itself runs in the browser.

## Next

<CardGroup cols={2}>
  <Card title="License key API" icon="code" href="/floorkit/api/licensing/license-key">
    See the functions, states, and error types.
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/floorkit/troubleshooting">
    Diagnose a hostname, key, badge, or export problem.
  </Card>
</CardGroup>


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