One-click install
npx skills add https://github.com/Alexbyxd/microservicio-venta-celulares --skill nestjs-best-practices-alexbyxd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nestjs-best-practices
Source: https://github.com/Alexbyxd/microservicio-venta-celulares/tree/main/backend/.agents/skills/nestjs-best-practices
Command: npx skills add https://github.com/Alexbyxd/microservicio-venta-celulares --skill nestjs-best-practices-alexbyxd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers write, review, and refactor NestJS applications by providing a comprehensive guide to best practices and architecture patterns, ensuring proper code structure and maintainability.

Core Features & Use Cases

  • Architecture Best Practices: Provides rules for organizing code, avoiding circular dependencies, and creating modular, maintainable applications.
  • Dependency Injection: Guides on implementing effective dependency injection, avoiding anti-patterns, and following design principles.
  • Error Handling: Best practices for handling errors and exceptions in NestJS applications.
  • Security: Recommendations for implementing secure practices, such as JWT authentication, input validation, and rate limiting.
  • Performance: Tips for optimizing performance, including caching strategies, database query optimization, and lazy loading.
  • Testing: Guidance on testing NestJS applications, including end-to-end testing, mocking external services, and unit testing.
  • Database & ORM: Best practices for database interactions and ORM usage.
  • API Design: Best practices for designing APIs, including versioning, serialization, and input transformation.
  • Microservices: Guidelines for building microservices with NestJS, including health checks, event-driven architecture, and message queues.
  • DevOps & Deployment: Best practices for deployment, including environment configuration, logging, and graceful shutdown.

Quick Start

Run the build script to generate the 'AGENTS.md' file with all the best practices for NestJS development.

Frequently Asked Questions about nestjs-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the best practices for NestJS architecture and dependency injection?

NestJS architecture best practices focus on organizing modular code, avoiding circular dependencies, and implementing effective dependency injection to ensure maintainability and proper code structure.

How do I handle errors and implement security in a NestJS application?

To handle errors and implement security in a NestJS application, follow best practices for exception handling, JWT authentication, input validation, and rate limiting to protect your API endpoints.

What is the best way to optimize NestJS performance and database interactions?

The best way to optimize NestJS performance involves applying caching strategies, optimizing database queries, and using lazy loading, alongside following ORM best practices for efficient database interactions.

How do I set up testing and microservices in a NestJS project?

To set up testing and microservices in a NestJS project, follow guidelines for unit and end-to-end testing, mocking external services, and building event-driven architectures with message queues and health checks.

Do I need prior NestJS knowledge to use these development guidelines?

Yes, you need prior knowledge of NestJS and related technologies because these guidelines focus on providing advanced architecture patterns, API design, and DevOps best practices rather than basic framework introduction.