How DevSync Works
An architectural overview of the schema extraction engine, Abstract Syntax Tree (AST) normalization, and read-only preflight execution.
The Drift Problem
In modern software engineering, schema drift occurs when database structures in staging or production diverge from your application code definitions (Prisma models, TypeORM schemas, or SQL files). This leads to runtime application crashes and failed deployments.
Architecture & 3-Step Pipeline
1. Schema AST Extraction
The CLI parses local codebase schema files into a normalized Abstract Syntax Tree (AST), standardizing data types, constraints, and indexes across all supported ORMs.
2. Read-Only Database Inspection
DevSync queries database system catalogs (information_schema) using read-only connections. No write locks or data alterations occur during scanning.
3. Deterministic Diff & Preflight
The engine calculates exact DDL SQL diffs, lock estimates (~240ms), and automated rollback statements for approval before execution.