From b7223496be0822019cbbf6c099a5364e50287159 Mon Sep 17 00:00:00 2001 From: omar-dulaimi Date: Wed, 10 Sep 2025 09:45:38 +0300 Subject: [PATCH 1/2] docs(ecosystem): add DRZL to ecosystem --- ark/docs/content/docs/ecosystem/index.mdx | 42 +++++++++++++++++++++++ ark/docs/content/docs/ecosystem/meta.json | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/ark/docs/content/docs/ecosystem/index.mdx b/ark/docs/content/docs/ecosystem/index.mdx index 191626017..8d71f2d9f 100644 --- a/ark/docs/content/docs/ecosystem/index.mdx +++ b/ark/docs/content/docs/ecosystem/index.mdx @@ -26,3 +26,45 @@ 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 +// 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 1a0228309..ffc0ab3c7 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)"] } From b63d53109399d6ceee89149fd5ba43c927444dbc Mon Sep 17 00:00:00 2001 From: omar-dulaimi Date: Wed, 10 Sep 2025 19:49:54 +0300 Subject: [PATCH 2/2] docs(ecosystem): suppress expected TypeScript errors in DRZL code sample --- ark/docs/content/docs/ecosystem/index.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/ark/docs/content/docs/ecosystem/index.mdx b/ark/docs/content/docs/ecosystem/index.mdx index 8d71f2d9f..150b18833 100644 --- a/ark/docs/content/docs/ecosystem/index.mdx +++ b/ark/docs/content/docs/ecosystem/index.mdx @@ -32,6 +32,7 @@ console.log(env.NODE_ENV) // (property) NODE_ENV: "development" | "production" | [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"