Show HN: TypeScript ORM with Access Control

https://news.ycombinator.com/item?id=36861027
by carlual • 3 years ago
2 1 3 years ago

ZenStack is built on top of Primsa ORM, extending it with an access control layer that simplifies the development of a web app's backend. By defining authorization policies and validation rules right inside the data schema, database client can automatically enforce these constraints at runtime bringing the following benefits:

- Centralized access control for better security and maintainability

- Less code to be written

The core of ZenStack is a transparent proxy around Prisma client which enforces access policies while keeping the APIs unchanged. It allows building the backend of new projects faster with minimal TS/JS code, and can also be easily adopted into existing projects.

Some other benefits it provides:

- Automatic CRUD APIs - RESTful, tRPC

- Generating client-side data access libraries (aka hooks) - SWR, TanStack Query

- A plugin system for 3rd party extension

Finally, ZenStack is not opinionated toward any stack or framework, allowing integration with the entire JavaScript and TypeScript ecosystem.

GitHub: https://github.com/zenstackhq/zenstack

Website: https://zenstack.dev

Related Stories

Loading related stories...

Source preview

news.ycombinator.com