nodejs-best-practices

Guide Node.js framework selection, runtime, and architecture decisions.

34|29|Updated Jul 14, 2025
One-click install
npx skills add https://github.com/adelpro/open-tarteel --skill nodejs-best-practices-adelpro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nodejs-best-practices
Source: https://github.com/adelpro/open-tarteel/tree/main/.agent/skills/nodejs-best-practices
Command: npx skills add https://github.com/adelpro/open-tarteel --skill nodejs-best-practices-adelpro

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Teams often face decision fatigue when choosing Node.js frameworks, runtimes, and architectures for new or evolving projects. This Skill provides principled guidance to think through context, avoid copy-paste patterns, and align technical choices with business needs.

Core Features & Use Cases

  • Decision Tree-driven framework selection (Hono, Fastify, NestJS, Express) based on deployment targets, latency requirements, and ecosystem.
  • Runtime and architecture guidance: ES modules vs CommonJS, layering (Controller, Service, Repository), and when to use serverless vs long-running processes.
  • Error handling, validation, and security principles to improve reliability, security, and maintainability.
  • Use Case: Start a new service and pick a framework that minimizes latency while maximizing developer velocity.

Quick Start

Ask this skill for project-context-driven Node.js guidance, then request a recommended framework, runtime, and architecture plan.

Frequently Asked Questions about nodejs-best-practices

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

FAQPage Schema
How do I choose the best Node.js framework for my project requirements?

Evaluate Node.js framework selection by using a decision tree based on deployment targets, latency requirements, and ecosystem needs. Compare Hono, Fastify, NestJS, and Express to align technical choices with your business goals.

What's the best way to structure Node.js architecture using ES modules vs CommonJS?

Node.js architecture guidance recommends layering your project into Controller, Service, and Repository components. Choosing between ES modules and CommonJS depends on your runtime decisions and whether you use serverless or long-running processes.

How do I implement error handling and validation in a Node.js service?

Implement Node.js error handling and validation by applying principled guidance to improve reliability and maintainability. Structured validation ensures data integrity before processing requests, while consistent error handling prevents runtime crashes across your architecture.

Does this Node.js guidance apply to both new projects and existing refactors?

Yes, this Node.js guidance applies to both starting new projects and refactoring existing ones. It helps teams avoid copy-paste patterns, overcome decision fatigue, and make thoughtful runtime and architecture decisions based on project context.

When should I use serverless vs long-running processes for Node.js runtime decisions?

Node.js runtime decisions for serverless vs long-running processes depend on your framework selection and latency requirements. Serverless suits event-driven workloads, while long-running processes better support persistent connections and complex async patterns.

What security considerations should I follow for Node.js application architecture?

Node.js security considerations involve applying principles that improve reliability and maintainability across your layered architecture. This includes structured validation, error handling, and context-driven framework selection to protect runtime operations.