open-index/open-npm huggingface dataset:
npm package: @softconst/instantbase-js
Description: Minimal InstantBase client for sending user events
Author: SoftConst
Latest version: 1.0.3

# @softconstructor/instantbase-js

A minimal JavaScript client for sending user events to **InstantBase** — a system for building digital customer profiles.

This library automatically:
- Generates and stores a unique client identifier (`InstantBaseAccount`) in a cookie,
- Attaches it to every request,
- Sends data to the InstantBase API.

Works with any frontend framework: **Nuxt 3, Vue, React, Svelte, vanilla HTML**, and more.

---

## 📦 Installation

```bash
  npm install @softconstructor/instantbase-js
```

```ts
  import { init, send } from '@softconstructor/instantbase-js';

  interface Config {
    token: string;    // required
    debug?: boolean;  // optional
  }

  init({
    token: 'YOUR_APPLICATION_SECRET_TOKEN', // ← get this from your InstantBase admin
    debug: true // optional: logs events to console
  });

  import { send } from '@softconstructor/instantbase-js';

  // Page view
  send({ URL: window.location.href });
```