diff --git a/ark/docs/content/docs/ecosystem/index.mdx b/ark/docs/content/docs/ecosystem/index.mdx index 191626017f..150b18833e 100644 --- a/ark/docs/content/docs/ecosystem/index.mdx +++ b/ark/docs/content/docs/ecosystem/index.mdx @@ -26,3 +26,46 @@ console.log(env.HOST) // (property) HOST: string console.log(env.PORT) // (property) PORT: number console.log(env.NODE_ENV) // (property) NODE_ENV: "development" | "production" | "test" ``` + +### DRZL + +[DRZL](https://use-drzl.github.io/drzl) is zero-friction codegen for Drizzle ORM, tailored for ArkType developers. It analyzes your Drizzle schemas and generates ArkType validation schemas, services, and routers—eliminating boilerplate and ensuring seamless type safety between your database and application layers. + +```ts +// @noErrors +// drzl.config.ts +import { defineConfig } from "@drzl/cli/config" + +export default defineConfig({ + schema: "src/db/schemas/index.ts", + outDir: "src/api", + generators: [ + // 1) ArkType validators + { kind: "arktype", path: "src/validators/arktype", schemaSuffix: "Schema" }, + + // 2) Routers (oRPC adapter), reusing ArkType schemas + { + kind: "orpc", + template: "@drzl/template-orpc-service", + includeRelations: true, + outputHeader: { enabled: true }, + validation: { + useShared: true, + library: "arktype", + importPath: "src/validators/arktype", + schemaSuffix: "Schema" + } + }, + // 3) Typed services (Drizzle-aware or stub) + { + kind: "service", + path: "src/services", + dataAccess: "drizzle", // or 'stub' + dbImportPath: "src/db/connection", + schemaImportPath: "src/db/schemas" + } + ] +}) + +> For more details, see the [Getting Started guide](https://use-drzl.github.io/drzl/guide/getting-started.html). +``` diff --git a/ark/docs/content/docs/ecosystem/meta.json b/ark/docs/content/docs/ecosystem/meta.json index 1a02283096..ffc0ab3c70 100644 --- a/ark/docs/content/docs/ecosystem/meta.json +++ b/ark/docs/content/docs/ecosystem/meta.json @@ -1,4 +1,4 @@ { "title": "Ecosystem", - "pages": ["[ArkEnv](/docs/ecosystem#arkenv)"] + "pages": ["[ArkEnv](/docs/ecosystem#arkenv)", "[DRZL](/docs/ecosystem#drzl)"] }