Documentation & Architecture

System architecture, statistical methodologies, cryptographic privacy, and data ingestion specifications.

Local-First WebAssembly Architecture

Client-Side Pyodide Worker

All heavy statistical modeling, matrix factorizations, and linear regressions execute entirely within dedicated background WebWorkers running Pyodide (CPython compiled to WebAssembly). Raw biometric and environmental data never leave your browser for analysis.

Dexie IndexedDB Storage

Measurements and studies are cached in browser-local IndexedDB with optimistic offline mutations. Changes synchronize bidirectionally with optional backend endpoints or peer browser nodes via WebRTC.

Statistical Analytics & Algorithms

Correlation Models

Pearson linear (r) and Spearman rank (ρ) coefficients with two-tailed p-value hypothesis testing (statMath.ts).

Time-Lag Windows

Continuous lead-lag cross-correlation offsets ranging from -48h to +48h to identify delayed physiological or environmental responses.

Decomposition & Causal

Loess STL time-series decomposition into trend, seasonal, and residual components, plus Granger vector autoregression for causality scoring.

Methodological Guardrails:

Studies report Benjamini-Hochberg False Discovery Rate (FDR) corrections for multi-stream hypotheses to prevent p-hacking and spurious associations.

Cryptographic Privacy & Federated Research

AES-256 BYOK Storage

All credentials, OAuth tokens, and patient identifiers are encrypted client-side using Sodium / Web Crypto AES-256-GCM prior to storage.

SMPC Masking

Federated studies utilize Secure Multi-Party Computation with zero-sum peer noise vectors. When aggregated across the quorum, noise masks sum to zero.

Differential Privacy

Calibrated Laplace and Gaussian perturbation mechanisms ensure rigorous (ε, δ)-differential privacy guarantees for multi-center research cohorts.

Telemetry Ingestion & Hardware Support

Apple Health Streaming export.xml parser via WebWorker.
Garmin Connect Binary .FIT protocol parser with cadence & HR.
Bluetooth LE Web Bluetooth GATT 0x180D (HR) & 0x181A.
Open-Meteo Historical solar, temperature, AQI & pressure.