# Quickstart Guide

Get SmartSpectra running in your app and measuring vitals from video.

## What is SmartSpectra?

SmartSpectra is a contactless vital signs SDK that extracts physiological metrics from a camera feed — no wearables required. Point a camera at a face and get real-time measurements.

**What you can measure:**

- Pulse rate and pulse pleth waveform
- Heart rate variability (HRV)
- Breathing rate, inhale/exhale ratio, and breathing waveform
- Facial landmarks, blink detection, and iris tracking
- Confidence and stability indicators

## Platform Support

| Platform | Language | Min Version | Install Method |
|----------|----------|-------------|----------------|
| **iOS** | Swift | iOS 15.0+, Xcode 15+ | Swift Package Manager |
| **Android** | Kotlin / Java | API 26+ (Android 8.0) | JitPack (Gradle) |
| **Linux** | C++ | Ubuntu 22.04 / Mint 21 | Debian package (PPA) |

> **Note:** macOS and Windows C++ support is planned but not yet publicly available. Python, Java, and JavaScript can use the C++ SDK on Linux via language bridges (see guides below).

## 1. Get Your API Key

1. Go to [physiology.presagetech.com](https://physiology.presagetech.com)
2. Click **Register** and create an account
3. Verify your email
4. Log in and copy your **API Key** from the dashboard

API keys are for development and testing. For production mobile apps, use [OAuth 2.0 authentication](https://github.com/Presage-Security/SmartSpectra/blob/main/docs/authentication.md).

## 2. Choose Your Platform

Each guide walks you from zero to a running hello-world app:

### Native SDKs

- **[Swift (iOS)](/docs/quickstart-swift)** — SwiftUI app with live camera preview and vital signs
- **[Kotlin (Android)](/docs/quickstart-kotlin)** — Android app with SmartSpectraView widget
- **[C++ (Linux)](/docs/quickstart-cpp)** — Terminal app with OpenCV HUD on Ubuntu

### C++ SDK via Language Bridges (Linux only)

These guides install the C++ SDK on Ubuntu and call it from your preferred language:

- **[Python (Linux)](/docs/quickstart-python)** — `ctypes` bridge to the C++ SDK
- **[Java (Linux)](/docs/quickstart-java)** — JNI bridge to the C++ SDK
- **[JavaScript (Linux)](/docs/quickstart-javascript)** — Node.js native addon wrapping the C++ SDK

## Measurement Modes

SmartSpectra supports two modes on all platforms:

- **Spot**: Single measurement for a set duration (20–120 seconds). Good for one-time readings.
- **Continuous**: Ongoing measurement with live pulse/breathing display and trace plots. Runs until stopped.

## Camera Requirements

- Front-facing camera recommended (rear camera works at greater distances)
- Hold phone 1–2 ft from face, or mount camera 3–5 ft away
- Minimum 60 lux lighting (moderate indoor lighting)
- Minimal motion improves accuracy, but moderate movement is tolerated
- 30–60 seconds for a complete spot measurement

## SDK Source Code

The full SDK source is on GitHub:

```bash
git clone https://github.com/Presage-Security/SmartSpectra.git
```

**Important:** The repository uses Git LFS for binary files. After cloning:

```bash
git lfs install
git lfs pull
```

## Support

- **GitHub Issues**: [github.com/Presage-Security/SmartSpectra/issues](https://github.com/Presage-Security/SmartSpectra/issues)
- **Email**: support@presagetech.com
- **Discord**: [discord.gg/presage](https://discord.com/invite/K7KNmuX7KT)
