Skip to content

Commit ac073cf

Browse files
authored
docs(ecosystem): add DRZL to ecosystem (#1501)
1 parent eb93f33 commit ac073cf

2 files changed

Lines changed: 44 additions & 1 deletion

File tree

ark/docs/content/docs/ecosystem/index.mdx

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,46 @@ console.log(env.HOST) // (property) HOST: string
2626
console.log(env.PORT) // (property) PORT: number
2727
console.log(env.NODE_ENV) // (property) NODE_ENV: "development" | "production" | "test"
2828
```
29+
30+
### DRZL
31+
32+
[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.
33+
34+
```ts
35+
// @noErrors
36+
// drzl.config.ts
37+
import { defineConfig } from "@drzl/cli/config"
38+
39+
export default defineConfig({
40+
schema: "src/db/schemas/index.ts",
41+
outDir: "src/api",
42+
generators: [
43+
// 1) ArkType validators
44+
{ kind: "arktype", path: "src/validators/arktype", schemaSuffix: "Schema" },
45+
46+
// 2) Routers (oRPC adapter), reusing ArkType schemas
47+
{
48+
kind: "orpc",
49+
template: "@drzl/template-orpc-service",
50+
includeRelations: true,
51+
outputHeader: { enabled: true },
52+
validation: {
53+
useShared: true,
54+
library: "arktype",
55+
importPath: "src/validators/arktype",
56+
schemaSuffix: "Schema"
57+
}
58+
},
59+
// 3) Typed services (Drizzle-aware or stub)
60+
{
61+
kind: "service",
62+
path: "src/services",
63+
dataAccess: "drizzle", // or 'stub'
64+
dbImportPath: "src/db/connection",
65+
schemaImportPath: "src/db/schemas"
66+
}
67+
]
68+
})
69+
```
70+
71+
> For more details, see the [Getting Started guide](https://use-drzl.github.io/drzl/guide/getting-started.html).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"title": "Ecosystem",
33
"icon": "New",
4-
"pages": ["[ArkEnv](/docs/ecosystem#arkenv)"]
4+
"pages": ["[ArkEnv](/docs/ecosystem#arkenv)", "[DRZL](/docs/ecosystem#drzl)"]
55
}

0 commit comments

Comments
 (0)