Core InfrastructureLegacy Partner Integrations

Federated Collaboration for Legacy Monoliths

Architectural philosophy and integration building blocks for monolithic state providers (e.g., legacy C#/Java civic systems) seeking secure, decentralized collaboration via Marigold Insights.

The Partner Philosophy: Exploration vs. Verification

Legacy civic technology platforms operate under strict, expensive data constraints. These systems (often built on monolithic databases without public APIs) rightfully guard their PII (Personally Identifiable Information) fiercely.

Marigold Insights is not a data broker; it is an exploration engine. Our architectural philosophy for partner collaboration is strict separation of concerns:

  • Marigold handles the Exploration: We run the mathematically intensive Fellegi-Sunter matching and Standard Deviation anomaly modeling on encrypted representations of the data.
  • The Partner handles the Verification: The partner retains the unencrypted master PII and manages the human workflow (verifying, challenging, or ignoring the anomaly flags).

The Bi-Directional Delta (∆) API

For data providers with deep historical archives (e.g., Elly), transmitting the entire multi-gigabyte historical database for anomaly detection is highly inefficient and violates our lightweight DAIO principles.

Instead, partners must implement the Bi-Directional Delta (∆) API. The partner calculates the structural differences (deltas) between historical files and the current file locally. The partner only transmits the encrypted Z-Score aberrations (the delta) to Marigold for Data Visualization rendering.

This API is intentionally bi-directional but severely restricted. Marigold holds limited write permissions—allowing us to write verification tags or Cartridge execution logs back to the partner's system without granting us root mutation access to the underlying PII.

Building Blocks for Secure Cross-Platform Communication

To establish a secure bridge between a legacy monolith and Marigold Insights, partners must construct an abstraction layer that handles Client-Side Encryption, Anonymous Session Handoff, and Asynchronous Webhooks.

1. Local AES-GCM Encryption (The Air-Gap)

Before any data leaves the partner's secure perimeter, it must be encrypted. If you are unable to use our pre-built Node.js or .NET SDKs, your integration must replicate the following cryptographic flow explicitly:

// Architectural Pseudocode for Legacy C#/Java Enclaves
1. Extract Dataset (ID, Name, DOB, Address) from Monolith SQL.
2. Initialize AES-256-GCM cipher using a Partner-managed Master Key.
3. For each row:
     a. Generate 12-byte random IV (Nonce).
     b. Encrypt PII payload.
     c. Extract 16-byte Authentication Tag.
     d. Construct Encrypted Vault Object: { id, iv, ciphertext, authTag }.
4. Send Encrypted Vault Object over TLS 1.3 to Marigold API.

2. Embedded iFrame / Seamless Dashboard Handoff

The ultimate goal of a partnership integration is to allow the end-user (the volunteer) to seamlessly view Marigold's visual analytics directly inside the partner's existing portal.

Because Marigold relies on encrypted session tokens, partners can use an Anonymous Handoff Token via an iFrame or authenticated redirect.

<!-- Embedded Integration Example -->
<iframe 
  src="https://marigoldinsights.org/embed/task-board?session_token=XYZ123&hide_nav=true" 
  sandbox="allow-scripts allow-same-origin"
  className="w-full h-[800px] border-none"
/>

By passing hide_nav=true and an ephemeral session_token, the user experiences Marigold as a native module of your platform. Marigold will display the visual anomalies (e.g., "Row 101 flags as Commercial Zoning"), and the partner platform retains the mapping of "Row 101" to the actual citizen's plaintext identity.

State Preservation & Synchronization

It is critical that you pass the exact state and dateOfVoterRoll metadata in your initial ingestion payload. Because state voter rolls fluctuate daily, Marigold utilizes this metadata to track historical anomalies across rolling timelines. Without these identifiers, temporal synchronization between our analytical engine and your monolith will drift.