open-index/open-npm huggingface dataset:
npm package: @plasho/sdk
Description: Plasho SDK for web-based ID verification
Author: Plasho
Latest version: 1.1.1

# Plasho SDK

A React/Next.js SDK for integrating Plasho's ID verification system into your web application.

## Installation

```bash
npm install @plasho/sdk
```

## Usage

```typescript
import { PlashoSDK, PlashoForm, PlashoCamera } from '@plasho/sdk';

// Initialize the SDK
const plasho = new PlashoSDK({
  apiKey: 'your-api-key',
});

// In your React component
function VerificationComponent() {
  const handleSubmit = async (data) => {
    try {
      // Request email verification
      await plasho.requestEmailVerification(data);
    } catch (error) {
      console.error('Verification failed:', error);
    }
  };

  const handleImagesCapture = async (images: string[]) => {
    try {
      // Verify ID using captured images
      const result = await plasho.verifyId(images);
      console.log('Verification successful:', result);
    } catch (error) {
      console.error('Verification failed:', error);
    }
  };

  return (
    <div>
      <PlashoForm
        onSubmit={handleSubmit}
        onError={(error) => console.error(error)}
      />
      <PlashoCamera
        onImagesCapture={handleImagesCapture}
        onError={(error) => console.error(error)}
      />
    </div>
  );
}
```

## Features

- User information collection form
- Camera access for ID verification
- Automatic image capture and base64 conversion
- Email verification
- API integration with Plasho services

## API Reference

### PlashoSDK

#### Constructor
```typescript
const plasho = new PlashoSDK({
  apiKey: string
});
```

#### Methods

- `verifyId(images: string[])`: Verify user ID using two base64-encoded images
- `requestEmailVerification(data)`: Request email verification
- `requestCameraAccess()`: Request camera access

### PlashoForm

A React component for collecting user information.

#### Props

- `onSubmit`: Callback function when form is submitted
- `onError`: Optional callback function for handling errors

### PlashoCamera

A React component for capturing images from the user's camera.

#### Props

- `onImagesCapture`: Callback function that receives an array of two base64-encoded images
- `onError`: Optional callback function for handling errors

## License

MIT
npm package: @plasius/chatbot
Description: OpenAI Chatbot
Author: Plasius LTD
Latest version: 1.1.12

# @plasius/chatbot

[![npm version](https://img.shields.io/npm/v/@plasius/chatbot.svg)](https://www.npmjs.com/package/@plasius/chatbot)
[![Build Status](https://img.shields.io/github/actions/workflow/status/Plasius-LTD/chatbot/ci.yml?branch=main&label=build&style=flat)](https://github.com/Plasius-LTD/chatbot/actions/workflows/ci.yml)
[![coverage](https://img.shields.io/codecov/c/github/Plasius-LTD/chatbot)](https://codecov.io/gh/Plasius-LTD/chatbot)
[![License](https://img.shields.io/github/license/Plasius-LTD/chatbot)](./LICENSE)
[![Code of Conduct](https://img.shields.io/badge/code%20of%20conduct-yes-blue.svg)](./CODE_OF_CONDUCT.md)
[![Security Policy](https://img.shields.io/badge/security%20policy-yes-orange.svg)](./SECURITY.md)
[![Changelog](https://img.shields.io/badge/changelog-md-blue.svg)](./CHANGELOG.md)

Public package for chatbot UI/state integrations used in Plasius applications.


## Install

```bash
npm install @plasius/chatbot
```

## Module formats

This package publishes dual ESM and CJS artifacts.
When CJS output is emitted under `dist-cjs/*.js` with `type: module`, `dist-cjs/package.json` is generated with `{ "type": "commonjs" }` to ensure Node `require(...)` compatibility.


## Usage

```ts
import { ChatBot } from "@plasius/chatbot";
```

## Development

```bash
npm install
npm run build
npm test
npm run demo:run
```

## Demo Sanity Check

```bash
npm run demo:run
```

## Publishing

This package is published via GitHub CD only.

1. Configure repository environment `production` with secret `NPM_TOKEN`.
2. Run `.github/workflows/cd.yml` via **Actions -> CD (Publish to npm) -> Run workflow**.
3. Select the version bump (`patch`, `minor`, `major`, or `none`) and optional pre-release id.

## Governance

- Security policy: [SECURITY.md](./SECURITY.md)
- Code of conduct: [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md)
- ADRs: [docs/adrs](./docs/adrs)
- Legal docs: [legal](./legal)

## License

MIT
npm package: @plasius/environment
Description: Plasius Environment provider/context
Author: Plasius LTD
Latest version: 1.0.12

# @plasius/environment

[![npm version](https://img.shields.io/npm/v/@plasius/environment.svg)](https://www.npmjs.com/package/@plasius/environment)
[![Build Status](https://img.shields.io/github/actions/workflow/status/Plasius-LTD/environment/ci.yml?branch=main&label=build&style=flat)](https://github.com/Plasius-LTD/environment/actions/workflows/ci.yml)
[![coverage](https://img.shields.io/codecov/c/github/Plasius-LTD/environment)](https://codecov.io/gh/Plasius-LTD/environment)
[![License](https://img.shields.io/github/license/Plasius-LTD/environment)](./LICENSE)
[![Code of Conduct](https://img.shields.io/badge/code%20of%20conduct-yes-blue.svg)](./CODE_OF_CONDUCT.md)
[![Security Policy](https://img.shields.io/badge/security%20policy-yes-orange.svg)](./SECURITY.md)
[![Changelog](https://img.shields.io/badge/changelog-md-blue.svg)](./CHANGELOG.md)

Public package providing environment context helpers for Plasius React applications.


## Install

```bash
npm install @plasius/environment
```

## Module formats

This package publishes dual ESM and CJS artifacts.
When CJS output is emitted under `dist-cjs/*.js` with `type: module`, `dist-cjs/package.json` is generated with `{ "type": "commonjs" }` to ensure Node `require(...)` compatibility.


## Usage

```ts
import { EnvironmentProvider, useEnvironment } from "@plasius/environment";
```

## Development

```bash
npm ci
npm run build
npm test
```

## Governance

- Security policy: [SECURITY.md](./SECURITY.md)
- Code of conduct: [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md)
- ADRs: [docs/adrs](./docs/adrs)
- Legal docs: [legal](./legal)

## License

MIT
npm package: @plasius/error
Description: Error handling functions and types for Plasius projects
Author: Plasius LTD
Latest version: 1.0.11

# @plasius/error

[![npm version](https://img.shields.io/npm/v/@plasius/error.svg)](https://www.npmjs.com/package/@plasius/error)
[![Build Status](https://img.shields.io/github/actions/workflow/status/Plasius-LTD/error/ci.yml?branch=main&label=build&style=flat)](https://github.com/Plasius-LTD/error/actions/workflows/ci.yml)
[![coverage](https://img.shields.io/codecov/c/github/Plasius-LTD/error)](https://codecov.io/gh/Plasius-LTD/error)
[![License](https://img.shields.io/github/license/Plasius-LTD/error)](./LICENSE)
[![Code of Conduct](https://img.shields.io/badge/code%20of%20conduct-yes-blue.svg)](./CODE_OF_CONDUCT.md)
[![Security Policy](https://img.shields.io/badge/security%20policy-yes-orange.svg)](./SECURITY.md)
[![Changelog](https://img.shields.io/badge/changelog-md-blue.svg)](./CHANGELOG.md)

Public package containing shared error boundary and error-handling utilities for Plasius React applications.


## Install

```bash
npm install @plasius/error
```

## Module formats

`@plasius/error` ships dual module outputs:

- ESM via `exports.import` (`dist/index.js`)
- CJS via `exports.require` (`dist-cjs/index.js`, explicitly marked CommonJS)

## Usage

```ts
import { ErrorBoundary } from "@plasius/error";
```

### Error reporting with `@plasius/analytics`

`ErrorBoundary` can forward captured errors into an analytics-compatible client:

```tsx
import { ErrorBoundary } from "@plasius/error";
import { createFrontendAnalyticsClient } from "@plasius/analytics";

const analytics = createFrontendAnalyticsClient({
  source: "sharedcomponents",
  endpoint: "https://analytics.example.com/collect",
});

<ErrorBoundary
  name="CheckoutBoundary"
  analyticsClient={analytics}
  errorContext={{ feature: "checkout" }}
>
  <CheckoutPage />
</ErrorBoundary>;
```

The boundary forwards a minimal report (`boundary`, `error`, component stack, severity, context), and `@plasius/analytics` handles sanitization and secure transport rules.

### Whole application crash capture

`installGlobalCrashReporter` captures crashes outside React boundaries where available:
- browser: `window.error`, `window.unhandledrejection`
- server/runtime: `process.uncaughtException`, `process.unhandledRejection`

```ts
import {
  ErrorBoundary,
  installGlobalCrashReporter,
} from "@plasius/error";

const crashReporter = installGlobalCrashReporter({
  boundaryName: "GlobalApplication",
  analyticsClient: analytics,
  errorContext: { app: "frontend" },
});

// later during teardown
crashReporter.dispose();
```

## Development

```bash
npm ci
npm run build
npm test
```

## Governance

- Security policy: [SECURITY.md](./SECURITY.md)
- Code of conduct: [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md)
- ADRs: [docs/adrs](./docs/adrs)
- Legal docs: [legal](./legal)

## License

MIT