KS
Killer-Skills

nestjs — how to use nestjs how to use nestjs, nestjs microservices development, nestjs vs express, nestjs install, nestjs setup guide, nestjs temporal integration, what is nestjs, nestjs alternative, nestjs tutorial

v1.0.0
GitHub

About this Skill

Perfect for Microservices Agents needing scalable TypeScript and JavaScript applications. NestJS is a progressive Node.js framework for building efficient, scalable Node.js server-side applications using TypeScript and JavaScript.

Features

Uses NestJS for microservices development with multiple modules
Integrates with Temporal for event-driven architecture
Supports authentication using JWT and Passport
Includes shared modules in packages/core for code reuse
Allows creation of new modules using feature/feature.module.ts
Enables order management and product catalog integration

# Core Topics

proyecto26 proyecto26
[0]
[0]
Updated: 3/6/2026

Quality Score

Top 5%
33
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add proyecto26/projectx/nestjs

Agent Capability Analysis

The nestjs MCP Server by proyecto26 is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use nestjs, nestjs microservices development, nestjs vs express.

Ideal Agent Persona

Perfect for Microservices Agents needing scalable TypeScript and JavaScript applications.

Core Value

Empowers agents to build maintainable apps using NestJS, leveraging microservices architecture, TypeScript, and JavaScript, with features like JWT authentication and Temporal integration.

Capabilities Granted for nestjs MCP Server

Developing scalable authentication microservices with Passport
Creating modular product catalogs with shared core modules
Integrating order management with Temporal for workflow automation

! Prerequisites & Limits

  • Requires TypeScript and JavaScript knowledge
  • NestJS framework dependency
  • Microservices architecture complexity
Project
SKILL.md
4.5 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

NestJS Microservices Development

Project Structure

This project uses NestJS for three microservices:

  • apps/auth - Authentication (JWT, Passport)
  • apps/order - Order management (integrates with Temporal)
  • apps/product - Product catalog

Shared modules are in packages/core.

Creating a New Module

1. Create Module File

typescript
1// feature/feature.module.ts 2import { Module } from '@nestjs/common'; 3import { FeatureController } from './feature.controller'; 4import { FeatureService } from './feature.service'; 5 6@Module({ 7 controllers: [FeatureController], 8 providers: [FeatureService], 9 exports: [FeatureService], 10}) 11export class FeatureModule {}

2. Create Service with Repository Pattern

typescript
1// feature/feature.service.ts 2import { Injectable } from '@nestjs/common'; 3import { PrismaService } from '@projectx/db'; 4 5@Injectable() 6export class FeatureService { 7 constructor(private readonly prisma: PrismaService) {} 8 9 async findAll() { 10 return this.prisma.feature.findMany(); 11 } 12 13 async findOne(id: string) { 14 return this.prisma.feature.findUnique({ where: { id } }); 15 } 16 17 async create(data: CreateFeatureDto) { 18 return this.prisma.feature.create({ data }); 19 } 20}

3. Create Controller with Swagger

typescript
1// feature/feature.controller.ts 2import { Controller, Get, Post, Body, Param } from '@nestjs/common'; 3import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; 4import { FeatureService } from './feature.service'; 5 6@ApiTags('features') 7@Controller('features') 8export class FeatureController { 9 constructor(private readonly featureService: FeatureService) {} 10 11 @Get() 12 @ApiOperation({ summary: 'Get all features' }) 13 @ApiResponse({ status: 200, description: 'Returns all features' }) 14 findAll() { 15 return this.featureService.findAll(); 16 } 17 18 @Get(':id') 19 @ApiOperation({ summary: 'Get feature by ID' }) 20 findOne(@Param('id') id: string) { 21 return this.featureService.findOne(id); 22 } 23 24 @Post() 25 @ApiOperation({ summary: 'Create a feature' }) 26 create(@Body() createFeatureDto: CreateFeatureDto) { 27 return this.featureService.create(createFeatureDto); 28 } 29}

DTOs with Validation

typescript
1// feature/dto/create-feature.dto.ts 2import { IsString, IsNotEmpty, IsOptional } from 'class-validator'; 3import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; 4 5export class CreateFeatureDto { 6 @ApiProperty({ description: 'Feature name' }) 7 @IsString() 8 @IsNotEmpty() 9 name: string; 10 11 @ApiPropertyOptional({ description: 'Feature description' }) 12 @IsString() 13 @IsOptional() 14 description?: string; 15}

Authentication Guards

Use guards from @projectx/core:

typescript
1import { UseGuards } from '@nestjs/common'; 2import { JwtAuthGuard } from '@projectx/core'; 3 4@Controller('protected') 5@UseGuards(JwtAuthGuard) 6export class ProtectedController { 7 // All routes require authentication 8}

Exception Handling

typescript
1import { NotFoundException, BadRequestException } from '@nestjs/common'; 2 3// In service 4async findOne(id: string) { 5 const item = await this.prisma.feature.findUnique({ where: { id } }); 6 if (!item) { 7 throw new NotFoundException(`Feature with ID ${id} not found`); 8 } 9 return item; 10}

Testing Services

typescript
1import { Test, TestingModule } from '@nestjs/testing'; 2import { FeatureService } from './feature.service'; 3import { PrismaService } from '@projectx/db'; 4 5describe('FeatureService', () => { 6 let service: FeatureService; 7 let prisma: PrismaService; 8 9 beforeEach(async () => { 10 const module: TestingModule = await Test.createTestingModule({ 11 providers: [ 12 FeatureService, 13 { 14 provide: PrismaService, 15 useValue: { 16 feature: { 17 findMany: jest.fn(), 18 findUnique: jest.fn(), 19 create: jest.fn(), 20 }, 21 }, 22 }, 23 ], 24 }).compile(); 25 26 service = module.get<FeatureService>(FeatureService); 27 prisma = module.get<PrismaService>(PrismaService); 28 }); 29 30 it('should be defined', () => { 31 expect(service).toBeDefined(); 32 }); 33});

Running Services

bash
1# Run specific service 2pnpm dev:auth 3pnpm dev:order 4pnpm dev:product 5 6# Run all services 7pnpm dev

Best Practices

  1. Always use DTOs for request/response validation
  2. Document with Swagger decorators for API documentation
  3. Use repository pattern via Prisma services from @projectx/db
  4. Handle errors with NestJS built-in exceptions
  5. Write tests for services and controllers
  6. Use guards from @projectx/core for authentication

Related Skills

Looking for an alternative to nestjs or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication