Trust but verify
at every boundary

Stop bad data at ingest, between stages, and on the way out — before your warehouse, reverse ETL, partners, or AI agents.

Rust-native · p99 0.93 µs
·
1,547,368 events/sec, one thread
·
Reject · quarantine · replay
·
REST API · Python & TypeScript SDKs · Dashboard
·
DataContractGate — Trust but verify at every boundary

Run it locally in 10 minutes

Docker with Compose, and make. No Supabase account, no API key, and no sign-up. The dashboard opens at http://localhost:3000 with starter contracts and a live event stream.

# about a minute the first time, then the Docker cache
git clone https://github.com/nightmoose/contractgate.git
cd contractgate
make demo
0.93µs
passing p99, in-process, one thread
1,547,368
events/sec, in-process, one thread
3+
pipeline boundaries — ingest, mid-stream, egress
1x
YAML contract defines the entire schema

In-process engine numbers on the recorded host. Bench README

Define once. Enforce everywhere.

The same contract engine can sit at ingest, between stages, and on egress. Bad payloads get rejected or quarantined before they cross that boundary. Keep the dbt, Great Expectations, and Soda tests you already run after modeling — those check your logic; DataContractGate checks the data at the edges. See the interactive pipeline map →

1

Define your contract

Upload sample payloads — the contract writes itself. DataContractGate ingests your real event samples and infers field types, value ranges, enums, cardinality, freshness constraints, and PII markers automatically. Review, tweak, and promote. Teams who want full control can also author YAML directly and version it alongside their code.

✦ Auto-generated from 3 sample payloads
# inferred by DataContractGate — edit & promote
contract:
  id: payment_processed  v1.4
  fields:
    - name: user_id
      type: string  required: true
      pattern: "^usr_[a-z0-9]{16}$"  # inferred
    - name: amount_usd
      type: number  min: 0.01  max: 50000  # inferred
    - name: currency
      type: enum  values: [USD, EUR, GBP]  # inferred
    - name: timestamp
      type: iso8601  max_age: 5m  # freshness gate
    - name: card_last4
      type: string  pii: mask  # PII — auto-detected
2

Deploy the gateway

Point your producers at the DataContractGate ingest endpoint. Every event is validated against the promoted contract version before touching storage.

# Python SDK
pip install contractgate

# REST ingest
POST /v1/ingest/{contract_id}

# TypeScript SDK
npm install @nightmoose/contractgate-sdk

# No producer code? Zapier
DataContractGate → Validate Record
3

Reject, quarantine & replay

Passing events flow downstream. Failures stay in quarantine with the failure and the reason. Replay and bulk replay are included on Self-Hosted Free, Pro, and Enterprise.

✓ PASS → events.clean

✗ FAIL → events.quarantine
  + violation report

POST /quarantine/:id/replay
# re-validate after fix
Live pipeline — events in, semantics enforced
Your producer
app / service / SDK / Zapier
any format
→
DataContractGate
Rust · p99 0.93 µs, in-process
validates here
→
Downstream storage
warehouse · lake · AI
clean only
Quarantine
+ violation details
violations

Every team that moves data needs this

Bad data is a $12.9B/year problem for US enterprises alone. DataContractGate stops it at the source.

🤖

AI / ML training pipelines

Bad training data poisons models silently. DataContractGate ensures every event feeding your feature store meets the semantic contract your ML team defined — before it corrupts a training run.

Feature store Training data Label quality MLOps
💳

Financial event streams

A single malformed transaction amount can cascade through an entire ledger. Enforce amount ranges, currency codes, and account ID patterns at ingestion — with full audit trail for compliance.

Payments Ledger integrity Compliance audit PCI
🏥

Healthcare & life sciences

HIPAA-covered fields need to be identified, masked, or hashed before reaching storage. DataContractGate's PII transform rules enforce this automatically on every inbound record.

HIPAA PII masking HL7 / FHIR EHR ingestion
🛒

E-commerce & product analytics

Clickstream events silently drop required fields when clients update. Catch the regression in real time — not three days later when the A/B test results make no sense.

Clickstream A/B testing Analytics SDK contracts

Built for the hot path

Post-modeling tests (dbt, Great Expectations, Soda) check your logic after processing. DataContractGate verifies payloads as they cross boundaries — so the gate has to be fast enough not to matter on the hot path.

🦀 Rust-native core

Zero-cost validation

The validation engine is written in pure Rust. Regexes compile once at contract load time. No GC pauses. No JVM warmup. Passing p99 is 0.93 µs, and throughput is 1,547,368 events/sec, in-process on one thread on the recorded host. Bench README.

⚙️ Patent pending

Semantic enforcement

Unlike JSON Schema or Avro, DataContractGate validates meaning — not just shape. An amount field with a negative value is wrong even if the type is correct.

🔒 RFC-004 PII transforms

Policy-as-contract

Declare PII fields in the contract YAML. DataContractGate automatically hashes, masks, or drops them before storage — per-contract, with format-preserving options for analytics.

🔌 API, SDKs & dashboard

Fits your existing stack

Call POST /v1/ingest or POST /egress/{contract_id} directly or through the Python and TypeScript SDKs. Contracts, versions, quarantine and replay are managed in the dashboard. Kafka and Kinesis streaming ingress is available on request on Enterprise plans.

🔄 Quarantine & replay

Nothing is lost

Failed events stay in quarantine with the failure and the reason. Replay and bulk replay are included on Self-Hosted Free, Pro, and Enterprise.

📐 Semantic versioning

Safe contract evolution

Contracts go through draft → stable → deprecated lifecycle. Producers can pin to a specific version or always track stable — with full version history and promotion audit.

AISchemaGate: the same gate for LLM output

AISchemaGate validates the JSON an LLM or AI agent returns against a semantic contract before your code acts on it. It runs on the DataContractGate backend and uses the same account, API keys and dashboard.

Contracts from real outputs

Infer a contract from 5–20 known-good JSON outputs, then tighten enums, ranges, patterns and required fields.

A gate after the model call

The Python and TypeScript SDKs pull the JSON out of OpenAI, Anthropic, vLLM or Ollama responses and validate it. A pass returns the sanitized payload; a failure returns the violations.

Bounded auto-repair

With auto-repair on, the model gets the violations back as a re-prompt, up to a bounded retry budget. Non-streaming responses only in v1.

Visit aischemagate.com →

Start free. Scale without surprises.

Enterprise teams get dedicated deployments and custom SLAs.

Open Source
Self-Hosted Free
Run it yourself, forever
Free
you run it; paid gates open
  • ✓ Unlimited (local) Events validated / month
  • ✓ Unlimited Active contracts
  • ✓ Unlimited Contract versions
  • ✓ Ingest API
  • ✓ Playground (test without save)
  • ✓ Local Postgres Audit log retention
  • ✓ Local Docker demo
  • ✓ Batch ingest
Get the repo
Cloud Free
Explore & prototype
$0
  • ✓ 100K Events validated / month
  • ✓ 3 Active contracts
  • ✓ 3 per contract Contract versions
  • ✓ Ingest API
  • ✓ Playground (test without save)
  • ✓ 7 days Audit log retention
  • ✓ Local Docker demo
Start free
Enterprise
Scale without limits
Custom
contact us
  • ✓ Unlimited Events validated / month
  • ✓ Unlimited Active contracts
  • ✓ Unlimited Contract versions
  • ✓ Ingest API
  • ✓ Playground (test without save)
  • ✓ Custom Audit log retention
  • ✓ Local Docker demo
  • ✓ Batch ingest
Talk to us

Quarantine on every plan

Self-Hosted Free quarantine is local, with no row cap. Cloud Free keeps failure details, up to 50,000 held, for 7 days. Pro keeps record bodies, with replay and bulk replay, for 90 days. Enterprise retention is custom.

Quarantine and replay by DataContractGate plan
Feature Self-Hosted Free Cloud Free Pro Enterprise
Quarantine Local, no row cap Failure details, up to 50,000 held, 7 days Record bodies, replay and bulk replay, 90 days Custom retention
Replay & bulk replay Included Not included Included Included

Questions about quarantine

What does Cloud Free quarantine include?

Failure details, up to 50,000 held, for 7 days.

Which plans include replay and bulk replay?

Self-Hosted Free, Pro, and Enterprise. Cloud Free does not.

Shape DataContractGate's roadmap

We're looking for 5–8 advisory users — data engineers and platform leads who've fought bad events in production. Free access, async-only, no sales call required.

  • ✓ Free Pro-tier access for the advisory period
  • ✓ Direct input on the feature roadmap
  • ✓ ~1–2 hours total, mostly async on Slack
  • ✓ Bring a redacted payload — we'll run it live

Request early access

Sales & pilot materials

One-pagers and decks for outbound, pilots, and stakeholder share-outs. All files live under /marketing/ on this site.

For AI coding agents
Set it up by pasting this into Claude, Cursor, or Codex

The playbook is written for the agent, not for you. It finds your event shape, infers a contract from real samples, deploys it, wires your producer to the gateway, and verifies with a dry run before anything is written.

https://datacontractgate.com/llm-integration.md
https://github.com/nightmoose/contractgate

implement this in my repo
Read the playbook →
Tool
ODCS generator
JSON or CSV sample to ODCS v3.1 and DataContractGate YAML
Guide
Ingest vs warehouse tests
DataContractGate alongside Great Expectations, Soda, and dbt tests
Guide
OpenMetadata
Enforce catalog contracts at ingestion and publish results back
Guide
ODCS + CsvPath
One ODCS v3.1 contract for batch files and live events
PDF
Product one-pager
Leave-behind for data & platform teams
PDF
2-week pilot offer
Design partner scope & success metrics
PNG
Competitive comparison
vs GE, Soda, Monte Carlo, Schema Registry
Live
Playground
Validate sample events in the browser — or run the full demo locally in Docker