node-patterns

Organize Node.js servers into reusable Express or Fastify patterns with TypeScript.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/RogerioSobrinho/codeme-copilot --skill node-patterns-rogeriosobrinho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: node-patterns
Source: https://github.com/RogerioSobrinho/codeme-copilot/tree/main/skills/node-patterns
Command: npx skills add https://github.com/RogerioSobrinho/codeme-copilot --skill node-patterns-rogeriosobrinho

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Load when building Node.js/Express APIs with TypeScript, using middleware patterns, structuring a REST API with Express or Fastify, implementing authentication with JWT in Node, using Prisma or TypeORM for database access, writing Jest tests for Node services, or when asked "how do I structure this Node.js service", "how do I add middleware in Express", "how do I handle errors in Express", "how do I test this Express endpoint".

Core Features & Use Cases

  • Provide a clean, scalable project structure for Node.js backends using Express/Fastify with TypeScript.
  • Demonstrate middleware patterns, authentication flows (JWT), and data access with Prisma/TypeORM.
  • Show best-practice testing and error handling conventions across server, domain, and infrastructure layers.

Quick Start

Bootstrap a new Node.js API following these patterns to start building a scalable backend.

Frequently Asked Questions about node-patterns

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

FAQPage Schema
How do I structure a Node.js Express API with TypeScript for production?

Structure a Node.js Express API by separating app factory logic, domain layers, and infrastructure. This pattern defines a conventional project layout with middleware, validation, and robust error handling to guide production-grade TypeScript services.

What's the best way to handle errors in Express or Fastify middleware?

Error handling in Express or Fastify is managed through standardized middleware patterns. The Skill implements robust error handling conventions across server, domain, and infrastructure layers to ensure consistent API failure responses.

How do I test Express endpoints with Jest and TypeScript?

Test Express endpoints with Jest by applying best-practice testing conventions across server, domain, and infrastructure layers. The Skill defines testing practices that guide how to structure and execute Jest tests for Node services.

Can I use Prisma or TypeORM for data access in this Node.js API structure?

Yes, you can use Prisma or TypeORM for data access. The Node.js API patterns are designed for REST API projects using either Prisma or TypeORM, providing a clean, scalable structure for database integration.

Does this Node.js API pattern work with Fastify or is it only for Express?

The Node.js API pattern works with both Fastify and Express. It organizes Node.js servers into reusable patterns that apply to REST API projects using either framework, alongside TypeScript and JWT authentication flows.