zenstack
petstore-openapi-zenstack
Our great sponsors
zenstack | petstore-openapi-zenstack | |
---|---|---|
43 | 2 | |
1,620 | 13 | |
12.4% | - | |
9.5 | 5.1 | |
2 days ago | 4 months ago | |
TypeScript | TypeScript | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
zenstack
-
The Many Ways Not to Build an API
Another strategy is to model access control declaratively and enforce it in the application layer. ZenStack (built above Prisma ORM) and Hasura are good examples of this approach. The following code shows how access policies are defined with ZenStack and how a secured CRUD API can be derived automatically.
-
Building an Admin Console With Minimum Code Using React-Admin, Prisma, and Zenstack
ZenStack is a toolkit built above Prisma that adds access control, automatic CRUD web API, etc. It unleashes the ORM's full power for full-stack development.
-
How Much Work Does It Take to Build a Programming Language?
We need to have some concrete language to build to help make sense of things. I always felt real-world examples are much more effective than toys, so I'll use the ZModel language that we're building at ZenStack as an example. It's a DSL used to model database tables and access control rules. To keep the post short, I'm going only to use a small set of features to demonstrate. Our goal will be to compile the following code snippet:
-
Modeling Authorization in Prisma - No Theory, Just Code
It's assumed that you know the basics of using Prisma. Prisma is an excellent ORM. But it doesn't have a built-in authorization solution. To supplement that, we'll use ZenStack throughout the samples. ZenStack is a toolkit that supercharges Prisma in many ways. One of the features is to provide a declarative way to model authorization. Its modeling language, ZModel, is a superset of Prisma Schema Language, so it should be easily understandable to people familiar with Prisma.
-
Tackling Polymorphism in Prisma
[Feature Request] Support for Polymorphic Associations #430
-
How to Do Authorization - A Decision Framework: Part 1
ZenStack takes a unique approach and solves the problem at a slightly higher level: the ORM. It is implemented above Prisma ORM and supports a wide variety of databases. It extends Prisma to allow modeling access policies inside the data schema and enforces them at runtime by injecting into Prisma queries.
-
Using AI to Generate Database Query Is Cool. But What About Access Control?
If you generate Prisma queries as we do here, you can inject extra filtering conditions into the generated query object. Here's the nice thing: ZenStack can do it automatically for you.
-
Is Next.js 13 + RSC a Good Choice? I Built an App Without Client-Side Javascript to Find Out
ZenStack for automatic enforcement of access control. ZenStack is a toolkit that extends Prisma ORM to allow you to model access policies and data schema in one place.
- How To Get Type-Safety Frontend Queries Like GraphQL Without GraphQL Using Typescript
-
We have just released V1 of ZenSatck, a DSL that defines the access control policy right inside the data model, eliminating the repetitive coding on the application side. Would love to get your feedback/advice.
Website: https://zenstack.dev/
petstore-openapi-zenstack
-
How to Host a RESTful API on Vercel
In case you had trouble following the steps, you can find the finished project here.
-
Building a Secure Database-Centric OpenAPI in 15 Minutes
The finished project can be found here.
What are some alternatives?
supabase - The open source Firebase alternative.
vercel - Develop. Preview. Ship.
json-api - A specification for building JSON APIs
Prisma - Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
openapi-typescript - Generate TypeScript types from OpenAPI 3 specs
react-hook-form - ๐ React Hooks for form state management and validation (Web + React Native)
next-auth-example - Example showing how to use NextAuth.js with Next.js
supabase-tenant-rbac - A template for implementing basic RBAC for a multi-tenant supabase project
daisyui - ๐ผ ๐ผ ๐ผ ๐ผ ๐ผ โThe most popular, free and open-source Tailwind CSS component library
create-t3-app - The best way to start a full-stack, typesafe Next.js app