Skip to main content
ChameleonDB Logo

Welcome to ChameleonDB

ChameleonDB is a schema-governed database platform that treats schemas as first-class, immutable artifacts with explicit integrity guarantees. Unlike traditional databases that treat schema evolution as an auxiliary concern, ChameleonDB governs schemas at runtime through versioning, cryptographic integrity, and explicit operational modes.

The Problem

Modern database systems enforce strong guarantees over data but treat schema evolution informally:
  • Schema drift happens silently over time
  • Migration failures leave databases in unknown states
  • Authority for schema changes is implicit, not enforced
  • Audit trails are external, incomplete, or missing
  • Rollback is manual and error-prone

The ChameleonDB Solution

Schema Vault

Versioned, hash-verified schema storage with cryptographic integrity. Every migration creates an immutable snapshot with SHA256 verification.

Integrity Modes

Unix-style protection rings for schema governance. Ring-based modes (readonly/standard/privileged/emergency) enforce explicit authority.

Complete Audit Trail

Append-only integrity log that never gets deleted. Track every schema change with timestamps, authors, and parent versions.

Zero-Config

Auto-initialization on first migrate. No complex setup required - just define your schema and run.

Quick Example

1

Define your schema

Create versioned and hash-verified schemas:
schema.cham
entity User {
    id: uuid primary,
    email: string unique,
    name: string,
    posts: [Post] via author_id,
}

entity Post {
    id: uuid primary,
    title: string,
    content: string,
    published: bool,
    author_id: uuid,
    author: User,
}
2

Initialize with zero config

Auto-creates Schema Vault:
chameleon init                  # Creates .chameleon/vault/
chameleon migrate --apply       # Registers v001, applies migration
3

Schema Vault tracks everything

Every change is tracked:
.chameleon/vault/
├── manifest.json       # Current version + history
├── integrity.log       # Append-only audit trail
├── versions/
   ├── v001.json      # Immutable snapshot
   └── v002.json
└── hashes/
    ├── v001.hash      # SHA256 verification
    └── v002.hash

What You Get

  • Immutable schema versions — Tamper-proof with SHA256 hashing
  • Integrity verification — Automatic checks before every operation
  • Explicit governance — Ring-based modes (readonly/standard/privileged/emergency)
  • Complete audit trail — Append-only log, never deleted
  • Zero-config vault — Auto-initializes on first migrate
  • Password-protected upgrades — Mode escalation requires auth
  • Migration recovery — Retry failed migrations automatically

Get Started

Key Features

Schema Vault (v1.0)

Versioned, immutable schema storage with cryptographic integrity:
# Every migration creates a new version
$ chameleon migrate --apply

📦 Registering new schema version...
 Registered as v002 (hash: 7d4e1c2a...)
 Parent: v001

 Migration applied successfully
 Schema v002 locked in vault
Use chameleon journal schema to view your complete version history with hashes, dates, authors, and changes.

Integrity Modes (v1.0)

Unix-style protection rings for schema governance:
ModeRingUse CaseSchema Changes
readonlyR3Production (default)❌ Blocked
standardR2Development teams✅ Controlled
privilegedR1DBAs✅ Direct (logged)
emergencyR0Incident recovery✅ No checks (audited)
# Default mode: readonly (schema locked)
$ chameleon migrate --apply
 readonly mode: schema modifications blocked

# Upgrade to allow schema changes
$ chameleon config set mode=standard
🔐 Enter mode password: ****
 Mode upgraded to standard

# Now migrations are allowed
$ chameleon migrate --apply
 Migration applied successfully
Mode upgrades require password authentication to prevent unauthorized schema changes in production.

Query System (v1.0)

Graph-oriented, type-safe queries with field projection:
// Query only the fields you need
users := db.Query("User").
    Select("id", "name", "email").  // Partial selection
    Filter("age", "gt", 25).
    Include("posts").                // Eager load (no N+1)
    Execute(ctx)

// Debug mode (see generated SQL)
users := db.Query("User").
    Select("id", "name").
    Filter("email", "like", "ana").
    Debug().
    Execute(ctx)

// Output:
// [SQL] Query User
// SELECT id, name FROM users WHERE email LIKE '%ana%'
// [TRACE] Query on User: 2.3ms, 3 rows

IdentityMap (v1.0)

Automatic object deduplication in memory:
// Without IdentityMap (wasteful)
// If User has 100 posts, User object is duplicated 100 times in memory

// With IdentityMap (efficient)
result := db.Query("User").
    Include("posts").
    Execute(ctx)

// User object appears only once
// All 100 posts reference the same User instance
// Memory savings: ~99% for large result sets
IdentityMap is automatically enabled for all Include queries with zero configuration required.

Why ChameleonDB?

vs Traditional Databases

Traditional DBChameleonDB
❌ Schema drift over time✅ Immutable, versioned schemas
❌ Informal governance✅ Explicit Integrity Modes
❌ No tamper detection✅ SHA256 hash verification
❌ External audit logs✅ Built-in integrity log
❌ Manual rollback✅ Version-based recovery

Key Differentiators

  1. Schema as First-Class Artifact: Versioned, immutable, hash-verified
  2. Runtime Governance: Integrity Modes enforced by the system
  3. Zero-Config Vault: Auto-initializes, works out of the box
  4. Complete Audit Trail: Append-only, never deleted
  5. Explicit Authority: Mode upgrades require password

Current Status

ChameleonDB v1.0-alpha is now available for early adopters. Your feedback shapes the product.

Available Now (v1.0-alpha)

Schema Governance:
  • ✅ Schema Vault (versioned, hash-verified)
  • ✅ Integrity Modes (readonly/standard/privileged/emergency)
  • ✅ Password-protected mode upgrades
  • ✅ Automatic integrity verification
  • ✅ Append-only audit trail
  • ✅ Migration recovery (retry failed migrations)
Query System:
  • ✅ Schema parser and type checker
  • ✅ Query builder with filters
  • ✅ Field projection (.Select())
  • ✅ Eager loading (.Include())
  • ✅ Nested includes
  • ✅ IdentityMap (object deduplication)
  • ✅ Debug mode (.Debug())
Tooling:
  • ✅ CLI tools (init, migrate, verify, status)
  • ✅ Rich error messages with suggestions
  • ✅ PostgreSQL migration generator
  • ✅ Database introspection (PostgreSQL)
  • ✅ 300+ tests (unit + integration)

Coming Soon

  • v1.1 (March 2026): Schema Vault rollback, Transaction support, Batch operations
  • v1.2+ (Q2 2026): Additional backends (MySQL, DuckDB), Code generation, Multi-language support
  • v1.5+ (2027): ML-based query optimization, Visual schema editor, Distributed vault

Community & Support


Built with ❤️ for developers who care about schema integrity