Habilidades nodejs-backend-patterns
📦

nodejs-backend-patterns

Seguro

Build Production-Ready Node.js Backend Services

Também disponível em: wshobson

Creating robust Node.js backends requires understanding complex architectural patterns and best practices. This skill provides comprehensive guidance for building scalable, secure backend services with modern frameworks.

Suporta: Claude Codex Code(CC)
🥉 74 Bronze
1

Baixar o ZIP da skill

2

Upload no Claude

Vá em Configurações → Capacidades → Skills → Upload skill

3

Ative e comece a usar

Testar

A utilizar "nodejs-backend-patterns". How do I set up rate limiting for my Express API?

Resultado esperado:

Use express-rate-limit with Redis for distributed rate limiting. Configure separate limits for general API endpoints and authentication endpoints. Example: apiLimiter allows 100 requests per 15 minutes, while authLimiter allows 5 requests per 15 minutes with stricter enforcement.

A utilizar "nodejs-backend-patterns". What is the proper way to handle errors in Express?

Resultado esperado:

Create custom error classes extending Error for different error types (ValidationError, NotFoundError, UnauthorizedError). Implement a global error handler middleware that logs errors and returns appropriate HTTP status codes without exposing internal details in production.

Auditoria de Segurança

Seguro
v1 • 2/24/2026

This is an educational/documentation skill providing Node.js backend development guidance through markdown code examples. All static analysis findings are false positives - the detected patterns are instructional code samples in markdown format, not executable skill logic. No actual security risks detected.

2
Arquivos analisados
1,058
Linhas analisadas
0
achados
1
Total de auditorias
Nenhum problema de segurança encontrado
Auditado por: claude

Pontuação de qualidade

38
Arquitetura
100
Manutenibilidade
87
Conteúdo
50
Comunidade
100
Segurança
91
Conformidade com especificações

O Que Você Pode Construir

API Development

Build REST or GraphQL APIs with proper middleware, validation, and error handling for production applications.

Microservices Architecture

Design scalable microservices with dependency injection, proper logging, and inter-service communication patterns.

Learning Modern Node.js

Learn industry-standard patterns for authentication, database access, caching, and error handling in Node.js applications.

Tente Estes Prompts

Basic Express Setup
Help me create a basic Express.js server with security middleware, request logging, and error handling. Include TypeScript types and proper configuration.
Authentication System
Design a JWT-based authentication system with login, registration, and token refresh endpoints. Include password hashing with bcrypt and proper error handling.
Database Layer Design
Create a repository pattern implementation for PostgreSQL with connection pooling, parameterized queries, and transaction support for an order management system.
Complete Microservice
Design a complete microservice architecture with Fastify, including dependency injection, health checks, metrics endpoints, and graceful shutdown handling.

Melhores Práticas

  • Always use TypeScript for type safety and better IDE support
  • Validate all user input with libraries like Zod before processing
  • Use environment variables for configuration and never commit secrets to version control

Evitar

  • Using wildcard CORS origins in production environments
  • Storing sensitive data like passwords or tokens in plain text
  • Blocking the event loop with synchronous operations or complex calculations

Perguntas Frequentes

Should I use Express or Fastify for my project?
Express has a larger ecosystem and is well-established. Fastify offers better performance with built-in schema validation. Choose Express for maximum compatibility or Fastify for high-throughput APIs.
How do I handle database migrations in Node.js?
Use migration tools like Knex, Prisma, or typeorm. Define migrations as version-controlled files that can be applied or rolled back. Run migrations during deployment before starting the application.
What is the recommended project structure for Node.js APIs?
Use layered architecture: controllers handle HTTP requests, services contain business logic, repositories manage data access. Keep configuration, middleware, types, and utilities in separate directories.
How should I implement authentication in Node.js?
Use JWT for stateless authentication with short-lived access tokens and longer-lived refresh tokens. Hash passwords with bcrypt or argon2. Store secrets in environment variables and rotate them regularly.
What logging approach should I use in production?
Use structured logging with Pino or Winston. Include correlation IDs for tracing requests across services. Log to stdout and aggregate logs with tools like ELK stack or cloud logging services.
How do I ensure my Node.js API can handle high traffic?
Implement connection pooling for databases, add caching with Redis, use compression for responses, enable clustering to use all CPU cores, and implement proper rate limiting to prevent abuse.

Detalhes do Desenvolvedor

Estrutura de arquivos