Security is paramount in any application. When exposing APIs automatically, you need a robust way to control who can access what. Nuxt Auto CRUD comes with a powerful Role-Based Access Control (RBAC) system built right in.
Our permission system is built on four core concepts:
Permissions are managed in the database, allowing for dynamic updates without code changes.
Create roles in the roles table.
INSERT INTO roles (name) VALUES ('admin'), ('editor'), ('viewer');
Link roles to resources and actions in the role_resource_permissions table.
create and update posts, but only read comments.read posts and comments.Once configured, Nuxt Auto CRUD automatically checks permissions for every request.
DELETE /api/posts/1 but only has read access, they get a 403 Forbidden response.404 Not Found or 403 Forbidden.You can also implement row-level security and custom policies by hooking into the module's lifecycle events, ensuring that users can only edit their own data.
Secure your app with confidence using Nuxt Auto CRUD.
Introducing Nuxt Auto CRUD
Stop writing boilerplate. Automatically expose RESTful APIs from your Drizzle ORM schema with built-in RBAC, validation, and documentation.
The Power of Schema-First Development
Why defining your data model first leads to better, more maintainable applications, and how Nuxt Auto CRUD embraces this philosophy.