Nest AutoCRUD
Go to file
2024-10-30 21:12:59 +07:00
libs wip: working auto preset injection 2024-10-30 20:19:41 +07:00
prisma wip: sample with prisma 2024-10-26 20:01:34 +07:00
scripts/unix chore: scripts for easy release 2024-10-30 20:25:59 +07:00
src wip: working auto preset injection 2024-10-30 20:19:41 +07:00
test fix: mapper 2024-10-29 10:54:10 +07:00
.env.example chore: env and prisma init 2024-10-26 19:17:58 +07:00
.eslintrc.js wip: controller 2024-10-26 15:35:59 +07:00
.gitignore chore: change to package instead of dist 2024-10-29 09:48:50 +07:00
.npmignore chore: change to package instead of dist 2024-10-29 09:48:50 +07:00
.prettierrc wip: controller 2024-10-26 15:35:59 +07:00
.release-it.json feat: using release-it instead 2024-10-29 10:08:36 +07:00
jsr.json feat: add jsr 2024-10-29 01:38:53 +07:00
nest-cli.json wip: prisma support 2024-10-26 19:15:42 +07:00
package-lock.json chore(): release v0.0.13 2024-10-29 10:15:53 +07:00
package.json chore: link repo to npm site registry 2024-10-30 20:29:19 +07:00
README.md chore: better info in readme 2024-10-30 21:12:59 +07:00
tsconfig.build.json wip: controller 2024-10-26 15:35:59 +07:00
tsconfig.json fix: mapper 2024-10-29 10:54:10 +07:00

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

Status

This project is still in development and not ready for production, it's not even ready to install yet. Calling for contributors to help this project.

Description

Nest Auto CRUD is a library that provides a set of modules, decorator, service, and many more to reduce the boilerplate code.

Roadmap

Basic Thing

  • Basic CRUD Controller with unique selection is ID and general request body
  • Custom Read Query Unique Selection
  • Custom body mapping
  • Custom validation

Tailored Controller Abstraction

  • Controller options for only read and update
  • Controller options for only create and delete
  • Controller options for only read
  • Controller options for only update
  • Controller options for only create
  • Controller options for only delete
  • Controller options for only read and create

Advanced Support

  • Generic support for Prisma ORM #5273

Installation

$ npm install @aditama-labs/nest-autocrud

Example

Prisma ORM

// Your Module
@Module({
  imports: [
    // This module will automatically map your model to the controller
    PrismaModule.forRoot({
      delegate: (prisma: PrismaClient) => prisma.user,
    }),
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}

// Your Controller
@Controller('examples')
export class AppController extends SkeletonCRUDController {}

// Expected Output
[Nest] 101445  - 10/30/2024, 9:12:20 PM     LOG [NestFactory] Starting Nest application...
[Nest] 101445  - 10/30/2024, 9:12:20 PM     LOG [InstanceLoader] PrismaModule dependencies initialized +14ms
[Nest] 101445  - 10/30/2024, 9:12:20 PM     LOG [InstanceLoader] AppModule dependencies initialized +0ms
[Nest] 101445  - 10/30/2024, 9:12:20 PM     LOG [RoutesResolver] AppController {/example}: +4ms
[Nest] 101445  - 10/30/2024, 9:12:20 PM     LOG [RouterExplorer] Mapped {/example, POST} route +2ms
[Nest] 101445  - 10/30/2024, 9:12:20 PM     LOG [RouterExplorer] Mapped {/example/:id, DELETE} route +0ms
[Nest] 101445  - 10/30/2024, 9:12:20 PM     LOG [RouterExplorer] Mapped {/example/list, GET} route +1ms
[Nest] 101445  - 10/30/2024, 9:12:20 PM     LOG [RouterExplorer] Mapped {/example, GET} route +0ms
[Nest] 101445  - 10/30/2024, 9:12:20 PM     LOG [RouterExplorer] Mapped {/example/:id, GET} route +0ms
[Nest] 101445  - 10/30/2024, 9:12:20 PM     LOG [RouterExplorer] Mapped {/example, PATCH} route +1ms
[Nest] 101445  - 10/30/2024, 9:12:20 PM     LOG [NestApplication] Nest application successfully started +198ms

TypeORM

COMING SOON

Support

Nest AutoCRUD is an MIT-licensed open source project.

Stay in touch

License

Nest AutoCRUD is MIT licensed