backend-dev-guidelines

Standardize Node.js/Express/TypeScript microservice backend development with layered architecture.

10.0k|1.2k|Updated Oct 30, 2025
One-click install
npx skills add https://github.com/diet103/claude-code-infrastructure-showcase --skill backend-dev-guidelines
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-dev-guidelines
Source: https://github.com/diet103/claude-code-infrastructure-showcase/tree/main/.claude/skills/backend-dev-guidelines
Command: npx skills add https://github.com/diet103/claude-code-infrastructure-showcase --skill backend-dev-guidelines

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill establishes consistency and best practices across backend microservices, addressing issues like inconsistent architecture, poor error handling, lack of validation, and difficult-to-maintain codebases. It guides developers in building robust, scalable, and testable Node.js/Express/TypeScript APIs.

Core Features & Use Cases

  • Layered Architecture: Enforces a clear separation of concerns (Routes → Controllers → Services → Repositories) for improved maintainability and testability.
  • Type-Safe Validation & Configuration: Mandates Zod for input validation and unifiedConfig for type-safe, centralized configuration, eliminating process.env direct usage.
  • Comprehensive Error Handling & Monitoring: Integrates Sentry for mandatory error tracking and performance monitoring, ensuring all errors are captured with rich context.
  • Use Case: When developing a new API endpoint for a Node.js microservice, use this Skill to ensure the implementation follows the layered architecture, uses Zod for input validation, integrates Sentry for error tracking, and adheres to the BaseController pattern for consistent response handling.

Quick Start

Create a new Node.js/Express API endpoint for user creation, including a controller, service, and repository, with Zod validation and Sentry integration, following the layered architecture.

Frequently Asked Questions about backend-dev-guidelines

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

FAQPage Schema
How do I structure a Node.js Express API with layered architecture?

Layered architecture separates concerns into routes, controllers, services, and repositories. This pattern improves maintainability and testability by isolating business logic, data access, and HTTP handling into distinct layers that are easier to modify and test independently.

What's the best way to validate API input in Express with TypeScript?

Use Zod for runtime type-safe validation of API inputs. Zod schemas define expected data structures, parse and validate incoming requests, and provide strong TypeScript inference, catching validation errors before they reach your business logic.

How do I set up error handling and monitoring in Node.js microservices?

Integrate Sentry to capture and monitor errors across your microservices with rich context. Sentry tracks error frequency, performance metrics, and stack traces, enabling faster debugging and visibility into production issues.

Can I use BaseController pattern across multiple Express endpoints?

Yes, BaseController provides a consistent response handling pattern across all endpoints. It standardizes HTTP status codes, response formatting, and error responses, reducing boilerplate and ensuring uniform API behavior.

Why should I use centralized configuration instead of process.env directly?

Centralized configuration via unifiedConfig provides type-safe, validated access to environment variables with a single source of truth. This prevents runtime errors from missing or misconfigured environment values and improves code maintainability.

Do I need Prisma to follow these backend development guidelines?

Prisma is optional but recommended for the repository layer. Any data access tool works with this architecture; Prisma integrates smoothly with the service-repository pattern and provides type safety for database queries.