Quickstart Guide
Set up your local environment, install the core algorithms, and conduct your very first civic data audit using the Marigold Local Compute standard.
Prerequisites & True Zero-Cloud Architecture
Unlike traditional monolithic architecture, Marigold Insights strictly enforces a Zero-Cloud, 100% Local Compute model. We do not expose a REST API for data ingestion, because we refuse to accept your sensitive civic data over the wire.
- Runtime Requirements: You must have Node.js 18+ or a compatible edge runtime (e.g., Cloudflare Workers, Next.js Edge, Bun).
- No Network Egress: Our NPM package executes entirely in your local process using WebAssembly (WASM) and heavily optimized JavaScript. Your data never leaves your infrastructure.
- Open Standards: The core algorithms (Fellegi-Sunter, NCOA anomaly heuristics) are fully open-source and auditable.
The Zero-PII Guarantee
Because everything runs locally, you do not need to hash, salt, or encrypt your Personally Identifiable Information (PII) before analysis. You process the plaintext data directly in your own secure RAM, and the library outputs the flags. No rate limits, no network latency, no data breaches.
Step 1: Installing the Core Engine
To get started, install the @marigold/local-core package into your project. We provide TypeScript definitions out of the box for strict type safety.
1# Install the Marigold Local Compute Engine2npm install @marigold/local-core34# If you are using TypeScript, types are included automatically.
Step 2: Running Your First Audit
Because Marigold operates entirely in your local process, there is no need to chunk payloads, implement exponential backoffs, or manage REST API tokens. You simply pass your dataset array into the engine.
1import { MarigoldEngine, AnomalyType } from '@marigold/local-core';23// Initialize the local engine4const engine = new MarigoldEngine();56// Your local, plaintext dataset (never leaves your RAM)7const localDataset = [8 { id: "ROW_001", address: "123 Main St", density_code: "APT" },9 { id: "ROW_002", address: "123 Main St", density_code: "APT" }10];1112// Execute the audit locally (Synchronous or Async)13const results = engine.detect(localDataset, {14 anomalyType: AnomalyType.HIGH_DENSITY15});1617console.log(`Found ${results.anomalies_found} issues.`);18console.log(results.flags);
Step 3: Scaling Locally
Civic datasets can exceed 10 million rows. While our engine is highly optimized (capable of evaluating ~500k rows/second on a standard M1 Macbook), analyzing massive datasets on a single thread will block the Node.js event loop or the browser UI.
We strongly recommend the Web Worker Strategy for browser implementations, or Worker Threads in Node.js.
Multithreading Support
The @marigold/local-core package includes a pre-compiled WebAssembly (WASM) multithreading module. If you pass { threads: 'auto' } to the engine configuration, it will automatically spawn background workers based on your machine's CPU cores, parallelizing the workload without blocking your main UI.