Announcement·

Introducing Nuxt Auto CRUD

Stop writing boilerplate. Automatically expose RESTful APIs from your Drizzle ORM schema with built-in RBAC, validation, and documentation.

Building modern web applications often involves a lot of repetitive work. You define your database schema, then you write API endpoints to perform CRUD (Create, Read, Update, Delete) operations on that data. Then you add validation. Then you add authentication. Then you add authorization.

It's exhausted just thinking about it.

Enter Nuxt Auto CRUD

Nuxt Auto CRUD is a module designed to eliminate this boilerplate. It takes your Drizzle ORM schema and automatically mounts fully-featured RESTful APIs.

Key Features

  • Schema Driven: Your database schema is the single source of truth.
  • Automatic APIs: GET, POST, PATCH, DELETE endpoints are exposed instantly.
  • Role-Based Access Control (RBAC): Granular permissions for every resource and action.
  • Type Safety: Full TypeScript support from database to API response.
  • Zero Config: Sensible defaults let you get started in minutes.

How it Works

  1. Define your schema using Drizzle ORM.
  2. Add the module to your nuxt.config.ts.
  3. Start your server. Your APIs are ready!
// server/db/schema.ts
import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core'

export const posts = sqliteTable('posts', {
  id: integer('id').primaryKey(),
  title: text('title').notNull(),
  content: text('content').notNull(),
  published: integer('published', { mode: 'boolean' }).default(false),
})

With just that code, you get:

  • GET /api/posts - List all posts (with pagination, filtering, sorting)
  • GET /api/posts/:id - Get a single post
  • POST /api/posts - Create a new post
  • PATCH /api/posts/:id - Update a post
  • DELETE /api/posts/:id - Delete a post

Get Started

Check out the documentation to learn more and start building faster today.