Overview
Farming Labs ORM lets you write your storage layer once, then handles the translation across databases and ORM stacks underneath.
Library authors and framework authors can keep one schema definition and one storage-facing API while letting each app choose how that gets generated or executed.
The model is simple:
- Define a schema in
@farming-labs/orm - Generate Prisma, Drizzle, or SQL artifacts with
@farming-labs/orm-cli - Run the same typed API through a runtime driver
In practice, that means:
- one storage layer for shared packages
- one typed ORM and query surface for runtime code
- one schema definition that can translate across databases and ORM stacks
- one generator CLI for app-side artifacts
Built for how you ship
One schema, one query API, and generators that match each app’s stack—without forking your data model.
Unified schema
Models, fields, and relations in one TypeScript contract—shared by generators and every runtime driver.
View docs
Generator-first CLI
farm-orm emits Prisma, Drizzle, or SQL from the same sources so each app keeps its preferred stack.
View docs
One query API
Swap memory, Prisma, Drizzle, SQL pools, or Mongo without rewriting call sites—the same typed surface everywhere.
View docs
Who it's for
Auth and billing libraries, internal platforms, and any kit that needs one schema story across many ORMs.
View docs
Start here
How is this guide?