DEV Community

Cover image for Introducing ZenStack: a schema-first toolkit for creating CRUD services in Next.js projects
ymc9 for ZenStack

Posted on Edited on

Introducing ZenStack: a schema-first toolkit for creating CRUD services in Next.js projects


Next.js is evolving fast to become an increasingly appealing choice for building full-stack web apps. However, coding up the backend part of an app, especially implementing CRUD services efficiently and securely, is still tricky (and boring ๐Ÿ˜’ too).

ZenStack is a toolkit that simplifies the construction of CRUD services with a schema-first approach. It offers a modeling language for defining data models, relations, and access policies and then generates RESTful CRUD services (with authorization) and React hooks for you. It also allows you to share types between client and server-side coding and achieve end-to-end type safety without pain.

Our goal is to let you save time writing boilerplate code and focus on building what matters - the user experience.

If it feels relevant, please also check out the excellent detailed tutorial by @jiasheng for how to use it in action:

, or find more details directly at Github:

GitHub logo zenstackhq / zenstack

Modern data layer for TypeScript apps - type-safe ORM, built-in access control, automatic query services

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โ€ฆ

Also, join us on discord for chat and the latest updates!

Have fun!

Top comments (0)