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:
How to Build a Production-Ready Todo App in One Next.js Project With ZenStack
JS for ZenStack γ» Nov 10 '22
, or find more details directly at Github:
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.
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
β¦Also, join us on discord for chat and the latest updates!
Have fun!
Top comments (0)