Getting Started

Module

Nuxt CRUD automatically generates a complete GUI for your Drizzle ORM models.

Quick Setup

Install the module to your Nuxt application with one command:

npx nuxi module add nuxt-crud

We highly recommend installing nuxt-crud-cli alongside this module. The CLI tool allows you to:

  • Bootstrap your database schema
  • Generate CRUD endpoints
npm install -g nuxt-crud-cli

Checkout the CLI documentation here

Basic Usage

After installation, Nuxt CRUD will automatically detect your Drizzle models and generate admin interfaces. Simply define your schema:

// server/database/schemas/user.ts
import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core'

export const users = sqliteTable('users', {
  id: integer('id').primaryKey({ autoIncrement: true }),
  name: text('name'),
  email: text('email'),
  createdAt: text('created_at')
    .notNull(),
  updatedAt: text('updated_at')
    .notNull(),
})

export type User = typeof users.$inferSelect
export type NewUser = typeof users.$inferInsert

Navigate to /admin in your application to access the generated CRUD interface.

Documentation

For detailed configuration options, advanced usage, and customization guides, visit our documentation.

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.


That's it! You can now use Nuxt CRUD in your Nuxt app to manage your database with a beautiful, type-safe admin interface ✨