Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions ark/docs/content/docs/ecosystem/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).
```
2 changes: 1 addition & 1 deletion ark/docs/content/docs/ecosystem/meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"title": "Ecosystem",
"pages": ["[ArkEnv](/docs/ecosystem#arkenv)"]
"pages": ["[ArkEnv](/docs/ecosystem#arkenv)", "[DRZL](/docs/ecosystem#drzl)"]
}
Loading