Prisma Nest Helper - VS Code Extension
Prisma Nest Helper is a Visual Studio Code extension designed to streamline NestJS development by generating API services, controllers, and modules based on Prisma schema models. It automates repetitive tasks, allowing developers to focus on business logic rather than boilerplate code.
Features
✅ Generate Full CRUD API – Automatically creates a complete CRUD setup including service, controller, module, and DTO files based on Prisma models.
✅ Add Prisma Module – Adds Prisma as a module in your NestJS project if not already configured.
✅ Enhance with Swagger – Integrates Swagger into your existing NestJS project if it doesn't already have it.
✅ Reduces Boilerplate Code – Speeds up development by generating necessary files and code structure automatically.
Commands
The extension provides the following commands, which can be executed via the Command Palette (Ctrl+Shift+P
or Cmd+Shift+P
on macOS):
1️⃣ Generate CRUD for Prisma Model
- Generates a full CRUD API (Service, Controller, Module, and DTO) based on a selected Prisma model.
- Detects models from your
schema.prisma
file and allows you to choose one.
- Creates NestJS-compatible files with pre-written methods.
2️⃣ Generate Prisma Module
- Adds a Prisma module and service to your project.
- Ensures Prisma is correctly configured as a provider in your NestJS app.
3️⃣ Add Swagger to Existing Project
- Automatically integrates Swagger (OpenAPI) into your project if it doesn’t already have it.
- Adds necessary decorators to your controllers for API documentation.
How to Use
- Open a NestJS project in VS Code.
- Open a command palette (
Ctrl+Shift+P
or Cmd+Shift+P
).
- Search for and select Prisma Nest Helper commands.
- Follow the prompts to generate the required files.
Configuration
Ensure your project follows the standard NestJS and Prisma setup:
- The
schema.prisma
file should be properly defined with models.
- NestJS modules should follow a modular architecture.
- The project should have Prisma installed (
@prisma/client
and @nestjs/prisma
).
Contributing
Contributions, issues, and feature requests are welcome! Feel free to open a pull request or report an issue on the GitHub repository (once available).
Author
📌 Hassan Tahir – Creator of Prisma Nest Helper.
License
This project is licensed under the MIT License.