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

# Getting Started

> Cross-platform SDK for EEG signal processing, BLE headband connectivity, and rPPG

## Elata SDK

The Elata SDK is a cross-platform biosignal SDK spanning EEG device pipelines, browser transports, and rPPG processing for web and native clients. It provides four npm packages and a set of Rust crates that compile to WASM and native targets.

<Info>
  **Repository**: [github.com/Elata-Biosciences/elata-bio-sdk](https://github.com/Elata-Biosciences/elata-bio-sdk)
</Info>

***

## Architecture

```text theme={null}
┌──────────────────────────────────────────────────────┐
│                        Elata SDK                      │
├──────────────────────────────────────────────────────┤
│  Platform Bindings                                    │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐            │
│  │  WASM    │  │  Swift   │  │  Kotlin  │            │
│  │ (Browser)│  │  (iOS)   │  │(Android) │            │
│  └────┬─────┘  └────┬─────┘  └────┬─────┘            │
│       └─────────────┴─────────────┘                  │
│                      │                                │
│  Models Layer        │                                │
│  ┌─────────────────┐ ┌─────────────────┐              │
│  │ Alpha Bump      │ │ Calmness        │              │
│  │ Detector        │ │ Model           │              │
│  └────────┬────────┘ └────────┬────────┘              │
│           └────────┬──────────┘                       │
│  Signal Processing │                                  │
│  ┌─────────────────────────────────────┐              │
│  │ FFT │ Band Power │ Filtering        │              │
│  └─────────────────────────────────────┘              │
│                    ▲                                  │
│  HAL Layer         │                                  │
│  ┌─────────────────────────────────────┐              │
│  │         EegDevice Trait             │              │
│  │ connect() │ start_stream() │ read() │              │
│  └─────────────────────────────────────┘              │
└──────────────────────────────────────────────────────┘
```

***

## Quick Start

The fastest path is to scaffold a demo app with `create-elata-demo`:

```bash theme={null}
# rPPG web demo (default template)
npm create @elata-biosciences/elata-demo my-app

# EEG web demo
npm create @elata-biosciences/elata-demo my-app -- --template eeg-demo

# EEG Web Bluetooth demo
npm create @elata-biosciences/elata-demo my-app -- --template eeg-ble
```

After scaffolding:

```bash theme={null}
cd my-app
pnpm install
pnpm run dev
```

<Tip>
  If you're scaffolding inside an existing `pnpm` workspace, use `pnpm --dir my-app --ignore-workspace install` instead.
</Tip>

***

## Choose the Right Package

| Goal                                                   | Start here                             | Notes                                                |
| ------------------------------------------------------ | -------------------------------------- | ---------------------------------------------------- |
| Scaffold a new demo app                                | `@elata-biosciences/create-elata-demo` | Fastest path for evaluation and onboarding           |
| Run EEG WASM APIs in the browser                       | `@elata-biosciences/eeg-web`           | Signal processing, models, and WASM helpers          |
| Connect to a Muse-compatible EEG device in the browser | `@elata-biosciences/eeg-web-ble`       | Requires `eeg-web` and Web Bluetooth                 |
| Run camera-based rPPG in a browser app                 | `@elata-biosciences/rppg-web`          | Includes processor, backend loader, and demo helpers |

***

## npm Packages

| Package                                                                                                      | Version | Description                                              |
| ------------------------------------------------------------------------------------------------------------ | ------- | -------------------------------------------------------- |
| [`@elata-biosciences/create-elata-demo`](https://www.npmjs.com/package/@elata-biosciences/create-elata-demo) | 0.1.16  | Demo scaffolder with rPPG, EEG, and EEG BLE templates    |
| [`@elata-biosciences/eeg-web`](https://www.npmjs.com/package/@elata-biosciences/eeg-web)                     | 0.1.16  | EEG WASM bindings: signal processing, band power, models |
| [`@elata-biosciences/eeg-web-ble`](https://www.npmjs.com/package/@elata-biosciences/eeg-web-ble)             | 0.1.16  | Web Bluetooth transport for EEG headband devices         |
| [`@elata-biosciences/rppg-web`](https://www.npmjs.com/package/@elata-biosciences/rppg-web)                   | 0.1.16  | rPPG pipeline: heart rate from camera via face detection |

### Add packages to an existing app

```bash theme={null}
# EEG signal processing (WASM)
pnpm add @elata-biosciences/eeg-web

# BLE headband connectivity (requires eeg-web)
pnpm add @elata-biosciences/eeg-web-ble @elata-biosciences/eeg-web

# rPPG (camera-based heart rate)
pnpm add @elata-biosciences/rppg-web
```

**Requirements**: Node.js 18+, modern browser with WebAssembly support.

***

## Rust Crates

The SDK is built on Rust crates that compile to WASM and native targets. The
primary public Rust crates are the core and protocol crates; synthetic and
binding crates are mainly internal packaging surfaces.

| Crate              | Purpose                                                       |
| ------------------ | ------------------------------------------------------------- |
| `elata-eeg-hal`    | Core HAL traits: `EegDevice`, `SampleBuffer`, `ChannelConfig` |
| `elata-eeg-signal` | FFT, band power analysis, filtering                           |
| `elata-eeg-models` | Alpha Bump Detector, Calmness Model                           |
| `elata-rppg`       | rPPG pipeline core                                            |
| `elata-muse-proto` | Muse classic and Athena protocol                              |

***

## Device Support

| Device           | Protocol    | Channels                    | Status       |
| ---------------- | ----------- | --------------------------- | ------------ |
| Muse 2           | Classic BLE | 4 EEG (TP9, AF7, AF8, TP10) | Supported    |
| Muse S           | Classic BLE | 4 EEG + PPG                 | Supported    |
| Muse S (Athena)  | Athena v2   | 8 EEG + optics + accgyro    | Supported    |
| Synthetic Bridge | BLE bridge  | Configurable                | Testing only |

***

## Compatibility

| Surface             | Chrome / Edge | Safari macOS  | Safari iOS                          | Node.js                        |
| ------------------- | ------------- | ------------- | ----------------------------------- | ------------------------------ |
| `create-elata-demo` | n/a           | n/a           | n/a                                 | `>= 18`                        |
| `eeg-web`           | Supported     | Supported     | Supported                           | `>= 20` for local repo tooling |
| `eeg-web-ble`       | Supported     | Not supported | Not supported                       | `>= 20` for local repo tooling |
| `rppg-web`          | Supported     | Supported     | Supported (with camera permissions) | `>= 20` for local repo tooling |

<Note>
  `eeg-web-ble` requires Web Bluetooth and an `https://` origin or `localhost`. Safari and iOS do not support Web Bluetooth for Muse browser workflows. Use a native app shell with CoreBluetooth or a companion bridge app streaming frames over WebSocket.
</Note>

***

## Build from Source

```bash theme={null}
git clone https://github.com/Elata-Biosciences/elata-bio-sdk.git
cd elata-bio-sdk

./run.sh install          # Install dependencies
./run.sh build all        # Release build (WASM + TS)
./run.sh test             # Run all tests
./run.sh demo eeg         # Launch EEG demo
./run.sh demo rppg        # Launch rPPG demo
```

***

## Next

<CardGroup cols={3}>
  <Card title="EEG Web" icon="brain" iconType="light" href="/sdk/eeg-web/getting-started">
    Signal processing and models
  </Card>

  <Card title="BLE Transport" icon="bluetooth" iconType="light" href="/sdk/eeg-web-ble/getting-started">
    Connect to headband devices
  </Card>

  <Card title="rPPG" icon="heart-pulse" iconType="light" href="/sdk/rppg-web/getting-started">
    Heart rate from camera
  </Card>
</CardGroup>

<CardGroup cols={3}>
  <Card title="Choose A Package" icon="compass" iconType="light" href="/sdk/guides/choose-the-right-package">
    Package decision guide
  </Card>

  <Card title="Example Apps" icon="grid-2" iconType="light" href="/sdk/guides/example-apps">
    Full reference implementations
  </Card>

  <Card title="Build Your First App" icon="rocket" iconType="light" href="/sdk/tutorials/first-app">
    Scaffold a starter app
  </Card>
</CardGroup>
