back to home

zenstackhq / zenstack

Modern Data Layer for TypeScript Apps - type-safe ORM, built-in access control, automatic query services

View on GitHub
2,846 stars
134 forks
167 issues
TypeScriptLangiumJavaScript

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing zenstackhq/zenstack in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/zenstackhq/zenstack)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

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 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: • Pure TypeScript implementation without any Rust/WASM components. • More TypeScript type inference, less code generation. • Fully-typed query-builder API as a better escape hatch compared to Prisma's raw queries or typed SQL. Try It Now Installation • Creating a new project Use the following command to scaffold a simple TypeScript command line application with ZenStack configured: • Setting up an existing project Or, if you have an existing project, use the CLI to initialize it: • Setting up manually Alternatively, you can set it up manually: Then create a folder and a file in it. Documentation https://zenstack.dev/docs/ Sponsors Thank you for your generous support! Current Sponsors Suhyl Marblism Mermaid Chart CodeRabbit Johann Rohn Previous Sponsors Benjamin Zecirovic Ulric Fabian Jocks Community Join our discord server for chat and updates!