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

ymc9

ymc9

Posted on November 13, 2022

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

Fullstack TypeScript toolkit that enhances Prisma ORM with flexible Authorization layer for RBAC/ABAC/PBAC/ReBAC, offering auto-generated type-safe APIs and frontend hooks.

ZenStack

What it is

ZenStack is a Node.js/TypeScript toolkit that simplifies the development of a web app's backend. It enhances Prisma ORM with a flexible Authorization layer and auto-generated, type-safe APIs/hooks, unlocking its full potential for full-stack development.

Our goal is to let you save time writing boilerplate code and focus on building real features!

How it works

Read full documentation at 👉🏻 zenstack.dev. Join Discord for feedback and questions.

ZenStack incrementally extends Prisma's power with the following four layers:

1. ZModel - an extended Prisma schema language

ZenStack introduces a data modeling language called "ZModel" - a superset of Prisma schema language. It extended Prisma schema with custom attributes and functions and, based on that, implemented a flexible access control layer around Prisma.

// base.zmodel
abstract model Base {
    id String @id
    author User @relation(fields: [authorId], references: [id
Enter fullscreen mode Exit fullscreen mode

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

Have fun!

💖 💪 🙅 🚩
ymc9
ymc9

Posted on November 13, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related