# Integrations
URL: /docs/integrations
LLM index: /llms.txt
Description: How Farming Labs ORM fits into Prisma, Drizzle, Kysely, MikroORM, TypeORM, Sequelize, EdgeDB / Gel, Neo4j, SurrealDB, Cloudflare D1, Cloudflare KV, Redis / Upstash, SQL-first, Supabase, Xata, Firestore, DynamoDB, Unstorage, and MongoDB-oriented workflows.

# Integrations

Farming Labs ORM lets a package or app write its storage layer once, then run it
through the actual database or ORM stack the app already owns.

That usually means:

1. define one schema with `@farming-labs/orm`
2. generate app-facing artifacts when a stack wants them
3. run the unified query/runtime layer against the real client the app passes in

So instead of building one adapter for Prisma, another for Drizzle, another for
Kysely, another for MongoDB, and another for Firestore, the package can keep
one storage contract and let the runtime layer handle the translation.

If you want the exact support answer, use the
[Support Matrix](/docs/integrations/support-matrix). This page is the simpler
overview.

## Integration families

### Generation-first SQL stacks

Use these when the app wants generated artifacts:

- Prisma generation
- Drizzle generation
- safe SQL generation

These are the right fit when the app already wants `schema.prisma`, generated
Drizzle tables, or plain SQL DDL files as part of its own workflow.

### Runtime-first SQL and graph stacks

Use these when the app already owns a live relational client:

- Prisma
- Drizzle
- Kysely
- MikroORM
- TypeORM
- Sequelize
- EdgeDB / Gel
- Neo4j
- SurrealDB
- Cloudflare D1
- Xata
- direct SQL clients

This is the path for package authors who want to accept a raw client and keep
the higher-level storage logic unchanged.

### PostgreSQL platforms

Hosted PostgreSQL platforms such as Supabase can fit through either the raw
PostgreSQL layer or the direct Supabase JS client runtime.

That means the same schema can still power:

- generated Prisma / Drizzle / SQL output
- live ORM queries through a PostgreSQL client or a Supabase client
- setup helpers when the app chooses the PostgreSQL path

### Document and key-value runtimes

Farming Labs ORM also supports document and key-value style runtimes when the
app is not SQL-first:

- MongoDB
- Mongoose
- Cloudflare KV
- Redis / Upstash Redis
- Firestore
- DynamoDB
- Unstorage

These runtimes still keep the same schema and query API shape, but they rely
more heavily on fallback relation loading and ORM-managed lookup behavior rather
than native SQL joins.

Two important boundaries:

- Firestore, Cloudflare KV, Redis, and Unstorage do not have SQL-style schema
  push, so setup helpers are intentionally no-op there
- Unstorage is useful for lightweight records, sessions, tokens, and
  package-owned state, but it is not the recommended runtime for highly
  relational or join-heavy workloads

## What “supported” means

When a runtime is supported here, the unified ORM API already translates into
real calls for that stack.

Examples:

- `@farming-labs/orm-prisma` translates into Prisma delegate calls
- `@farming-labs/orm-drizzle` translates into Drizzle-backed queries
- `@farming-labs/orm-kysely` translates into Kysely-backed queries
- `@farming-labs/orm-mikroorm` translates into MikroORM-backed relational operations
- `@farming-labs/orm-sql` translates into direct SQL operations
- `@farming-labs/orm-typeorm` translates into TypeORM-backed relational operations
- `@farming-labs/orm-sequelize` translates into Sequelize-backed relational operations
- `@farming-labs/orm-edgedb` translates into Gel SQL-backed relational operations
- `@farming-labs/orm-neo4j` translates into Neo4j-backed graph/document operations through the shared ORM surface
- `@farming-labs/orm-surrealdb` translates into SurrealDB-backed multi-model operations through the official client
- `@farming-labs/orm-d1` translates into Cloudflare D1 binding operations
- `@farming-labs/orm-kv` translates into Cloudflare KV namespace operations
- `@farming-labs/orm-redis` translates into Redis and Upstash-compatible key-value operations
- `@farming-labs/orm-supabase` translates into direct Supabase table API operations
- `@farming-labs/orm-xata` translates into Xata-backed SQL operations through the official client
- `@farming-labs/orm-firestore` translates into Firestore document operations
- `@farming-labs/orm-dynamodb` translates into DynamoDB document / key-value operations
- `@farming-labs/orm-unstorage` translates into Unstorage-backed key-value operations
- `@farming-labs/orm-mongo` and `@farming-labs/orm-mongoose` translate into MongoDB-oriented document operations

## Guides

<HoverLink
  href="/docs/integrations/prisma"
  title="Prisma"
  description="See how Farming Labs ORM generates Prisma schema output and translates the unified runtime into a real PrismaClient."
  linkLabel="Open Prisma guide"
>
  Prisma integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/drizzle"
  title="Drizzle"
  description="Learn how generated Drizzle schema files and the live Drizzle runtime fit into PostgreSQL, MySQL, and SQLite apps."
  linkLabel="Open Drizzle guide"
>
  Drizzle integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/kysely"
  title="Kysely"
  description="See how a real Kysely instance can power the unified Farming ORM runtime without changing library-level storage code."
  linkLabel="Open Kysely guide"
>
  Kysely integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/mikroorm"
  title="MikroORM"
  description="See how a real MikroORM instance or EntityManager can power the unified Farming ORM runtime without rewriting package-level storage code."
  linkLabel="Open MikroORM guide"
>
  MikroORM integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/typeorm"
  title="TypeORM"
  description="See how a real TypeORM DataSource can power the unified Farming ORM runtime without rewriting package-level storage code."
  linkLabel="Open TypeORM guide"
>
  TypeORM integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/sequelize"
  title="Sequelize"
  description="See how a real Sequelize instance can power the unified Farming ORM runtime without rewriting package-level storage code."
  linkLabel="Open Sequelize guide"
>
  Sequelize integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/sql-databases"
  title="SQL Databases"
  description="Explore the direct SQL runtime, safe SQL generation, and the PostgreSQL, MySQL, and SQLite runtime matrix."
  linkLabel="Open SQL guide"
>
  SQL integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/edgedb"
  title="EdgeDB / Gel"
  description="See how Farming Labs ORM uses the official Gel SQL client as a runtime bridge without replacing the app's own Gel schema workflow."
  linkLabel="Open EdgeDB guide"
>
  EdgeDB integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/neo4j"
  title="Neo4j"
  description="See how Farming Labs ORM uses the official Neo4j driver or session while keeping one schema and one storage layer."
  linkLabel="Open Neo4j guide"
>
  Neo4j integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/surrealdb"
  title="SurrealDB"
  description="See how Farming Labs ORM uses the official SurrealDB client while keeping one schema, one runtime surface, and one storage layer."
  linkLabel="Open SurrealDB guide"
>
  SurrealDB integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/cloudflare-d1"
  title="Cloudflare D1"
  description="See how Farming Labs ORM uses a worker-native D1 binding while keeping one schema and one storage layer."
  linkLabel="Open D1 guide"
>
  Cloudflare D1 integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/cloudflare-kv"
  title="Cloudflare KV"
  description="See how Farming Labs ORM uses a worker-native KV namespace while keeping one schema and one storage layer."
  linkLabel="Open Cloudflare KV guide"
>
  Cloudflare KV integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/redis"
  title="Redis / Upstash Redis"
  description="See how Farming Labs ORM uses one key-value runtime family for Redis and Upstash without a separate adapter surface."
  linkLabel="Open Redis guide"
>
  Redis integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/supabase"
  title="Supabase"
  description="See how Farming Labs ORM works with both raw PostgreSQL connections to Supabase and direct Supabase JS clients."
  linkLabel="Open Supabase guide"
>
  Supabase integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/xata"
  title="Xata"
  description="See how Farming Labs ORM uses the official Xata client while keeping one schema, one setup path, and one storage layer."
  linkLabel="Open Xata guide"
>
  Xata integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/firestore"
  title="Firestore"
  description="See how Farming Labs ORM translates one schema and one storage layer into Firebase / Firestore server-side workflows."
  linkLabel="Open Firestore guide"
>
  Firestore integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/dynamodb"
  title="DynamoDB"
  description="See how Farming Labs ORM translates one schema and one storage layer into AWS DynamoDB without a separate adapter stack."
  linkLabel="Open DynamoDB guide"
>
  DynamoDB integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/unstorage"
  title="Unstorage"
  description="See how Farming Labs ORM translates one schema and one storage layer into Unstorage-backed key-value workflows, with clear limits around relational workloads."
  linkLabel="Open Unstorage guide"
>
  Unstorage integration
</HoverLink>

<span>·</span>

<HoverLink
  href="/docs/integrations/mongodb"
  title="MongoDB"
  description="See how the native MongoDB and Mongoose runtimes translate the unified query layer into document-database operations."
  linkLabel="Open MongoDB guide"
>
  MongoDB integration
</HoverLink>