Modern data layer for TypeScript apps - type-safe ORM, built-in access control, automatic query services
Find a file
Yiming Cao 8ddbfdebdc
feat(orm): add field-level @fuzzy attribute to gate fuzzy search (#2642)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 12:41:09 -07:00
.devcontainer chore: clean up repo merging stale files (#2370) 2026-02-11 11:51:44 +08:00
.github feat(ide): add telemetry tracking to VSCode extension (#2505) 2026-03-21 16:57:09 -07:00
.vscode chore: migrate from tsup to tsdown (#2580) 2026-04-15 12:13:34 -07:00
packages feat(orm): add field-level @fuzzy attribute to gate fuzzy search (#2642) 2026-05-05 12:41:09 -07:00
samples chore: upgrade to TypeScript 6 (#2629) 2026-04-29 20:41:27 -07:00
scripts chore: migrate from tsup to tsdown (#2580) 2026-04-15 12:13:34 -07:00
tests feat(orm): add field-level @fuzzy attribute to gate fuzzy search (#2642) 2026-05-05 12:41:09 -07:00
.coderabbit.yaml chore: fix coderabbit config (#210) 2025-08-26 18:34:56 +08:00
.gitignore refactor: extract client-helpers package, update svelte-query to v6 (#535) 2025-12-27 22:49:19 +08:00
.prettierignore feat: implementing mixin (#106) 2025-07-21 19:48:48 +08:00
.prettierrc merge canary to dev (#181) 2023-01-27 22:31:44 +08:00
BREAKINGCHANGES.md feat(zod): enforce literal true for select/include/omit options + exclude relation fields from makeModelSchema by default + add "optionality" setting to control runtime optionality of fields (#2525) 2026-04-15 12:24:07 -07:00
CLAUDE.md chore: never proactively commit or push without explicit request (#2584) 2026-04-16 19:29:12 -07:00
CODE_OF_CONDUCT.md merge canary to dev (#181) 2023-01-27 22:31:44 +08:00
CONTRIBUTING.md chore: update CONTRIBUTING (#579) 2026-01-08 21:38:26 +08:00
LICENSE chore: extract a zod error format utility for v3/v4 uniform handling (#2232) 2025-09-07 21:34:13 -07:00
package.json [CI] Bump version 3.6.4 (#2624) 2026-04-27 17:50:05 -07:00
pnpm-lock.yaml refactor(tanstack-query, orm): thread plugin generics through transactions (#2645) 2026-05-05 10:56:06 -07:00
pnpm-workspace.yaml chore: upgrade to TypeScript 6 (#2629) 2026-04-29 20:41:27 -07:00
README.md docs: add @zenstackhq/schema to manual install command in README (#2586) 2026-04-16 20:44:34 -07:00
SECURITY.md chore: clean up repo merging stale files (#2370) 2026-02-11 11:51:44 +08:00
TODO.md feat(orm): mysql support (#616) 2026-01-24 23:21:36 +08:00
turbo.json refactor: remove import from orm package in generated schema (#2387) 2026-02-19 18:16:13 -08:00
vitest.config.ts refactor: extract client-helpers package, update svelte-query to v6 (#535) 2025-12-27 22:49:19 +08:00

ZenStack: Modern Data Layer for TypeScript Apps

What's ZenStack

Read full documentation at 👉🏻 https://zenstack.dev/docs.

ZenStack is a TypeScript database toolkit for developing full-stack or backend Node.js/Bun applications. It provides a unified data modeling and query solution with the following features:

  • 🔧 Modern schema-first ORM that's compatible with Prisma's schema and API
  • 📊 Versatile API - high-level ORM queries + low-level Kysely query builder
  • 🔐 Built-in access control and data validation
  • 🚀 Advanced data modeling patterns like polymorphism
  • 🧩 Designed for extensibility and flexibility
  • ⚙️ Automatic CRUD web APIs with adapters for popular frameworks
  • 🏖️ Automatic TanStack Query hooks for easy CRUD from the frontend
  • 💎 Zod schema generation

What's New in V3

ZenStack V3 is a major rewrite. It replaced Prisma ORM with its own ORM engine built on top of Kysely while keeping a Prisma-compatible query API. This architecture change brings the level of flexibility that we couldn't imagine in previous versions. Please check this blog post for why we made this bold decision.

Even without using advanced features, ZenStack offers the following benefits as a drop-in replacement to Prisma:

  1. Pure TypeScript implementation without any Rust/WASM components.
  2. More TypeScript type inference, less code generation.
  3. Fully-typed query-builder API as a better escape hatch compared to Prisma's raw queries or typed SQL.

Try It Now

Open in StackBlitz

Installation

1. Creating a new project

Use the following command to scaffold a simple TypeScript command line application with ZenStack configured:

npm create zenstack@latest my-project

2. Setting up an existing project

Or, if you have an existing project, use the CLI to initialize it:

npx @zenstackhq/cli@latest init

3. Setting up manually

Alternatively, you can set it up manually:

npm install -D @zenstackhq/cli
npm install @zenstackhq/schema @zenstackhq/orm

Then create a zenstack folder and a schema.zmodel file in it.

Documentation

https://zenstack.dev/docs/

Sponsors

Thank you for your generous support!

Current Sponsors

Suhyl
Suhyl
Marblism
Marblism
Mermaid Chart
Mermaid Chart
CodeRabbit
CodeRabbit
Johann Rohn
Johann Rohn

Previous Sponsors

Benjamin Zecirovic
Benjamin Zecirovic
Ulric
Ulric
Fabian Jocks
Fabian Jocks

Community

Join our discord server for chat and updates!

Contributors

Thanks to all the contributors who have helped make ZenStack better!

Source

Docs

License

MIT