Skip to content

Technical Documentation

Manech Dubreil edited this page Oct 16, 2026 · 3 revisions

Technical Documentation

Technical documentation for the implementation of Transf-ORM-CLI — this page and the ones it links to only describe what exists in the code.

Contents

Page What it covers
Architecture The 6-layer design, what's implemented vs. planned, module dependency graph
Pivot IR The Pivot IR in depth — every type, the DB/ORM layer split, relations, metadata, serialization, with Mermaid diagrams
Importers The Importer trait, the list of available importers, and how to add a new one
Prisma Importer The Prisma importer's PEG → AST → resolve pipeline, behavior detection and its known limitations
CLI The transf-orm binary: --cli / --serveur modes, global flags, the convert command, ORM detection, and the registry module
Testing How to run the test suite, CI quality gates, and the fixture-based testing convention

Implementation status

Transf-ORM-CLI has three long-term goals — schema conversion, code generation, and codebase migration:

  • Pivot IR (src/pivot/) — Done: all types, serde, canonical JSON, tests.
  • Prisma importer (src/importer/prisma/) — Done: complete PEG grammar, full attribute coverage, 30+ tests.
  • CLI (crates/transf-orm, crates/cli) — Partial: global flags and --cli / --serveur dispatch are done; only convert is implemented; interactive mode, generate, diff, merge, validate, init, watch, and history are not started.
  • Exporters (src/exporter/) — Not started: trait defined, no implementations.
  • Drizzle importer — Not started.
  • Codemods, versioning/diff/merge — Not started.

See Architecture for how these pieces fit together.

Quick start

cargo build --release
./target/release/transf-orm convert path/to/schema.prisma
# prints the canonical JSON pivot to stdout

Clone this wiki locally