backend-dev-guidelines

Standardize Node.js/Express/TypeScript backend architecture with layered patterns.

Updated Dec 5, 2025
One-click install
npx skills add https://github.com/NmBoyd/claude_setup --skill backend-dev-guidelines-nmboyd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-dev-guidelines
Source: https://github.com/NmBoyd/claude_setup/tree/main/.claude/skills/backend-dev-guidelines
Command: npx skills add https://github.com/NmBoyd/claude_setup --skill backend-dev-guidelines-nmboyd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Backend Guidelines unify coding standards across services, ensuring consistent structure, patterns, and quality for Express/Node/TypeScript projects.

Core Features & Use Cases

  • Architecture blueprint: layered pattern (routes → controllers → services → repositories) with BaseController, DI, and Sentry.
  • Coding standards: naming conventions, error handling, testing, and guardrails for Express APIs, Prisma, Sentry, Zod, unifiedConfig.
  • Migration guidance: from legacy patterns to modern patterns and refactoring across services.

Quick Start

Begin by adopting the architecture and patterns in new backend features, then progressively refactor existing services to align with these guidelines.

Frequently Asked Questions about backend-dev-guidelines

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

FAQPage Schema
What is the recommended layered architecture for Node.js Express TypeScript backend projects?

The recommended architecture for Node.js backend projects follows a routes → controllers → services → repositories pattern, utilizing a BaseController abstraction to standardize request handling and enforce separation of concerns across microservices.

How do I structure controllers and services in an Express TypeScript application?

To structure controllers and services in an Express TypeScript application, inherit from a BaseController class for routing logic and delegate business operations to dedicated service layers, injecting repositories for data access to maintain modular separation.

How do I integrate Sentry and Zod for error handling and validation in Node.js?

Integrate Sentry and Zod in Node.js by applying Zod schemas at the middleware level to validate incoming API requests, then wrapping controllers with error-handling middleware that captures unhandled exceptions and reports them directly to Sentry.

Can I use Prisma within a layered Express TypeScript service architecture?

Yes, you can use Prisma within a layered Express TypeScript service architecture by encapsulating database queries inside repository classes, which are then injected into services to ensure data access logic remains isolated from business rules.

What is the best way to migrate legacy Node.js backend code to a modern TypeScript architecture?

The best way to migrate legacy Node.js backend code is to progressively refactor existing services by introducing TypeScript, adopting the BaseController pattern, and aligning modules with the layered architecture blueprint rather than rewriting everything at once.

Does standardizing Express API patterns work for microservice environments?

Standardizing Express API patterns works effectively for microservice environments by applying unified coding conventions, Sentry error tracking, and Prisma data access rules across distributed services, ensuring consistent structure and maintainable quality at scale.