Skip to content

giuseppe-trisciuoglio/developer-kit / plugins/developer-kit-typescript/skills/nestjs-drizzle-crud-generator

nestjs-drizzle-crud-generator

Verified

Generates complete CRUD modules for NestJS applications with Drizzle ORM. Use when building server-side features in NestJS that require database operations, including creating new entities with full CRUD endpoints, services with Drizzle queries, Zod-validated DTOs, and unit tests. Triggered by requests like "generate a user module", "create a product CRUD", "add a new entity with endpoints", or when setting up database-backed features in NestJS.

assets/templates/module-template.ts

View on GitHub
import { DynamicModule, Module } from '@nestjs/common';
import { AsyncFeatureModuleOptions } from '@nestjs/common/interfaces/features/async-options.interface';
import { DatabaseModule } from '@your-org/server-database';

import { {{FeatureName}}Controller } from './controllers';
import { {{FeatureName}}Service } from './services';
import { {{FeatureName}}Table } from './schema';

export const FEATURE_OPTIONS = '{{featureName}}.feature-options';

export interface {{FeatureName}}FeatureOptions {
  defaultPageSize?: number;
  maxPageSize?: number;
  includeDeleted?: boolean;
}

export type Async{{FeatureName}}ModuleOptions = AsyncFeatureModuleOptions<{{FeatureName}}FeatureOptions>;

@Module({})
export class {{FeatureName}}FeatureModule {
  static forRootAsync(options: Async{{FeatureName}}ModuleOptions): DynamicModule {
    return {
      global: true,
      module: {{FeatureName}}FeatureModule,
      imports: [DatabaseModule.forFeature([{{FeatureName}}Table])],
      controllers: [{{FeatureName}}Controller],
      providers: [
        {
          provide: FEATURE_OPTIONS,
          useFactory: options.useFactory,
          inject: options.inject,
        },
        {{FeatureName}}Service,
      ],
      exports: [{{FeatureName}}Service],
    };
  }
}
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall